【发布时间】:2019-06-20 11:03:59
【问题描述】:
所以,我正在开发一个 android 应用程序,并且在我迄今为止创建的所有布局中,我都有按钮,而不是 AppCompatButton 或 Material Button 只是简单的按钮,它具有以下属性集:
<Button
android:id="@+id/logout"
android:layout_margin="8dp"
android:text="@string/log_out_button"
android:textColor="#000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/rounded_buttons"
app:layout_constraintBottom_toBottomOf="parent"/>
rounded_buttons.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFF"/>
<corners
android:radius="8dp"/>
</shape>
这会引发保真度警告: 不支持 Paint.letterspacing()。
奇怪的部分是这个 xml 在早期创建的布局中引用时按预期工作。 感谢您提供的任何帮助。
如果在我安装了第三方插件来导入素材图标后开始这样做有帮助:
我已经禁用了这个插件,使缓存无效并重新启动了ide,在某处,它建议更改主题,尝试无济于事,所以将其改回我正在使用的那个。
【问题讨论】:
标签: android android-layout android-drawable android-button