Tag Archives: Inflater

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 display a context menu from a fragment?

By | June 9, 2013

Hello all I think you all know about the context menu in android. It appears as a popup when you long press something. Fragment also provides some methods for registering with the contextmenu and showing it. Let’s see how we can do it. You can click on the download links to download the source code.… Read More »

How to initialize a Fragements with attributes as a Bundle at runtime and from attributes in a layout?

By | June 6, 2013

This post Demonstrates a fragment that can be configured through both Bundle arguments and layout attributes. You can click on the links to download the source code. Here there are two fragments in the layout, one is directly in the layout and the other is created dynamically with arguments at runtime. Here is how we… 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 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 »

Dynamically Adding, Removing, Toggling and Removing all ActionBar Tabs in Android – Part 2?

By | October 8, 2012

Hi all.. In today’s post I will show you how to add actionbar tabs dynamically, remove one by one , hide and unhide them, removing all tabs at once etc. This simple java code does that. First create a project and in the MainActivity, paste this. You may be getting many errors, we will be… Read More »

How to start with ActionBar in Android?

By | August 23, 2012

With Android 3.0 Google eliminated the need of hardware menu button which is replaced by Action Bars. Here is a quick example on how to use ActionBars. First create a new project and name it ActionBarExample. Now create a folder named “menu” in res folder and create a new XML file inside it named “action_bar_menu.xml”.… Read More »

How to remove title from AlertDialog in android?

By | July 24, 2012

Hello all.. Today I will show you two simple ways to remove title in an android alertdialog. Actually you can do this in two methods. Method 1 That takes a custom layot file, inflates it, gives it some basic text and icon, then creates it. Method 2 But it doesn’t work when creating an AlertDialog… Read More »

Custom GridView in android. A simple example.

By | February 29, 2012

Hello all……….. Android has been absoultely wonderful for customizing widgets. I have shown a lot of example to customize ListViews, spinners etc. Today I will show you how to customize gridviews. Using this method you can actually place anything inside a gridview even a webview also. So here we start. We customize a gridview by… Read More »