1. Create a new project in Eclipse File New ⇒ Android ⇒ Application Project and fill the required details. 2. Create required files needed to generate a listview. I am using my defaultactivity_main.xml as listview and created a new xml file for single listitem namedlist_item.xml. Also make sure that you have created a EditText above the listview which will be used to search the listview. activity_main.xml <? xml version = "1.0" encoding = "utf-8" ?> android:layout_width = "fill_parent" android:layout_height = "fill_parent" android:orientation = "vertical" > <!-- Editext for Search --> < EditText android:id = "@+id/inputSearch" android:layout_width = "fill_parent" android:layout_height = "wrap_content" android:hint = "Search products.." android:inputType = "textVisiblePassword" /> <!-- List View --> < ListView android:id = "@+id/list_view" android:layout_width = "fill_parent" android:layout_height = "wrap_content" /> </ LinearLayout >
list_item.xml
|
This Blog is introduce to help Tanzania community get to know more about Android Technology, it help developers to start develop android mobile apps and also the community will know more about the benefit of using Mobile Phone that support android Technology
Monday, July 15, 2013
android tutorial Adding Search Functionality to ListView
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment