Displaying ListViews of two tables in single parent layout in Android?

There's no need to use separate ListViews/CursorAdapters, just do a JOIN on your tables for the data you want, and you'll get a single Cursor back. Then you only have to deal with one ListView and one adapter.

You can create a layout like this (two equal sized lists in a vertical LinearLayout): Then you just use them in your activity: public void onCreate(Bundle bundle) { super. OnCreate(bundle); setContentView(R.layout. Your_layout); ListView list1 = (ListView) findViewById(R.id.

List1); list1. SetAdapter(...); ListView list2 = (ListView) findViewById(R.id. List2); list2.

SetAdapter(...); } Maybe you could insert a colored line between those two list so the user doesn't confuse the list as a single one.

This is not a good idea as the UI will be too small in landscape mode. – Ravi Vyas Oct 4 at 2:47 Than you could provide a alternative layout for landscape with two lists side by side. – Knickedi Oct 4 at 8:44.

You can create a single adapter which will query both the sources and combine the data and then display it using a single listview.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions