custom

n/a

n/a

Android Custom Dynamic Listview –part3

Android simple tutorial for adding data into listview at runtime and change the listview content dynamically.

Android Custom Toast Tutorial

AndroidPeople.com - Going to see how to display a textview in toast using setView() & some more properties of Toast - Custom Toast Notification.

Android Custom Dialog Example

Here we are going to see about, how to display a simple custom dialog example using 2 Textview & 1 Button.

Android Custom Listview Tutorial - Part 2

Moving ahead from first part Custom List view,  we are going to discuss three things.

1.Adding background colors to Listview

2.Adding different Divider color.

3.Triggering action on listview click.

Step 1:

Listview Background Color

Adding Custom Background color to listview . For an elegance look for an application the listview color play a key role.

[sourcecode language="java"]

convertView.setBackgroundColor((position & 1) == 1 ? Color.WHITE : Color.LTGRAY);

[/sourcecode]

Android Custom Listview Tutorial- part 1

The simple android custom listview can assist only a single string, where its not possible to use them on all application. This leads to create custom list view example tutorial .
Step 1:
Add a normal listview in the main.xml layout and make sure u set the layout width as fill parent.
Main.xml

[sourcecode language="xml"]
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">

<TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:text="List of Country &amp; their denotation" android:textStyle="normal|bold" android:gravity="center_vertical|center_horizontal" android:layout_width="fill_parent"></TextView>
<ListView android:id="@+id/ListView01" android:layout_height="wrap_content"
android:layout_width="fill_parent">
</ListView>
</LinearLayout>

[/sourcecode]

Hide the title bar in Android

When we develop a game or some other application, we may need to show a full page (screen) for users.

In the below image, the Alarm Clock is the title showing in the title bar.

To remove this title bar we need to use,

[sourcecode language="java"]
@Override
public void onCreate(Bundle savedInstanceState) {
super.

Set icon for title bar in Android

In Android we have the facility to set an icon for the title bar.

In the below image the title bar contains only the title.
Title name is Iconic Memory

To set an icon in the title bar use the below piece of code...

[sourcecode language="java"]
@Override
public void onCreate(Bundle savedInstanceState)

Syndicate content