Category Archives: Android

Android Validating Email EditText sample example methods tutorial

In this article we will see different methods to validate email address entered through EditText using android layout xml file. Email validation is useful in android because we need to send the email to server for registering a new account or for any other purpose. If we validate the email in the android app itself… Read More »

56,128 total views, 11 views today

Add/Remove items at RunTime in Spinner Android?[Solved]

Step 1: Add the following Code to activity_main.xml Step 2: Add the following code to Step 3 : Now you can save and execute the Application. Your output will be like this : 6,320 total views, 3 views today

6,320 total views, 3 views today

Android secure encrypted SharedPreferences example Tutorial

In Android shared preferences are used to store user’s preferences for android application such as display name, notification settings, vibration on/off etc. But many times, for example if we are developing a game and storing user’s score inside shared preferences then we should not store them directly. Anny rooted phone can be used to directly… Read More »

13,620 total views, 2 views today

Android Alert Dialog Example sample Tutorial

Alert dialog is used in android whenever we need to notify user about certain events in our android application. Such events include exiting of app,deleting some entry, network usage etc. We will see a simple code snippet showing the implementation of alert dialog in android as below: 3,796 total views, 1 views today

3,796 total views, 1 views today

Android simple Tabs with Swipe Layout(ViewPager) Fragments Tutorial

In this tutorial we will see a simple example of android application having tabs with swiping screens. Previously we saw an example of just swiping views using ViewPager. Now we will use ActionBar Tabs along with ViewPager in this tutorial. Steps required for implementation: 1) Setting navigation mode of ActionBar to actionBar.NAVIGATION_MODE_TABS and adding tabs.… Read More »

7,944 total views, 4 views today

Android ViewPager simple Example Tutorial- Sliding Screens

  ViewPager is used to for implementing the Screen Slides. Screen slides are transitions between one entire screen to another and are common with UIs like setup wizards or slideshows as shown in the above video. Steps for implementing ViewPager: 1) A Layout(that contains ViewPager) for the MainActivity. 2) FragmentPagerAdapter/FragmentStatePagerAdapter class which controls the fragments… Read More »

48,653 total views, 5 views today

Simple Android Foreground Service Example Tutorial

In this tutorial we will see a very simple implementation of android foreground service. A Service is an application component that can perform long-running operations in the background and does not provide a user interface. A Foreground Service in android is a background service which keeps running even after the parent application is closed. Use… Read More »

75,775 total views, 16 views today

Android Advanced Interview Questions And Answers

Q)Explain  Service vs intent service ? When to use? The Service can be used in tasks with no UI, but shouldn’t be too long. If you need to perform long tasks, you must use threads within Service. The IntentService can be used in long tasks usually with no communication to Main Thread. If communication is required, can use Main Thread… Read More »

8,895 total views, 2 views today