How to change the color of a ProgressDialog

I have a ProgressDialog that looks like this on the Galaxy Tab 10.1 "
enter image description here

and so on on the Galaxy 7 "tab
enter image description here

I want both dialogs to look the same:
The closest I get is to use the following style

<style name="popupStyle" parent="android:Theme.Dialog">
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:background">#FF000000</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>

that leads to enter image description here

So my questions are:
- How can I remove the border around the โ€œWaitโ€ heading? How to change the common border from blue to white? - How to change / reduce the width?

+4
source share
2 answers
 progressDialog = new ProgressDialog(context): progressDialog.show(); TextView tv1 = (TextView) progressDialog.findViewById(android.R.id.message); tv1.setTextSize(20); tv1.setTypeface(yourCustomTF); tv1.setText("your msg"); 

Thus, you can change the text of the message, as well as customize the entire view, getting their components from the displayed ProgressDialog . Remember, you can get the view identifier using findViewById() after progressDialog.show (), because the view is created after show ().

+9
source

Source: https://habr.com/ru/post/1389087/


All Articles