Elif Coding
  • Home
  • ANDROID STUDIO
    • FIREBASE
    • KOTLIN
    • FLUTTER
    • MATERIAL DESIGN FOR ANDROID
  • HOW TO( IN ANDROID STUDIO )
  • HTML AND CSS
  • YOUTUBE SUBSCRIBE
  • ABOUT US
    • PRIVACY POLICY
    • TERMS AND CONDITION
    • DISCLAIMER
  • CONTACT US
The disease arising in Wuhan-China,is the COVID-19 disease first known as the coronavirus disease (COVID–19). The "CO" is the corona disease and "VI" is the virus, and "D" the disease. This disease has historically been labeled as "novel 2019 coronavirus" or "2019-nCoV."

The COVID-19 is a new virus that has been linked with the same family of viruses, such as SARS and some common colds. Hence as part of raising awareness, in today's article, Elif Coding comes out with how to create COVID-19 walkthrough screen design in android studio.


covid-19

WHAT IS WALKTHROUGH SCREEN OR ONBOADING SCREEN? 

In modern times, the first time users display onboard screens has become a popular occurrence in mobile applications. The aim of these onboard displays also called "WALKTHROUGH SCREEN" is to introduce the application and demonstrate what it does. Since these are often the first set of screens to communicate with users, the users anticipate the app. 

onboarding screen in covid-19


Those involved in product development,project managers, designers and developers must then take the time to decide if onboarding is required for the application, and, if so, to determine how to execute it best. 

adobe xd design free


XML LAYOUT DESIGN 

  • First Download XD design and Export the design as drawables
  • After exporting, import drawables to your android studio project as drawables.
  • Download Gotham and Monsterrat fonts.
  • Create Android Resource directory and paste downloaded font in that directory name font
  • create new android layout activity name slider_layout.
  • Copy and paste this xml code in the newly created slider_layout

slider_layout.xml
 
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
android:layout_height="match_parent">

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="90dp"
        android:layout_marginEnd="8dp"
        android:src="@drawable/s_distance_img"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="32dp"
        android:layout_marginEnd="8dp"
        android:fontFamily="@font/gotham_medium"
        android:text="HEADING"
        android:textStyle="bold"
        android:textColor="#372B7B"
        android:textSize="20sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/imageView" />

    <TextView
        android:id="@+id/description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="8dp"
        android:fontFamily="@font/montserrat"
        android:padding="10dp"
        android:text="Avoid close contact with people who are sick. When you are sick, keep your distance from others to protect them from getting sick too."
        android:gravity="center"
        android:textColor="#3A2F81"
        android:textSize="16sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView" />

</androidx.constraintlayout.widget.ConstraintLayout>
  •  In the activity_main paste this xml code

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/app_bg"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <androidx.viewpager.widget.ViewPager
        android:id="@+id/viewpager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

    </androidx.viewpager.widget.ViewPager>


    <TextView
        android:id="@+id/back"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="20dp"
        android:layout_marginBottom="20dp"
        android:fontFamily="@font/gotham_medium"
        android:text="@string/back"
        android:textColor="#3A2F81"
        android:textSize="16sp"
        android:textStyle="bold" />


    <TextView
        android:id="@+id/next"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginEnd="20dp"
        android:layout_marginBottom="20dp"
        android:fontFamily="@font/gotham_medium"
        android:text="@string/next"
        android:textColor="#3A2F81"
        android:textSize="16sp"
        android:textStyle="bold" />

</RelativeLayout>

  •  Create a new Java Class named SliderAdapter
  • Paste this java code in the newly created java class

 SliderAdapter.java 
package com.ayowainc.ob;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.viewpager.widget.PagerAdapter;

public class SliderAdapter extends PagerAdapter {

    private Context context;

    SliderAdapter(Context context) {
        this.context = context;
    }

    //Arrays
    private int[]slider_images = {
            R.drawable.s_distance_img,
            R.drawable.wash_hands_img,
            R.drawable.stay_home_img,
            R.drawable.cover_mouth_img,
            R.drawable.disinfect_img,
            R.drawable.elif_logo
    };

    private String[]headings = {
            "AVOID CLOSE CONTACT", "CLEAN YOUR HANDS","STAY HOME","COVER MOUTH","CLEAN AND DISINFECT","INFO FROM ELIF"
    };

