I am using custom ProgressDialog
in my application, I am able to make it custom but I also want to remove the upper border or window of progressDialog
.
In styles.xml
I define customDialog
as
<style name="AppTheme" parent="android:Theme.Light" />
<style name="CustomDialog" parent="@android:style/Theme.Dialog">
<item name="android:background">#7BC047</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:windowBackground">@null</item>
<item name="android:windowFrame">@null</item>
</style>
For removing the parent window I am setting windowBackground
to null and windowFrame
to null but it did't work for me.
Currently my custom progress dialog look like that in the image given below
I am using this code to set the style of progressDialog
.
private void showProgressDialog() {
progressDialog = new ProgressDialog(this,R.style.CustomDialog);
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progressDialog.setMessage("Logging in. Please wait.");
progressDialog.show();
}
So,help me regarding this issue any help should be really appreciated.