0

I want to set the message with big font in Progress dialog in android.

I am using following code to do so,

 progress_dialog=new ProgressDialog(this);

 progress_dialog.show(About_Us_Activity.this, Html.fromHtml(""), Html.fromHtml("big>Message...</big>"), false);

i used the above code in AsyncTask onPreExecute() method and dismissed on onPostExecute method, the issue is that my progress dialog is running infinitely that means it is not dismissing. what is the problem with my code. there is no error shown in log cat.

Hitesh Kamani
  • 935
  • 10
  • 24

1 Answers1

0

1.Use Custom dialog progress.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center_horizontal" >
 <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+android:id/progress_large"
        android:layout_marginBottom="28dp"
        android:layout_marginLeft="21dp"
        android:layout_toRightOf="@+android:id/progress_large"
        android:text="Loading.."
        android:textSize="15dp"
        android:textStyle="bold" />
   <ProgressBar
        android:id="@+android:id/progress_large"
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" />
</RelativeLayout>

2.calling progress.xml in java file: setContentView(R.layout.progress);

3.In AndroidManifest.xml, inside tag use android:theme="@android:style/Theme.Holo.Dialog"

Santosh Kathait
  • 1,444
  • 1
  • 11
  • 22