Tag Archives: Custom Layout

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 will you create a custom Notification in Android with a custom Layout?

By | September 15, 2012

This sample application does that. First create an xml for your notification. custom_notification.xml Now the java code.

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 »

CustomAlert without any custom Layout in android.

By | February 6, 2012

We can create a dialog with custom alert dialog with our xml in android. But for making simple alerts we can make custom alerts through code itself. Here is a simple function for this. Here I am having a Listview and an edittext with two buttons in the alertBox. Please leave your valuable comments on… Read More »

How to create a custom layout for your camera in Android?

By | December 28, 2011

Hello everyone, Today’s example shows how to create a custom layout for your camera preview, that is if you want a custom layout while your camera is opening. This example helps you to achieve this. First create a fresh project and name it CameraCustomLayout and copy this code to CameraCustomLayout.java file. After that create an… Read More »

How to create custom layout for your spinner in ANDROID? or Customizable spinner

By | February 20, 2011

This code helps you to customize the spinner in ANDROID. For that you have to create an XML file inside your layout folder as shown below and name it spinner.xml. You can give all properties that are available for TextView inside this which is going to be then applied for your spinner. Now I will… Read More »