Tag Archives: ViewGroup

Swipe Refresh ListView using ListFragment and SwipeRefreshListFragment in Android

By | February 25, 2016

This demo shows How to use Swipe to Refresh in ListViews and ListViewFragments. You can download the complete Android Studio Source Code at the end of the Post. 1. Using ListFragment 2. Using SwipeRefreshListFragment You can download the complete Android Studio Source Code from here. You can send your valuable comments @coderzheaven@gmail.com.

Custom Transitions in ANDROID.

By | February 5, 2016

Here we are going to create custom transitions for a fragment. We will create transitions using Java classes by extending the Transition Class in Android. ChangeColor.java is the java class that extends transition. ChangeColor.java CustomTransitionFragment is the Fragment to which we are going to apply the transition. The MainActivity that adds the fragment. Download the… Read More »

FlipCard animation using Fragments in Android.

By | August 17, 2013

Hello all I am back with fragments again. I know you have seen a lot of posts on fragments and fragment animation. This one will be another useful post for you. This post helps you to show a FlipCard animation using Fragments. Let us see how can we do this. At first I will show… Read More »

How to get a return value from a DialogFragment? or Using DialogFragments in android.

By | July 1, 2013

Hello all…… This post examples how to get an edittext value from a dialog fragment. You can use the same method to get a button click from a dialog or events like that. You can click on the download link to get the source code. At first we will create a layout for the Dialog… Read More »

How to create layouts that change according to the phone and Tablet in Android Using Fragments in SDK Less than HoneyComb?

By | February 19, 2013

Hello all….. This is a simple tutorial to show how to create a FLEXIBLE UI for both Phone and Tablets in Android. In the figure below you can see the result after running this tutorial. Tablet in LANDSCAPE MODE TABLET IN PORTRAIT MODE TABLET IN PORTRAIT MODE – AFTER CLICKING THE LIST. PHONE IN PORTRAIT… Read More »

How to create layouts that change according to the phone and Tablet in Android Using Fragments?

By | February 17, 2013

Hello all….. This is a simple tutorial to show how to create a FLEXIBLE UI for both Phone and Tablets in Android. In the figure below you can see the result after running this tutorial. Tablet in LANDSCAPE MODE TABLET IN PORTRAIT MODE TABLET IN PORTRAIT MODE – AFTER CLICKING THE LIST. PHONE IN PORTRAIT… Read More »

Using DialogFragments in Android – A Simple example.

By | February 14, 2013

A little on Dialog Fragments A fragment that displays a dialog window, floating on top of its activity’s window. This fragment contains a Dialog object, which it displays as appropriate based on the fragment’s state. Control of the dialog (deciding when to show, hide, dismiss it) should be done through the API here, not with… Read More »

How to draw Arcs in Android using canvas?

By | January 10, 2013

This is a simple example showing how to draw Arcs in android, You can use this to create piecharts or someother similar thing you want. Here we have 3 classes. 1. GraphicsActivity.java 2. MainActivity.java 3. PictureLayout.java GraphicsActivity.java PictureLayout.java MainActivity.java Download the complete source code from here.

How to load a spinner with values from SQlite Database in android?

By | November 18, 2012

Here is a simple example showing how to load a database values in a spinner in android. OK we will start. This is the layout for the spinner row. spinner_row.xml This is the layout for the interface. activity_main.xml Now this is the MainActivity.java file that uses the spinner and the database. Join the Forum discussion… Read More »

How to place layouts one over another in android using addContentView()?

By | February 10, 2012

Hello all… In today’s tutorial I will show you how to add different layouts one over another in android through java code. For this we use the function addContentView() which is a variation on setContentView(View, android.view.ViewGroup.LayoutParams) to add an additional content view to the screen. Here I will create an xml with a textView and… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »