开发者

How to show/hide item in listview..

开发者 https://www.devze.com 2023-02-01 13:22 出处:网络
I have a list view, and one of its items I set android: visibility =\"gone \". I want when I click an item from the ListView, I hide the item becomes visible, and if the item had alre开发者_如何学Goad

I have a list view, and one of its items I set android: visibility ="gone ". I want when I click an item from the ListView, I hide the item becomes visible, and if the item had alre开发者_如何学Goady seen, when I click the ListView return, the item was going to hide anymore.


To get a helpful answer to your question you might want to put some more effort into phrasing it. I'm not quiet sure what you are trying to do but I hope the following helps:

You can get an items visibility by calling

View.getVisibility();

and then compare it to

View.INVISIBLE or View.VISIBLE

and then setting the visibility according to your needs with

View.setVisibility(View.VISIBLE) or View.setVisibility(View.INVISIBLE)
0

精彩评论

暂无评论...
验证码 换一张
取 消