【发布时间】:2014-02-01 15:28:56
【问题描述】:
我正在尝试使用自定义背景进行自定义进度对话框。我找到this 自定义进度对话框的示例,但我需要将其背景颜色从黑色更改为蓝色。 我试图改变这一行
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:background">@android:color/transparent</item>
在该示例中的 styles.xml 中,但这不是我需要的...
我做错了什么?
我试图以这种方式更改您的 xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#3300CC"
tools:context=".MainActivity" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="#3300CC"
android:orientation="horizontal" >
<ProgressBar
android:id="@+id/progressBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>
但它的底线没有填充颜色
现在有什么问题?
我需要这样的对话
【问题讨论】:
标签: android background styles progressdialog