How can I embed my listview in a layout that I have already created? For example in my_layout.xml I have something like:
<linear layout>
<textview>
<*my list view goes here*>
<linear layout>
I created a List Activity like so:
public class HelloListView extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, COUNTRIES));
ListView lv = getListView();
lv.setTextFilterEnabled(true);
}
}
Thanks!
your xml my_layout.xml:
and your java file:
}
hope helping you