我有2個活動ProgressDialog。相同的進步對話框樣式活動
第一活動代碼:
@Override
protected void onPreExecute() {
super.onPreExecute();
mProgressDialog = new ProgressDialog(ShowGuestPhoto.this);
mProgressDialog.setTitle("Загрузка фотографий");
mProgressDialog.setMessage("Загрузка..");
mProgressDialog.setIndeterminate(false);
mProgressDialog.show();
Typeface avenirnextregular= Typeface.createFromAsset(getAssets(), "avenirnextregular.ttf");
((TextView) mProgressDialog.findViewById(getResources().getIdentifier("alertTitle", "id", "android"))).setTypeface(avenirnextregular);
}
而here is截圖是如何看待喜歡。
我的第二個活動代碼:
Override
protected void onPreExecute() {
super.onPreExecute();
mProgressDialog = new ProgressDialog(GiftsActivity.this);
mProgressDialog.setTitle("Подарки");
mProgressDialog.setMessage("Пожалуйста, подождите: обновляется список подарков");
mProgressDialog.setIndeterminate(false);
mProgressDialog.show();
Typeface avenirnextregular= Typeface.createFromAsset(getAssets(), "avenirnextregular.ttf");
((TextView) mProgressDialog.findViewById(getResources().getIdentifier("alertTitle", "id", "android"))).setTypeface(avenirnextregular);
}
而here is截圖是如何看待喜歡。
代碼是相同的!
,所以我有問題:
爲什麼有不一樣嗎?
2.如何讓我的應用程序中的所有ProgressDialog像第一次截圖一樣?
Manifest:
<activity android:name="com.appforwed.ShowGuestPhoto"
android:screenOrientation="portrait"/>
<activity android:name="com.appforwed.GiftsActivity"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
UPD。
<application
android:allowBackup="true"
android:largeHeap ="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:name="com.photolab.Lab">
priviet :)請發表您的AndroidManifest.xml –
@ g2o,女貞! :)發佈。但在我的第三個活動中有同樣的問題(它沒有任何android:主題。 – androidFan
你有沒有爲應用程序設置一些主題? –