Android Progress Bar Not Showing
ok so what am i missing here? i am trying to start a circular progress bar in a button press and stop it after methods finish the progress bar does not display at all or displays o
Solution 1:
Please try running getVcardString() function in a different thread. Once you are completed with that function, use a handler and run the visibilty change of progress bar from there.
Something Like :
pro.setVisibility(View.VISIBLE);
new Thread(new Runnable() {
@Override
public void run() {
getVcardString();
}
}).start();
Then from getVcardString() function :
privatevoidgetVcardString(){
....
newHandler(Looper.getMainLooper()).post(newRunnable() {
@Overridepublicvoidrun() {
pro.setVisibility(View.GONE);
}
});
}
Post a Comment for "Android Progress Bar Not Showing"