how to set progress bar unvisible, and when text is writing in my autocomplete to become visible again.android

StackOverflow https://stackoverflow.com//questions/9634339

Question

i have implemented a textwatcher so when i am writing something i want my progress bar to become visible( and ofcourse how to make it unvisible at onCreate)

Was it helpful?

Solution

In order to hide a control such as a ProgressBar in Android use the setVisibility() method like that:

mProgressBar.setVisibility(View.VISIBLE);   // To set it visible

and:

mProgressBar.setVisibility(View.INVISIBLE); // To set it invisible

So just set it to View.INVISIBLE inside your Activity onCreate() method, then set it to View.VISIBLE when you need it to be visible.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top