android - How to highlight item currently selected in a gallery? -
i've come problem. need highlight selected item within gallery. i've tried changing appearance of selected view through method:
@override public void onitemselected(adapterview<?> parent, view view, int position, long id) the second parameter of view current selected view, , i'm trying in case, increase size of text. doesn't work, not if call invalidate in selected item or in entire gallery.
this code use change textview text size
textview textview = (textview)view; textview.settextsize(50, typedvalue.complex_unit_sp); textview.invalidate(); do know how this? thanks
try statelistdrawable - looks apt situation.
update: have reversed parameters in settextsize. should be:
textview.settextsize(typedvalue.complex_unit_sp, 50);
Comments
Post a Comment