按钮上的文字,背景色的动态变化的xml放在res/drawable里,

现在我就说静态的xml文件吧。 res/values/colors.xml

<?xml version="1.0" encoding="utf-8"?> <resources>     <color name="white">#ffffff</color>      <color name="black">#000000</color> </resources>

在main.xml文件的组件中用 android:textColor="@color/white"使用

 

本来再想找找相关的资料,发现可以用的东西特别的少,也就只能先用用了。

相关文章:

  • 2021-06-25
  • 2022-12-23
  • 2021-10-18
  • 2021-08-26
  • 2021-09-15
  • 2021-07-20
  • 2021-07-16
  • 2022-01-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-05-19
  • 2021-06-04
  • 2021-06-21
相关资源
相似解决方案