Ric*_*ich 7 xml user-interface android
我正在创建一个用作按钮背景的形状.我正在制作一个按钮条,左边的那个按钮左边会有圆角,右边的最后一个按钮右边会有圆角.这非常简单,api文档向您展示了如何做到这一点.但是,当我使用android:topLeftRadius
和时android:bottomLeftRadius
,UI中的结果就好像我放了bottomRightRadius.另一方也是如此.似乎无论谁实现了这个交换了bottomRight和bottomLeft.我将在下面发布一段代码.
是否有一些合理的理由让我可能会失踪?或者,如果这是Android工程师的一个错误,它会在修复后保持向后兼容吗?我想他们必须制作所有新属性以保持旧的有效(leftTop而不是topLeft可能吗?).
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<solid android:color="#99000000" />
<padding
android:top="8dp"
android:left="8dp"
android:right="8dp"
android:bottom="8dp" />
<corners
android:topLeftRadius="8dp"
android:bottomRightRadius="8dp" />
</shape>
</item>
Run Code Online (Sandbox Code Playgroud)