zhanghai / MaterialProgressBar

Material Design ProgressBar with consistent appearance
Apache License 2.0
2.21k stars 279 forks source link

Color modification does not take effect #52

Closed qssq666123 closed 7 years ago

qssq666123 commented 7 years ago

Color modification does not take effect is still the default black, when I delete the Android studio after the preview display and also display the color, but the operation is still the same, the default black style

<me.zhanghai.android.materialprogressbar.MaterialProgressBar style="@style/Widget.MaterialProgressBar.ProgressBar.Large" app:mpb_secondaryProgressTint="@color/colorThemeColor" app:mpb_progressTint="@color/colorThemeCyan" app:mpb_indeterminateTint="@color/colorRed" app:mpb_progressBackgroundTint="@color/colorThemeCyan" app:mpb_progressTintMode="screen" app:mpb_indeterminateTintMode="multiply" android:layout_width="wrap_content" android:layout_height="wrap_content" android:indeterminate="true" app:mpb_progressStyle="circular" app:mpb_setBothDrawables="false" app:mpb_showProgressBackground="true" app:mpb_useIntrinsicPadding="true" />

qssq666123 commented 7 years ago

我还以为你是外国人,好吧,直接说吧,就是无法修改颜色,我只想要一个类似progressbar,然后园进度转而已 结果呢,无法修改颜色,一直是黑色。无语死了

qssq666123 commented 7 years ago

demo也跑不起来,因为黄牛刀项目一直没下载下来,愁死我了

zhanghai commented 7 years ago

为你试了一下,

<me.zhanghai.android.materialprogressbar.MaterialProgressBar
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:indeterminate="true"
    app:mpb_indeterminateTint="@android:color/holo_red_light"
    style="@style/Widget.MaterialProgressBar.ProgressBar.Large" />

可以工作。

不行的话是你的项目的其他问题。例如你可以自己重新建立一个干净的项目试试上面这段。

qssq666123 commented 7 years ago

是不是主题的问题??被主题控制了?

qssq666123 commented 7 years ago

你的demo我跑起来了可惜 里面的圆形进度也没提供修改颜色的参考

zhanghai commented 7 years ago

设置了 mpb_indeterminateTint 就会覆盖主题颜色。你可以用之前我那段代码填进 sample 里。