Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show/hide listview

I am using listview in my activity. Now i need to hide the listview for a particular period of time and then it needs to display. Its similar to our video players where seekbars while hide automatically and when the user touches it will get display na similar i need to achieve in my activity. Instead of seekbar i need to hide my listview from the screen.Simply show/hide listviews in alternative touches. Am a newbiew. So Guide me in achieving this. Thanks in advance.

like image 731
AndroidOptimist Avatar asked Sep 06 '13 05:09

AndroidOptimist


1 Answers

Not sure what you want exactly, but to hide any Views in Android, simply set the visibility :)

listview.setVisibility(View.GONE);

or View.INVISIBLE, if you want the view still occupy the space in the screen

listview.setVisibility(View.INVISIBLE);

to make it come back

listview.setVisibility(View.VISIBLE);
like image 171
Jason Leung Avatar answered Oct 11 '22 14:10

Jason Leung