Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 5.0 Material主题 ProgressBar颜色更改。 #37

Open
HanteIsHante opened this issue Jan 10, 2018 · 0 comments
Open

Android 5.0 Material主题 ProgressBar颜色更改。 #37

HanteIsHante opened this issue Jan 10, 2018 · 0 comments

Comments

@HanteIsHante
Copy link
Owner

HanteIsHante commented Jan 10, 2018

正确方式:

           <ProgressBar
            android:id="@+id/pull_to_load_footer_progressbar"
            android:layout_width="28dp"
            android:layout_height="28dp"
            android:gravity="center"
            android:layout_marginRight="8dp"
            android:indeterminateTint="@color/huang3_new" 
            android:indeterminateTintMode="src_atop"
         />
  android:indeterminateTint="@color/huang3_new" 
   android:indeterminateTintMode="src_atop"

部分两个属性必须同时添加。

如果引用了v7包可以写在style里

<style name="MyProgressBar" parent="Base.Widget.AppCompat.ProgressBar">     
 <item name="android:indeterminateTint">你自定义的颜色</item>    
   <item name="android:indeterminateTintMode">src_atop</item>   

</style>  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant