Android wrap_content vs fill_parent

  While developing layouts in Android to specify layout_height & layout_width you have used either  wrap_content or fill_parent (match_parent). Let us compare Android wrap_content vs fill_parent.   wrap_content : The component will occupy space over  its parent only as per its content-size. We can imagine that with a balloon, the balloon will occupy space depending upon air […]

Android Orientation

  Based on content of the Activity we may require to start our App, either in Landscape (Horizontal) or Portrait (Vertical) mode. This can be done in two ways – Adding android orientation in Manifest.xml file. Adding orientation from MainActivity.java file. In this tutorial you will study both approaches of android orientation. You will also learn to […]

Install Android App into Emulator (AVD)

  It is very handy to test Android Apps on emulator (Android Virtual Device – AVD) if you don’t have an actual device. Follow the below steps to install Android App into Emulator using command line interface. Before proceeding, start your emulator (AVD) since it might take time to boot. To know procedure for creating […]

Android Activity LifeCycle

  In order to create Android Activity, we need to extend Activity class of package android.app & over-ride its built-in Activity LifeCycle methods. To customize behaviour of our Activity we need to understand some basics of Android Activity Lifecycle. Activity LifeCycle is the way our Activity works i.e. how an Activity is created, started, paused, resumed, stopped, destroyed etc., which you can […]

Android Log Example

  Android Log provides ongoing details of our process & makes it easy for us to understand the scenarios happening behind the code. Logs are used extensively while development to understand the issues caused by errors, yet we should be sure that we have removed piles of log on releasing our App. In order to use Logs in android […]

Android Intent Result Example

  Intents are mainly used for communication between 2-activities or to pass data between them. Whenever we start a new Activity using Intent, that Intent can also return some result to our older Activity from newly created Activity. This process is called receiving intent result.   Many a times we might have various operations to be […]

Android Explicit Intent

  Android Explicit Intent is used to invoke components such as Activity / Service / Broadcast Receiver of our own application, e.g. Launching Dashboard Activity with Explicit Intent, when user clicks on submit button from Login Activity.  Android Explicit Intent designates target component by it’s name (i.e. specifying Activity Class name as 2nd parameter while declaring intent). Android Explicit Intent […]

Android Implicit Intent

  Android Implicit Intent is used to invoke inbuilt system components or invoke components from another applications. Android Implicit Intent don’t directly specify android component which is to be called. Instead Implicit Intent just specify the action to be performed & what matter is to be passed to that component like URL, Map Lat-Long., Ph No., etc. Example of […]

Android Intent

  Android Intent is an asynchronous messaging element which can send data & action to various Activities / Background-Services / Broadcast Receivers. While you are working on one activity, you can easily switch-over to another using Android Intent. In fact one of the most widely use of Android Intent is starting new Activities. Intent also acts as a carrier […]

Android DatePicker

  In order to provide user with date selection, we need to use – Android DatePicker. This tutorial will cover on how to get current-date, how to invoke Date-Picker Dialog-box and how to set the selected date to EditText.   Source Code : DatePicker.zip   Now Let us work on Project : (Refer – Configuring Existing AndroidStudioProject) […]