You mean listview with different sections and each sections having a header. Try this link Jeff sharkey adapter.
– Casper Sep 29 '11 at 6:25 You mean rows of both listview should have different layout. Sure that is can be done. – anujprashar Sep 29 '11 at 6:41 I got this working, one place I need it, so it was awesome.
But in another activity I also needed to change the background behind the listview. Here I ended up with putting the second listview in the footerview of the first, and then I code behinde calculting the hight of 1 item * arraylist.size() into dp, and it also worked.So thanks for the repleys. – Casper Oct 3 '11 at 14:55.
You should detect when you arrive at the listview last item. Then, you can change your adapter, change activity or wathever you find appropriate to display the new ListView: Implement an OnScrollListener, set your ListView's onScrollListener and then you should be able to handle things correctly. For example: // Initialization stuff.YourListView.
SetOnScrollListener(this); // ... ... ... @Override public void onScroll(AbsListView lw, final int firstVisibleItem, final int visibleItemCount, final int totalItemCount) { switch(lw.getId()) { case android.R.id. List: final int lastItem = firstVisibleItem + visibleItemCount; if(lastItem == totalItemCount) { // Last item is fully visible. You will then need to start a New activity, maybe... Or change the layout.. I don't know!
} } }.
– Casper Sep 29 '11 at 6:25 Yeah of course, you will just have to change your Adapter. I don't know your application, but personnally, I would start a new Activity with a new Listview... But if your need is to stay in the same activity, just do something like: getListView(). SetAdapter(new YourAdapter(blabla)); – Profete162 Sep 29 '11 at 7:06 @casper: any news?
Is this working? – Profete162 Oct 3 '11 at 10:23 This example was nice.It helped me load new stuff into my listview, when button was hit. So thank you :) – Casper Oct 3 '11 at 14:57.
Yes it is possible. You can define one listview in linearlayout and onether in other linearlayout and put both in parent LinearLayout.
Because I got a scrollproblem right now. I'm also trying to put the last listview inside the footview to the first, but it dosn't work. – Casper Sep 29 '11 at 6:24 android:minHeight="?
Android:attr/listPreferredItemHeight" use this in property of listview it'll solve scrollview problem. – Alex Cooper Sep 29 '11 at 11:15 Okay on both listviews? – Casper Sep 29 '11 at 12:38.
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.