vsidou
vsidou

Reputation: 125

android progress bar background opacity

I've been using Android ProgressBar quite a lot. The only thing here is for a specific app, i need the ProgressBar not to have a translucent background. I mean you can still see the View behind it as the progressbar is semi-transparent.

Actually I need a full background opacity (black, white, doesn't matter). As long as the panel behind could be hidden using the progress bar.
I cannot just use the Panel behind itself and set a background as it's a Web Panel (where JS stuff is happening).

Thanks for your replies

regards

Upvotes: 2

Views: 6152

Answers (2)

ali shekari
ali shekari

Reputation: 740

Try this:

TextView tv = (TextView) progressDialog.findViewById(android.R.id.message);
tv.setTextColor(Portlet.MessageFontColor);

View v = (View) tv.getParent();
((ScrollView) v).setBackgroundColor(Portlet.messageBackColor);

v = (View) v.getParent();
v.setBackgroundColor(Portlet.messageBackColor);

LinearLayout ll = (LinearLayout) v.getParent();
ll.setBackgroundColor(Portlet.messageBackColor);

Upvotes: 2

vsidou
vsidou

Reputation: 125

I solved my issue. Actually i created my own Custom Progress Bar. An example can be found here : Create you Custom Progress Dialog

Then i just blured the background of the dialog using this approach : Blur Dialog

Hope that helps !

Upvotes: 0

Related Questions