Progress Bar is not visible

TripleDoubleTripleDouble BGMember ✭✭✭

I have a progress bar with animation.

I need to be visible when sent button is pressed and then some work to be done.

I set the mProgressBar.Visibility = ViewStates.Invisible in protected override void OnCreate(Bundle savedInstanceState)
and when i press sent button set to mProgressBar.Visibility = ViewStates.Visible;

But progress bar is visible when work has been done.

Any ideas ?

This is xml for progress bar

Tagged:

Best Answer

  • TripleDoubleTripleDouble BG ✭✭✭
    Accepted Answer

    I found the solution.

    It must be using another thread.

Answers

  • TripleDoubleTripleDouble BGMember ✭✭✭
    Accepted Answer

    I found the solution.

    It must be using another thread.

  • LjusnanLjusnan DEMember ✭✭✭

    Hi, just a small tip, you can use Tasks with await to do this.

    Like this:
    RunOnUiThread(() => progressDialog.Show());
    await Task...
    RunOnUiThread(() => progressDialog.Dismiss());

Sign In or Register to comment.