How to center progress indicator in ProgressDialog easily (when no title/text passed along)

后端 未结 8 866
死守一世寂寞
死守一世寂寞 2020-11-28 00:43

When calling progressDialog = ProgressDialog.show(this, null, null, true); usually the developers wants to only show the progress indication image, and usually

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-28 01:05

    If you want to display indeterminate progress bar only.

    ProgressDialog progressDialog = ProgressDialog.show(this, null, null, true, false);
    progressDialog.setContentView(R.layout.progress_layout);
    

    And create a layout xml file with name "progress_layout.xml"

    
    
    
        
    
    
    

提交回复
热议问题