Showing posts with label Android Search. Show all posts
Showing posts with label Android Search. Show all posts

Wednesday, December 26, 2012

Search in Custom ListView On Button Click Example


SEARCH IN CUSTOM LISTVIEW ON BUTTON CLICK

SOURCE CODE [main.xml] is

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

                <Button android:text="Search"
android:id="@+id/Button01"
                                android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
                                android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Button>

                <EditText android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
android:text="" android:id="@+id/EditText01"
                                android:layout_toLeftOf="@+id/Button01">
</EditText>

                <ListView android:layout_height="wrap_content"
                                android:layout_below="@+id/EditText01"
android:layout_width="wrap_content"
                                android:id="@+id/ListView01">
</ListView>
                                
</RelativeLayout>

Android - Search in Custom ListView Example


SEARCH IN CUSTOM LISTVIEW

SOURCE CODE [main.xml] is

<?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">

                <EditText android:id="@+id/EditText01"
android:layout_height="wrap_content"
                                android:layout_width="fill_parent"
android:hint="Search">                               
                </EditText>

                <ListView android:id="@+id/ListView01"
android:layout_height="wrap_content"
                                android:layout_width="fill_parent">
</ListView>

</LinearLayout>

Popular Posts