Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Progress Dialog issue in below android 4.4.4

I am using progress dialog in my android application.It is looking good on android 5.0+.But in below android 4.4.4 it show two layers.I have attached screen shot.I am using style

<style name="AlertDialogCustom" parent="Theme.AppCompat.Dialog">
    <item name="colorAccent">#FFFFFF</item>
        <item name="android:textColorPrimary">#CCCCCC</item>
        <item name="android:background">#E43F3F</item>
</style>

and progress dialogenter image description here

final ProgressDialog progressDialog = new ProgressDialog(SplashActivity.this,
                    R.style.AlertDialogCustom);
            progressDialog.setIndeterminate(true);
            progressDialog.setMessage("Authenticating...");
            progressDialog.show();

How to fix this issue.Please suggest me.

like image 771
Deepak Avatar asked Apr 27 '26 23:04

Deepak


1 Answers

You should replace your import from

import android.app.AlertDialog;

to:

import android.support.v7.app.AlertDialog;

Hope that helps!

like image 62
dlazaro66 Avatar answered Apr 29 '26 21:04

dlazaro66



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!