我正在尝试更改 Material 设计更好的微调器的颜色,但没有任何效果,我尝试将其更改为在颜色中定义的颜色或通过定义样式并在主题中使用它:
android:theme="@style/TextLabel"
但没有任何帮助。
<com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner
android:id="@+id/some"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Range"
android:textColorHint="@color/colorHint"
app:met_floatingLabel="normal" />
最佳答案
使用这个:
app:met_textColorHint="@color/colorHint"
编辑: 您可以根据需要使用这些属性中的任何一个:
<attr name="met_baseColor" format="color" />
<attr name="met_primaryColor" format="color" />
<attr name="met_floatingLabel">
<enum name="none" value="0" />
<enum name="normal" value="1" />
<enum name="highlight" value="2" />
</attr>
<attr name="met_errorColor" format="color" />
<attr name="met_minCharacters" format="integer" />
<attr name="met_maxCharacters" format="integer" />
<attr name="met_singleLineEllipsis" format="boolean" />
<attr name="met_minBottomTextLines" format="integer" />
<attr name="met_helperText" format="string" />
<attr name="met_helperTextColor" format="color" />
<attr name="met_accentTypeface" format="string" />
<attr name="met_typeface" format="string" />
<attr name="met_floatingLabelText" format="string" />
<attr name="met_floatingLabelPadding" format="dimension" />
<attr name="met_hideUnderline" format="boolean" />
<attr name="met_underlineColor" format="color" />
<attr name="met_autoValidate" format="boolean" />
<attr name="met_iconLeft" format="reference" />
<attr name="met_iconRight" format="reference" />
<attr name="met_iconPadding" format="dimension" />
<attr name="met_clearButton" format="boolean" />
<attr name="met_floatingLabelTextSize" format="dimension" />
<attr name="met_floatingLabelTextColor" format="color" />
<attr name="met_bottomTextSize" format="dimension" />
<attr name="met_floatingLabelAlwaysShown" format="boolean" />
<attr name="met_helperTextAlwaysShown" format="boolean" />
<attr name="met_floatingLabelAnimating" format="boolean" />
<attr name="met_textColor" format="color" />
<attr name="met_textColorHint" format="color" />
我用的是:
app:met_baseColor="@color/black"
app:met_floatingLabel="highlight"
app:met_primaryColor="@color/colorPrimary"
app:met_floatingLabelTextColor="@color/black"
app:met_textColor="@color/black"
app:met_textColorHint="@color/black"
app:met_underlineColor="@color/black"
关于android MaterialBetterSpinner 提示颜色不会改变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42363120/