android - How can I change the Background Resource from the first ListView visible Item? -
i'm noob @ java android.
i searched more question , found can use
listview.getfirstvisibleposition();
to first visible position. how can implement new background resource first visible position?
i tried far.
view = lv.getfirstvisibleposition() get.setbackgroundresource(r.drawable.newconversation);
thanks.
there method in adapter controls list items views
@override public view getview(int position, view convertview, viewgroup parent) {
you can use condition :
if(position == 0) //set background
after convertview
has been inflated
Comments
Post a Comment