How to Hide and Show List View
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I have a listview. Now i need to hide/ display the listview. Listview is at left corner of my screen and now what i want is when i touch the left corner of my layout my listview should hide and when i touch again it should display, which is exactly similar like hiding seek bar in media player at the time of playing video.I searched but i couldn't find the answer. I can show/hide it in layout but i want listview to show and hide exactly when i touches the left corner of the screen. I tried with on touch listener also, but cannot achieve exactly what i want.As am a newbie, help me in achieving this. Thanks in advance | |||
you can use this way:
gone is a boolean | |||
easy way to achieve is 1) put a button on your corner where you want to(make button transparent if you dont want to make it visible). 2) set click listener on that button. eg.
| |||
object.setVisibility(View.INVISIBLE) or show mateobject.setVisibility(View.VISIBLE) | |||
i think the esyest solution (not the most elegant) for you is to put a trasparent view in the left corner of your layout (above the other) and set a click listener on it. the xml:
the
| ||||
default
Read more
stackoverflow.comm
No comments:
Post a Comment