android - Expandable listview setselectionfromTop with animation and padding -
i enabled animation(expand , contract) default android'd expandable listview using https://github.com/idunnololz/animatedexpandablelistview/blob/master/src/com/idunnololz/widgets/animatedexpandablelistview.java.
however, 1 limitation facing move current expanded click top.
i tried setselectionfromtop(groupposition, 0)
here question:
- how add animation bringing top?
- how bring top specific height. lets below 10px top.
any pointers amazing.
note: solution should work sdk 14 , above.
this surely work library used, tired own let me know need sample.
long packedposition = mlistview.getpackedpositionforgroup(groupposition); final long flatpostion = mlistview.getflatlistposition(packedposition); expandablelistview.expandgroupwithanimation(groupposition); new handler().postdelayed(new runnable() { @override public void run() { getactivity().runonuithread(new runnable() { @override public void run() { mlistview.smoothscrolltopositionfromtop((int) flatpostion, homeactivity.list_header_height, 200); } }); } }, 300);
Comments
Post a Comment