在新的AppCompat库中,我们可以通过以下方式对按钮进行着色:
在新的AppCompat库中,我们可以这样给按钮上色:
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/follow"
android:id="@+id/button_follow"
android:backgroundTint="@color/blue_100"
/>
我该如何在我的代码中以编程的方式设置按钮的色调?基本上,我正在尝试根据某些用户输入实现条件着色按钮。