implement a spinning activity indicator similar to iOS in Android

后端 未结 4 789
慢半拍i
慢半拍i 2021-02-02 02:58

I am trying to implement the spinning activity similar to the the one I have placed below in Android. I believe I should use the ProgressDialog. My issue arises from how to actu

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-02 03:40

    You are looking for progressDialog i believe. This link can you set you start with it.

    http://www.helloandroid.com/tutorials/using-threads-and-progressdialog

     pd = ProgressDialog.show(this, "Working..", "Calculating Pi", true,
                                    false);
    private Handler handler = new Handler() {
                    @Override
                    public void handleMessage(Message msg) {
                            pd.dismiss();
                            tv.setText(pi_string);
    
                    }
            };
    

提交回复
热议问题