Tuesday, June 8, 2010

[android-developers] ProgressDialog BackGround

Hello All,
I would like to know the possibilities of changing the background
Image/color of aProgressDialog?

I already tried it with a class that extends ProgressDialog and
tried to set the background, but it did not do it for the whole
Dialog(Window), only the part that has the Message get painted and not
the Bigger Container(Title+Message).

Here is the Code Snippet

mDefaultDialog = new
Dialog(mContext);
mDefaultDialog.setContentView(R.layout.progress_dialog_background);
mDefaultDialog.setTitle("Custom Dialog");
TextView text = (TextView) mDefaultDialog.findViewById(R.id.text);
text.setText("Hello, this is a custom dialog!");

Layout file

<LinearLayout
xmlns:android="http://
schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="horizontal"

android:background="@drawable/red">
<TextView android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Details"
android:textColor="#FFF"
android:textAppearance="@style/ScreenTitle" />
</LinearLayout>


Regards
V. Ramkumar.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment