I need to make a simple progress dialog with a square with only a circle inside
like this but on an dark back ground. 50x50 dp.
I tried this. But my app is crashes on the show() Display progressdialog without text Android
here is my code : utils.java
protected void startLoading() {
ProgressDialog proDialog = new ProgressDialog(this.getActivity());
proDialog.setCancelable(false);
proDialog.setContentView(R.layout.progressdialog);
proDialog.show();
}
.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@android:color/transparent" >
<ProgressBar
android:id="@+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
</RelativeLayout>
what am i doing wrong?