Minimum scroll amount when programmatically selecting ListItem in android ListView -


is referring to this question:

Changed state 2 to 3 of listitim clicked But its increase has been shown to show more information if the clicked item was the last one on the screen, then the extended list is not fully visible because the new content flows to the bottom of the screen.

My current solution is to call "setSelection (index)", if the last visible list was clicked in. This is the result in a state that the selection is brought to the top of the screen. This is annoying because the listitis goes up from the bottom.

Is there any way to avoid this? This means, there is something to know about the list, which should scroll only the minimum amount of pixels, so that the clicked inmates appear completely? Or do I have to program this functionality on my own?

Click on the Add Custom OnItemClickListener in the list view:

  Public void onItemClick (last adapter scene & lt ;? & gt; parent, see final view, integer position, long id) {see hidden content {view.findViewById (R.id.hiddenContent); HiddenContent.setVisibility (View.VISIBLE); // The layout has not been redone at this point and you do not trust // on the trust. After watching // it would be nice to do something else, after looking at it, see another layout. Post (New Runnabal) (Public is run from zero) {Rect R = New Racket (); See.GradingRect (R); Parent.quick hair recyclingone screen (see, r, false);}}}; }  

Any time you click on the list item to show hidden content, then the list view control will go forward and whatever scrolling is required (which requires scrolling ) To fully show the line.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -