Posts Tagged ‘ fragment ’

Creating Navigation tabs using TabHost and Fragments in Android

July 31, 2012
By
Navigation Tab Demo

In this article, we will develop anĀ  Android application containing navigation tabs. There are many ways by which we can add navigation tabs to an application. Beginning with Android 3.0, the standard way to create navigation tab is using action bar. Please read the article titled ” Adding Navigation Tabs containing listview to Action...

Read more »

SharedPreferences Demo Application

July 6, 2012
By
Shared Preferences Demo

In the article titled Alert Dialog Window with radio buttons in Android , we have seen that how to create an alert dialog window which contains radio buttons as options. In this article we are going to extend that application using shared preferences so that the data will not be lost on closing the...

Read more »

Alert Dialog Window with radio buttons in Android

July 6, 2012
By
Alert Dialog Window

The objective of this article is to create an Android application which demonstrates how to create and open an alert dialog window in an application. The key classes that we are using in this application are DialogFragment and AlertDialog. In this article, the alert dialog window will be opened when the button “Choose Android”...

Read more »

Opening an Alert Dialog Window in Android

July 5, 2012
By
Open Alert Dialog

Alert dialog window is a small window which can float on the top of an activity. It can either show some text messages or complex views by customising its layout. In this article we will create an application which will use the alert dialog window for user confirmation. You can see the screen shot...

Read more »

Opening a DailogFragment on an item click in Android

July 4, 2012
By
Opening the Dialog Window

DialogFragment is a fragment that displays a dialog window on the top of the calling activity’s window. The objective of this article is to create an Android application which opens a dialog window when clicking on a country listed in the listview. In the opening dialog window, the local time of the selected country...

Read more »

Item Long Click handler for ListFragment in Android

July 4, 2012
By
Item Long click event handler for ListFragment

The objective of this article is to create an Android application which handles the long click event on the listfragment items. If you want to see the screenshot of this application, please jump to the end of this article 1. Create an Android Project namely “ListFragmentItemLongClick” 2. Select Android build target for this application...

Read more »

Itemclick handler for ListFragment in Android

July 3, 2012
By
ListFragment in landscape orientation

The objective of this article is to create a multi-pane android application using fragments. In the first pane, the list of country names will be displayed using ListFragment. On clicking a country, its details will be displayed in the second pane. This is the behaviour if the application is viewed in the landscape orientation....

Read more »

A ListFragment Application with backward compatibility in Android

July 2, 2012
By
Countries List Using ListFragment

ListFragment is a fragment class available in the package android.app and it is used to list a set of items in as a listview. Fragment is a new concept which is introduced in Android 3.0 and its higher versions. But we can create applications having fragments for the prior versions of Android till 1.6...

Read more »

A ListFragment Application in Android

July 2, 2012
By
ListFragment Demo

In this article we will create an application which displays a list of countries using ListFragment. ListFragment is a subclass of Fragment class which can display a set of items in a listview and facilitates to exist as a fragment. We are building this application for Android 4.0 in which fragments are supported by...

Read more »

Dynamically add Fragments to an Activity in a Legacy Android Version

June 30, 2012
By
Main Activity with dynamically added fragment

Android begins to support fragments from the version 3.0 onwards. In those versions prior to 3.0, we have to use Android Support Library to create fragments. In this article we will create an application which adds a fragment to the main activity at runtime in Android version 2.3 using Android Support Library. 1. Create...

Read more »

Be friend at g+

Subscribe for Lastest Updates

FBFPowered by ®Google Feedburner