我为动作栏按钮尝试了两种不同的进度条样式
refreshMenuItem.setActionView(R.layout.actionbar_indeterminate_progress);
Run Code Online (Sandbox Code Playgroud)
<?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>
Run Code Online (Sandbox Code Playgroud)
我曾尝试过Widget.ProgressBar.Small和Widget.ProgressBar.Small.Inverse.但是,我没有看到任何视觉差异.


我希望颜色有反转,但没有.我错过了什么吗?
虽然略有不同,但最初很难注意到.
该Widget.ProgressBar.Small风版是为了放置在黑暗的背景,而Widget.ProgressBar.Small.Inverse风版是为了放置在浅色背景.
通常你可能不会注意到这一点.检查它的最佳方法是将两个进度条的组合放在黑色和白色背景上并在良好的显示上显示,然后您可以注意到边缘的差异.