【发布时间】:2020-11-15 04:24:18
【问题描述】:
我要更换:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:backgroundTint = "..."
...
android:orientation="horizontal">
与
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/My.Bg.Snackbar.DayNight"
...
android:orientation="horizontal">
和
<style name="My.Bg.Dark" parent="">
<item name="app:backgroundTint">@color/og_background_dark</item>
</style>
和
<declare-styleable name="My">
<!-- The background color. -->
<attr name="app:backgroundTint" format="color" />
</declare-styleable>
</resources>
但我得到一个错误:
error: resource app:attr/backgroundTint not found.
【问题讨论】:
标签: java android xml styles android-appcompat