1、ripple
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/gray1"
>
<item android:id="@android:id/mask"
android:drawable="@drawable/background_about_us"
/>
<item android:drawable="@drawable/background_about_us"/>
</ripple>
background_about_us可以是控件想要的样式
2、安卓room构建错误
Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide room.schemaLocation annotation processor argument OR set exportSchema to false.
查找了很多,基本的解答都是在build.gradle上加上
可参考(Room - Schema导出目录未提供给注释处理器,因此我们无法导出架构_CHCH998的博客-CSDN博客)
android {
...
defaultConfig {
...
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation":
"$projectDir/schemas".toString()]
}
}
}
}
但是我一直还是会有这个提示警告,如果用的是kotlin的话,不妨试试加上
android {
defaultConfig {
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString())
}
}
}
}