简体   繁体   中英

How can I change the spinner of Window.FEATURE_INDETERMINATE_PROGRESS in ActionBar?

When you set requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); you're able to (activity).setProgressBarIndeterminateVisibility(Boolean.TRUE); and a spinner shows up in the actionbar:

在此输入图像描述

Is it possible to change this spinner ? Or at least make it smaller ?

This is not spinner, but progress bar. You should tune your styles:

<style name="AppTheme" parent="yourparentstyle">
    <item name="android:actionBarStyle">@style/ActionBarWithChangedSpinner</item>
</style>

<style name="ActionBarWithChangedSpinner" parent="@android:style/Widget.ActionBar">
    <item name="android:indeterminateProgressStyle">@style/IndeterminateProgressStyle</item>
</style>

<style name="IndeterminateProgressStyle" parent="@android:style/Widget.ProgressBar">
    <item name="android:indeterminateDrawable">@drawable/your_drawable</item>
    ...
</style>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM