Ich bin migrieren meine Anwendung auf Android 5.0 dh Lollipop Geräte, habe ich Problem in Bezug auf Fortschrittdialog, Es funktioniert perfekt auf Pre Lollipop Geräte, aber auf Lollipop hat es weißen Hintergrund wie im Bild gezeigt Fortschrittsdialog hat einen weißen Hintergrund auf Lollipop Devices,
Aber in pre Lutscher Geräten ist es aus transparentem Hintergrund ist
Unter meinen Code:
progress.xml in Layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@android:color/transparent" >
<ProgressBar
android:id="@+id/progressBar3"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:layout_centerHorizontal="true"
android:indeterminate="true"
android:indeterminateDrawable="@drawable/myprogress"
android:minHeight="48dp" />
</RelativeLayout>
myprogress.xml in ziehbar
<shape
android:shape="oval"
android:useLevel="false" >
<size
android:height="48dip"
android:width="48dip" />
<gradient
android:centerColor="#ff001100"
android:centerY="0.50"
android:endColor="#ffffffff"
android:startColor="#ff000000"
android:type="sweep"
android:useLevel="false" />
</shape>
und in Java Ich mag dieses
public ProgressDialog mProgressDialog;
if (mProgressDialog != null && mProgressDialog.isShowing()) {
mProgressDialog.cancel();
}
mProgressDialog = new ProgressDialog(context);
mProgressDialog.setCancelable(false);
mProgressDialog.show();
mProgressDialog.setContentView(R.layout.progress);
Ändern Sie Ihr App-Thema in der 'style.xml' zu einem dunklen Thema und die Dialoge sollten dunkel sein – M090009
Ich möchte nicht dunkle Dilog, möchte ich diesen weißen Hintergrund als transparent – theLazyFinder