У меня есть этот код для отображения диалогового окна прогресса:
@Override
public void onPreExecute() {
if(progress == null)
progress = ProgressDialog.show(MainActivity2.this, null , null);
progress.setContentView(R.layout.progressbar_activity);
}
Это мой макет progressDialog.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Widget.ProgressBar.Small.Inverse"
android:layout_marginRight="5dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loading" />
</LinearLayout>
И это мой основной макет Activity:
<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="@android:color/white"
android:orientation="vertical"
tools:context=".MainActivity" >
<LinearLayout
android:id="@+id/tittle_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@android:color/black"
android:gravity="center"
android:orientation="vertical"
android:paddingTop="6dip" >
<Button
android:id="@+id/start_progress"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello_world" />
</LinearLayout>
</RelativeLayout>
Как видите, цвет фона белый.
Когда я нажимаю кнопку в mainActivity, появляется диалоговое окно прогресса, но цвет фона страницы становится серым.
-------->
Я хочу, чтобы по умолчанию он был белым, а текст диалогового окна прогресса - черным. что мне не хватает?