    private String[]descriptions = {
            "Avoid close contact with people who are sick.  When you are sick, keep your distance from others to protect them form getting sick too.",
            "COVID-19 is often spread when a person touches something that is contaminated with the Virus. Washing your hands often will help protect you from this Virus.",
            "If possible, stay home from work, school, and errands when you are sick.  You will help prevent others from catching the virus.",
            "Cover your mouth and nose with a tissue when coughing or sneezing.  It may prevent those around you from getting sick.",
            "Always try your best possible way to disinfect and clean your household,offices,churches,schools, stadiums,etc",
            "Hey! Viewers COVID-19 is real, let's come together and fight this noveal virus from our society. Please Stay Home, Stay Safe and Subscribe"
    };

    @Override
    public int getCount() {
        return headings.length;
    }

    @Override
    public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
        return view == (ConstraintLayout) object;
    }

    @NonNull
    @Override
    public Object instantiateItem(@NonNull ViewGroup container, int position) {
        LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View view = layoutInflater.inflate(R.layout.activity_slide_layout, container, false);

        ImageView sliderImages = (ImageView) view.findViewById(R.id.imageView);
        TextView sliderHeading = (TextView)view.findViewById(R.id.textView);
        TextView sliderDesc = (TextView) view.findViewById(R.id.description);

        sliderImages.setImageResource(slider_images[position]);
        sliderHeading.setText(headings[position]);
        sliderDesc.setText(descriptions[position]);

        container.addView(view);
        return view;

    }

    @Override
    public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
        container.removeView((ConstraintLayout)object);
    }
}


  •  In the MainActivity.java paste this line of code

 MainActivity.java

package com.ayowainc.ob;

import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;

public class MainActivity extends AppCompatActivity {
    private ViewPager slideViewPager;
    private TextView Next, Back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        slideViewPager = (ViewPager) findViewById(R.id.viewpager);
        Next = findViewById(R.id.next);
        Back = findViewById(R.id.back);
        Back.setVisibility(View.INVISIBLE);

        SliderAdapter sliderAdapter = new SliderAdapter(this);
        slideViewPager.setAdapter(sliderAdapter);

        Next.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View view) {
                slideViewPager.setCurrentItem(slideViewPager.getCurrentItem() + 1, true);
            }
        });


        Back.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View view) {
                slideViewPager.setCurrentItem(slideViewPager.getCurrentItem() - 1, true);
            }
        });

        slideViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
            private int i;
            private float v;
            private int i1;

            @Override
            public void onPageScrolled(int i, float v, int i1) {

                this.i = i;
                this.v = v;
                this.i1 = i1;
            }

            @Override
            public void onPageSelected(int position) {
                if (position == 0) {
                    Back.setVisibility(View.INVISIBLE);
                } else {
                    Back.setVisibility(View.VISIBLE);
                }
                if (position < slideViewPager.getAdapter().getCount() - 1) {
                    Next.setVisibility(View.VISIBLE);
                } else {
                    Next.setVisibility(View.INVISIBLE);
                }
            }

            @Override
            public void onPageScrollStateChanged(int i) {

                this.i = i;
            }
        });
    }


}


covid-19 summary

Run the code and see the outcome. Hey! Viewers COVID-19 is real, let's come together and fight this novel virus from our society. Please Stay Home, Stay Safe and Subscribe to my youtube channel.


https://www.youtube.com/watch?v=GsqxDW8vde8 
download free android studio source code
HTML and CSS made easy with these 3 Tools (Free)


HTML and CSS appear to be always there, but it was finalized only in October 2014 – although it was implemented approximately five years ago. The functionality and ability to create responsive web designs are increasingly changing to this markup language.

However, implementation of HTML and CSS is not as simple as it may appear, particularly with new and inexperienced web designers.

This language can neither be used effectively by qualified nor amateur web developers or designers. I'll talk about 3 (free) tools which make development of HTML and CSS easy in this article.

0.1 Adobe Xd

Adobe XD was developed and published by Adobe Inc. It is a tool for designing vector user interface(ui) and experiences(ux) for web designs and mobile apps. It can be obtained for macOS and Windows, even though iOS and Android versions can help preview the result of mobile work. XD supports click-through prototypes of wireframing websites.


what is adobe xd

First, Adobe announced at the Adobe MAX conference in October 2015 that it was developing a new interface design and prototype tool under the name "Project Comet". This was due to Sketch, a UX and UI designed vector released in 2010 and is now increasingly popular.

They first released to anyone with an Adobe account on March 14th 2016 for macOS only as "Adobe Experience Design CC." On December 13, 2016, the Adobe XD beta was released for Windows 10. Adobe revealed Adobe XD was not beta on 18 October 2017.

0.2 Fireblade Plugin

Turn your designs to usable source code, whether you convert an adobe xd designing artboard to a web page or the xd element into a React or React Native format, automatically using Fireblade plugin in Adobe XD.

Fireblade Plugin for Adobe XD

