모든 디바이스에서 progressDar 내에서 progressBar의 위치가 다릅니다. 그래서 그것을 사용자 정의해야합니다.사용자 정의 progressDialog를 작성하는 방법
내가 이렇게 할 때 :
public class CustomProgressDialog extends ProgressDialog {
public CustomProgressDialog(Context context) {
super(context);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.progress_fragment_dialog);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:layout_width="wrap_content"
android:layout_gravity="center"
android:background="@color/colorPrimary"
android:layout_height="match_parent"
android:id="@+id/progressBar" />
</LinearLayout>
이 진행 대화 상자는 대화하지 않고 단지의 ProgressBar를 보여줍니다. 하지만 대화가 필요합니다.
http://islandofatlas.net/2014/03/29/android-custom-progress-dialog.html, 그 I를 뜻 –