I've 2 activities with ProgressDialog.
First activities code:
@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);
}
And here is screenshot how it look likes.
My second activities code:
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);
}
And here is screenshot how it look likes.
The code is identicals!
And so i have 2 questions:
1. Why there are don't same?
2. How i can make ALL ProgressDialog in my app like on first screenshot?
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">