selectableItemBackground不在PreferenceFragmentCompat项(Androidx)中工作
我有一个selectableItemBackground不在PreferenceFragmentCompat项(Androidx)中工作,android,styles,themes,androidx,preference,Android,Styles,Themes,Androidx,Preference,我有一个PreferenceFragmentCompat和一个DrawerLayout和一个NavigationView都在我的main活动中。 我尝试使用?selectableItemBackground更改我的项目背景。它适用于NavigationView中的我的TextView <TextView android:id="@+id/feedback" android:layout_width="match_parent"
PreferenceFragmentCompat
和一个DrawerLayout
和一个NavigationView
都在我的main活动中。
我尝试使用?selectableItemBackground
更改我的项目背景。它适用于NavigationView
中的我的TextView
<TextView
android:id="@+id/feedback"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:clickable="true"
android:focusable="true"
... />
我的首选布局。根是一个线性布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:baselineAligned="false"
android:clickable="true"
android:clipToPadding="false"
android:focusable="true"
...
请给出线性布局中的完整值
android:background="?attr/selectableItemBackground"
请给出线性布局中的完整值
android:background="?attr/selectableItemBackground"
android:background="?attr/selectableItemBackground"