Simply select the assets and the destination folder, Fireblade automatically generates your design to source code. The latest Fireblade version supports HTML5 & CSS, React, React Native and Lite Element code generation.

 

 

How to install Plugin(Fireblade) in Adobe XD

  • After installing Adobe XD, Launch application
  • On the application home screen click on ADDONS and PLUGINS after.

How to install Plugin in Adobe XD 

  •  After clicking PLUGINS another screen popup. On the DISCOVER PLUGIN screen click on the tiny search button on top left corner of screen.

How to install Plugin in Adobe XD


  • search for FIREBLADE in the SEARCH BAR and click on the search result. 

How to install Plugin in Adobe XD


  •  Click INSTALL to install fireblade plugin in adobe xd

How to install Plugin in Adobe XD


  • Congratulation, you just installed a new plugin in adobe xd. 

How to install Plugin in Adobe XD

0.3 Brackets

Brackets is an Adobe-developed Free HTML Editor. Brackets stand out among other text editors in terms of front-end development. Brackets is an Adobe project and performs brilliantly in all matters related to the integration of design.


The program provides a tool for a live preview (Visual Web Page Editor) which is an important hit for many users. This function allows you to edit code in a preview window and see how the changes occur in real time.

Brackets can also integrate code hint with Photoshop, enabling handy files such as font,colors and measurement to be imported from Photoshop. Brackets, on the other hand , contains several useful keyboard shortcuts that makes html and css code writing easy.


Elif coding youtube channel

Flutter emerged as a great option to develop cross-platform mobile apps since Google announced its first stable version release. But where should I begin? In this article we will cover how to get started with flutter for beginners in Android Studio.

Hint: read introduction to android studio for beginners.


Get started with Flutter in Android Studio 2020.


What is Flutter?

Flutter is a framework that allows developers to build multi-platform apps with a single programming language. Flutter is an alternative to the React Native Framework.


What is Flutter?


Google is designing the Code for Flutter but it is available to all external contributors. Flutter has been around for a long time but they became more focused on when Google revealed the release preview of  Flutter on December 4th 2018, with loads of new apps. Then apps built in Flutter became more and more popular.

What is the best, Flutter or React Native?

In my honest opinion, both have their pros and cons:

With many people and projects already using React Native, definitely is more popular. It allows you to use a lot of 3rd party libraries from the Javascript ecosystem to create react native app, and you can find plenty of learning material.

You will also be able to leverage your skills and practices on the front-end to facilitate development.


What is the best, flutter or react native?


Flutter however is an Android native citizen and appears to be more politically published on its launch. Many things in the React Native Framework that are regarded as community responsibility are only part of the platform: navigation, topics that enable us to build a high quality native-feeling platform. What is missing is community maturity, learning material, best practice and evidence that they have been tested in battle.

Where are you going? Native or flutter?

I believe React Native is a better choice if you want to leverage your existing web boundary skills, especially if you have used React Native before.

In the other hand Flutter is a better way to learn from the bottom line and an interesting alternative to the traditional native IOS or Android ecosystem

How do I setup Flutter in Android Studio?

Flutter is a mobile interface Framework to create both IOS and Android apps. Dart is the language supported by flutter. Below are few steps to install flutter in android studio as a flutter developer.

 
How do I setup Flutter in Android Studio?

 

Key Steps:

  • Download and install Android Studio here.
  • Next download Git here.
  • Now the key step is let's install flutter.

You must first go to your C:/ drive and create a folder called "src" in order to install Flutter.

Just go to that folder and run the command of Git Bash below after you have created the folder.
git clone -b stable https://github.com/flutter/flutter.git

And you must go to the flutter folder of the src folder you created, after your setup and running flutter console, as below screenshot you will see:


How do I setup Flutter in Android Studio?

After installing flutter repository form Github run a flutter command in that console to Install the flutter SDK:
flutter doctor

It will take a few minutes to install for the first time. After installation successfully, run this code in the flutter console.
flutter - version

Flutter version will show up like this:

flutter console


In Android Studio Install Flutter Plugin.

Following the successful flutter installation, we now need a plugin to be installed in Android Studio to go to Settings->Plugins- > Search Flutter and install a plugin to restart Android Studio, as in the screenshot below. 

install flutter plugin


Hooray! you  installed flutter on your PC.
You can now create an Android Studio flutter project like the screenshot below:

create new flutter project in android studio



Elif coding post summary
You can build your own native Android and IOS with a single codebase using the flutter-supported dart language in this post.

I hope that this article will be helpful. If you think something is missing, questions or feedback, go a step further and leave a comment below. I will enjoy the reviews.
Before I speak about the subject today. We'll look forward to other ways to answer questions and to learning how to use the AndroidX constraint layout. This article teaches you how to make Android Studio apps with constraint layout support all your screen sizes.


Make Android Studio app support all screen sizes with Constraint Layout.

  • How to set the layout of the screen to support any screen size?
  • Make an android app in Android studio responsive?
  • How to create android applications that fit all screen sizes?
  • Design Android layout for various screen sizes?

So in this tutorial you will find the answer to all the questions above and related. We will use Constraint, which is a screen layout in Android studio to support all the screen sizes.

What is an Android Studio Constraint Layout?

Constraint layout is a Group view, including all the other views inside to create an app for android. Constraint layout uses constraints for placing views anywhere on the screen. It is flexible and easier to use in Android studio compared to other layouts.


What is an Android Studio Constraint Layout?


The constraint layout is one of the recent updates of the Android Studio for the design of an application. We will create a responsive layout in the Android studio in our present tutorial with a constraint layout and some of the key problems in the use of this layout

About AndroidX Constraint Layout.

AndroidX is a big improvement to Android support libraries, which are no longer maintained by the android studio where Constraint layout once was part of and published in support libraries.

ConstraintLayout, which is now the default Android Studio layout, allows you to set objects in many places.

You may limit them to each other's container or guidelines. In a flat hierarchy this enables you to create large , complex and dynamic views.

How do I make Android in Android Studio responsive?

In this article you will learn how to create a responsive design using the constraint layout of Android Studio.

  • Build a new Project
  • Move to the XML and choose a constraintLayout as the xml design parent.
  • Type Capital V for Views
  • Set them to test the size of the screen
  • Set all the constraint on it closest neighbours
  • Adjust the width to match constraint in the XML design panel for horizontal responsiveness.
  • Height to match constraint, if vertical responsive is needed.
  • Make sure all the constraints are set.
  • Run the project in Android studio and it will respond to all types of screen sizes.

How do I make Android in Android Studio responsive?

Make Android Application Responsive with this code using Constraint Layout

  • Open XML(activity_main.xml)
  • Remove what's there ever
  • Copy the following code
  • Paste code in activity_main.xml
  • Execute or run project

XML CODE

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <!--first view-->
    <View
        android:id="@+id/elif12"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#FB8C00"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/elif9"
        app:layout_constraintTop_toBottomOf="@+id/elif4"
        />
    <!--second view-->
    <View
        android:id="@+id/elif11"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#FFE92B"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/elif10"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/elif2"
        />
    <!--third view-->
    <View
        android:id="@+id/elif10"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#0B0901"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/elif9"
        app:layout_constraintStart_toEndOf="@+id/elif11"
        app:layout_constraintTop_toBottomOf="@+id/elif2"
        />
    <!--fourth view-->
    <View
        android:id="@+id/elif4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginTop="200dp"
        android:background="#5F0DE1"
        app:layout_constraintBottom_toTopOf="@+id/elif12"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1.0"
        app:layout_constraintStart_toEndOf="@+id/elif2"
        app:layout_constraintTop_toTopOf="parent"
        />
    <!--fifth view-->
    <View
        android:id="@+id/elif3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#140533"
        app:layout_constraintBottom_toTopOf="@+id/elif4"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/elif2"
        app:layout_constraintTop_toTopOf="parent"
        />
    <!--sixth view-->
    <View
        android:id="@+id/elif2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#0DF17D"
        app:layout_constraintBottom_toTopOf="@+id/elif11"
        app:layout_constraintEnd_toStartOf="@+id/elif3"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        />
    <!--seventh view-->
    <View
        android:id="@+id/elif9"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#FF0048"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/elif12"
        app:layout_constraintStart_toEndOf="@+id/elif10"
        app:layout_constraintTop_toBottomOf="@+id/elif4"
        />
</androidx.constraintlayout.widget.ConstraintLayout>


Elif coding all articles summary

However, AndroidX has now replaced the constraint layout and is not supported by the support libraries of android. Now and then use AndroidX to create your projects and try to turn your previous projects into AndroidX.
Older Posts Home

POPULAR POSTS

  • How to create Splash Screen with Animation in ANDROID STUDIO [Full Guide]
Powered by Blogger.
ad-here

Labels

FLUTTER FREEMIUM SOURCE CODE HOW TO IN ANDROID STUDIO HTML AND CSS MATERIAL DESIGN FOR ANDROID

Translate

ADVERTISE HERE

ad-here

PURCHASE SOURCE CODE

codecanyon-img

YOUTUBE CHANNEL SUBSCRIBE

subscribe-img

Designed By Elif Coding | Distributed By AYOWA INC