gpt4 book ai didi

android - 9 在 Lollipop 中显示奇怪背景的补丁

转载 作者:太空宇宙 更新时间:2023-11-03 10:18:16 25 4
gpt4 key购买 nike

我最近刚更新到 api 22,我们的 9-patch 按钮开始出现一些奇怪的行为。似乎是另一个按钮或某种边框出现在按钮后面,并在选择按钮时做一种提升动画。

Unselected button Selected button

我指的是您在按钮右端看到的白色部分。

这是 xml。

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:drawable="@drawable/arrow_gray_button"/>
<item android:state_pressed="false" android:state_enabled="true" android:drawable="@drawable/arrow_orange_button"/>
<item android:state_pressed="true" android:state_enabled="true" android:drawable="@drawable/arrow_orange_button_pressed"/>

最佳答案

将此添加到布局中的 Button 以消除这种效果。

android:stateListAnimator="@null"

希望对您有所帮助。

关于android - 9 在 Lollipop 中显示奇怪背景的补丁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31351131/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com