Example usage for android.app ProgressDialog setContentView

List of usage examples for android.app ProgressDialog setContentView

Introduction

In this page you can find the example usage for android.app ProgressDialog setContentView.

Prototype

public void setContentView(@NonNull View view, @Nullable ViewGroup.LayoutParams params) 

Source Link

Document

Set the screen content to an explicit view.

Usage

From source file:com.sythealth.fitness.util.Utils.java

public static ProgressDialog customProgressDialog(Context context, String msg) {
    ProgressDialog pd = new ProgressDialog(context);
    pd.show();/*from www. j a  va2 s  . c  o  m*/
    View v = LayoutInflater.from(context).inflate(R.layout.custom_progress_dialog, null);
    TextView tv = (TextView) v.findViewById(R.id.custom_progressdialog_tv);
    tv.setText(msg);
    pd.setContentView(v, new LayoutParams(300, 300));
    return pd;
}