Month: November 2012

Android Passing Data Between Fragments

In the last Fragment Tutorial I simply showed two fragments in one activity. Today I am going to show you how we can pass the data between two fragments. its pretty easy to pass data between two fragments with the help of interface.. Define Fragments (activity_main.xml): View the code on Gist. Create Fisrt Layout (layout_one.xml) View the code on Gist. Create Second Layout (layout_second.xml) View the code on Gist. Create Interface (OnButtonPressListener.java) View the code on Gist. Create LayOutOne (LayOutOne.java) View the code on Gist. Create LayOutTwo (LayOutTwo.java) View the code on Gist. Create MainActivity (MainActivity.java) View the code on Gist. Download Source...

Read More

Android Fragment Example

A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a “sub activity” that you can reuse in different activities). Google provides the Compatibility Package, a Java library that you can include in an application, implementing...

Read More

Android Programmatically Create Group Contact With Image | Photo Example

Today I am going to show you how to create the group and save contact in the group with image in android programmatically. In this example it will create the following group and contact Group Name : YourGroupName Contact Name: Demo Contact Step 1: Create the java file MainActivity.java View the code on Gist. Step 2: Create Xml file activity_main.xml View the code on Gist. Step 3: Create java file ContactOperation.java View the code on Gist. Download Source Code...

Read More

Find me on Google Plus

My Facebook Page