Use of ProgressBar Widget in android studio

Program is-

public class MainActivity extends AppCompatActivity {
private ProgressBar bar1,bar2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        bar1=(ProgressBar)findViewById(R.id.progressBar3);
        bar2=(ProgressBar)findViewById(R.id.progressBar4);
    }

    public void perform(View view)
    {
        bar1.setIndeterminate(true);
        bar2.setIndeterminate(true);

    }
}

Leave a Reply