【发布时间】:2018-02-23 03:34:22
【问题描述】:
我正在使用 Android 支持库版本 27.0.2。在 API 23 上测试。Android selectableItemBackgroundBorderless 曾经是圆形。但就我而言,它是平方的,我不知道出了什么问题。
`<RelativeLayout
android:id="@+id/vgSharePostHeader"
android:layout_width="match_parent"
android:background="@color/white"
android:layout_height="@dimen/clickable_size_48">
<ImageButton
android:id="@+id/ibSharePostCloseDialog"
android:layout_width="@dimen/clickable_size_32"
android:layout_height="@dimen/clickable_size_32"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/item_gap_l"
android:background="?attr/selectableItemBackgroundBorderless" << HERE
android:src="@drawable/ic_close_black_24dp"
android:tint="@color/gray_text" /> ...
结果如下图所示:
预期结果应为 PIC 2
【问题讨论】:
-
它看起来已经越界了。您在哪个 API 级别上进行了测试?
-
显示您的代码。
-
显示你的xml代码
-
我已经更新了我的问题。
-
你解决了这个问题吗?
标签: android material-design android-imagebutton