Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference for Widget.ProgressBar.Small and Widget.ProgressBar.Small.Inverse

Tags:

android

I try out two different progress bar styles for action bar button, through

refreshMenuItem.setActionView(R.layout.actionbar_indeterminate_progress);

actionbar_indeterminate_progress.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    style="?attr/actionButtonStyle" >
    <ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        style="@android:style/Widget.ProgressBar.Small" />
</LinearLayout>

I had tried Widget.ProgressBar.Small and Widget.ProgressBar.Small.Inverse. However, I do not see any visual difference.

Widget.ProgressBar.Small

enter image description here

Widget.ProgressBar.Small.Inverse

enter image description here

I expect there is an inverse in color but there isn't. Am I missing something?

like image 851
Cheok Yan Cheng Avatar asked Feb 14 '26 00:02

Cheok Yan Cheng


1 Answers

There is a slight difference, but it's difficult to notice at first.

The Widget.ProgressBar.Small style version is intended to be placed over dark backgrounds while the Widget.ProgressBar.Small.Inverse style version is intended to be placed over light backgrounds.

Normally you would probably not notice this. The best way to check it is to put the combinations of the two progress bars on black and white backgrounds and display it a on good display, then you can notice differences on the edges.

like image 184
Tomik Avatar answered Feb 15 '26 14:02

Tomik



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!