android - How to use Two ListView in one screen? -


I want to use two list view in a ListActivity. how can I do this? Please help me create two separate list views in a list activation.

Thanks Lamp

Just create an XML file named XML:

  & lt; Relative layout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "Fill_parent" Android: Orientation = "vertical" Android: layout_height = "fill_parent" & gt; & Lt; ListView Android: id = "@ + id / listView01" Android: layout_width = "fill_parent" android: layout_height = "wrap_content" android: gravity = "center_horizontal" /> & Lt; ListView Android: Android: Android: Android: layout_width = "failparent" Android: layout_height = "rap_sign" android: layout_bel = "@ + ID / list visas 101" Android: Gravity = "center_ horizontal" /> & Lt; / RelativeLayout & gt;  

Load this XML file via: setContentView (R.layout.main); in your on-screen function.

  ListView list1 = ((ListView) findViewById (R.id.ListView01));  

Allows you to access the first list and then you can apply your adapter to list 1. By accessing 1 to 2 you can also access the second ListView.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -