During the flow of any app we often need to prompt the user to make some decision e.g. Deleting a file , posting comment etc . Below is the most simple way to show a promt . Here we are using AlertDialog to show a single button dialog , we …

Lists are the most common ways of representing collections of similar data . Thus a RecyclerView is a widget that we Android developers have to deal with very frequently . Following are the steps involved in implementing a RecyclerView . In this tutorial we shall implement the recyclerview using Kotlin. …

How to start a new activity ? How to pass a value from an activity to the other ? Probably these questions have come to your mind if you have just started using Kotlin for developing android apps . By the end of this post you’ll have all the answers …

We no more need findViewById() again , as Kotlin Android Extensions is here . Probably you have used the Butterknife library to avoid writing findViewById() again and again . But with Kotlin Android Extensions plugin its even easier . The process can be summerized in three steps as below : …

Are you planning to use Kotlin for your next app , or excited to explore some Kotlin; but not sure where to start !! Let us start with a simple android activity . A simple activity Below is our MainActivity which does nothing except loading the layout from activity_main.xml layout …

1. Create a new android project 2. Set up Firebase Authentication for android 3. Check if the user is already logged in -Create instances of FirebaseAuth and FirebaseAuth.AuthStateListener (e.g. mAuth and mAuthStateListener repectively) -Add the mAuthStateListener to the mAuth object inside onStart() -Remove the auth state listener inside onStop() 4. …

Integration of social login is one of the most common tasks in app development , whether it is a mobile app or a website. Social login makes it easier for the user to login and try the app . Thus in this post we’ll learn to implement google login for …

1. Create a new android project 2. Add ViewPager and TabLayout widget to the layout of the activity i.e main_activity.xml 3. Initialize the UI components in MainActivity.java 4. Lets create the fragments to be used as pages for the viewpager. 5. Create an adapter for the viewpager. 6. Set the …

Steps 1.Create a new android project with two activities ActivityA and ActivityB and corresponding xml layouts activity_a.xml and activity_b.xml 2.Create an EditText in activity_a to take user input which will be passed to ActivityB 3.On button click get the user input from the EditText and add it to the intent …

1. Create a new android project with two activities ActivityA and ActivityB and corresponding xml layouts activity_a.xml and activity_b.xml 2. Add a button to the first activity’s layout 3.Perform the action of loading ActivityB on button click There are two ways we can add an action to a button in …