Hello
I am trying to design a UI which utlizes two ListViews on the screen
at the same time.
Is this possible ?
So here is a quick example of how I was intending to do this.
1) Create an XML which positions 2 ListViews one onto of the other
each ListView having there own ID
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="198px"
>
</ListView>
<ListView
android:id="@+id/ListView01"
android:layout_width="192px"
android:layout_height="215px"
>
</ListView>
2) Create two string arrays and populate each listview via
ArrayAdapter
private String[] mStrings = {
"Abbaye de Belloc", "Abbaye du Mont des Cats", "Abertam",
"Abondance", "Ackawi",
"Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l
Pitu", "Airag", "Airedale",
"Aisy Cendre"};
private String[] mStrings2 = {"dsds", "qwqwqq", " dsdsdsd sdsdsds
", "dsdsds sdsds"};
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
setListAdapter(new ArrayAdapter<String>(this, R.layout.row,
R.id.label, mStrings));
setListAdapter(new ArrayAdapter<String>(this, R.layout.frow,
R.id.ListView01, mStrings2));
}
This does not work.
Can anyone advise ?
Thanks !!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---