Thursday, February 13, 2014

ListView how the default scroll to the last


            
ListView data more, beyond the screen
However, the default display is at the top, and if the default is to allow ListView scroll to the last plane
Reply:
scrollBy can move
Reply:
cited a floor birdsaction reply:
scrollBy can move

The question is why the final surface rolled it ...
Reply:
 mListView.smoothScrollToPosition (0) ;/ / Move to 
header
mListView.smoothScrollToPosition (listView.getCount () - 1) ;/ / move to the end

Reply:
ListView.setSelection (ListView.getBottom ())
Reply:
Agree on the third floor. .
Reply:
reference to the third floor ncepu307 reply:
 mListView.smoothScrollToPosition (0) ;/ / move to the header 

mListView.smoothScrollToPosition (listView.getCount () - 1) ;/ / move to the end


What is the second listView, is the system's ListView, or mListView, or ListView adapter
I tried all three and found the same basis and not set
 listView.scrollBy (0, listView.getBottom ()); 

Reply:
reference to the third floor ncepu307 reply:
 mListView.smoothScrollToPosition (0) ;/ / move to the header 

mListView.smoothScrollToPosition (listView.getCount () - 1) ;/ / move to the end


What is the second listView, is the system's ListView, or mListView, or ListView adapter
I tried all three and found the same basis and not set
The previous code posted the wrong
 listView.setAdapter (adapter); 
listView.smoothScrollToPosition (adapter.getCount () - 1);

Reply:
references, 4th Floor AMinfo reply:
ListView.setSelection (ListView.getBottom ())


According to your statement, indeed you can scroll to the bottom, the problem is not the last one to scroll to Item where, but the entire LsitView below, resulting in blank areas, appear to be hand-touch
Reply:
ListView.setSelection (position)
Reply:
reference to the 7th floor siyehua reply:
Quote: references to the third floor ncepu307 reply:

 mListView.smoothScrollToPosition (0) ;/ / Move to 
header
mListView.smoothScrollToPosition (listView.getCount () - 1) ;/ / move to the end


What is the second listView, is the system's ListView, or mListView, or ListView adapter
I tried all three and found the same basis and not set
The previous code posted the wrong
 listView.setAdapter (adapter); 
listView.smoothScrollToPosition (adapter.getCount () - 1);


Sorry, wrong place:
 mListView.smoothScrollToPosition (mListView.getCount () - 1) ;/ / move to the end 

Absolute effect
Reply:
listview.setSelection (list.size () -1); list for you to fill in the data
Reply:
Another idea, it displays the first is not on your last Mody, highlighted,,,
Reply:
reference to the 12th floor heaimnmn reply:
change in thinking, it displays the first is your last not on it, reverse display,,, < / blockquote>


I've thought about this, but not here, I do is SMS interface, you see, you know the SMS interface
Reply:
The landlord should know that, in fact, may be maintained by a ListView Item
multi-point screenEverything else is in the exchange of data ===
So, agreed to change the practice of thinking, you can change in the data, people seem to scroll to the end
While the third floor of the method used to set the final
scroll to the list of existing Item
Reply:
SMS interface because it has a sort of search criteria, based on the actual time of ordering, so it's the first time the display is the latest recording
Reply:
I have to do is similar, but I think I want centered item (dynamic), with ListView.setSelectionFromTop (int position, int y) on the line, grabbed a look at the meaning of the parameters is easy to do what you want effect

No comments:

Post a Comment