gpt4 book ai didi

Android/样式按钮 : Background also behind Drawable left and Drawable right

转载 作者:行者123 更新时间:2023-11-29 18:23:43 25 4
gpt4 key购买 nike

我正在设计一个 Button 的样式,它的宽度可以在程序中通过不同的 Content 改变。我从设计师那里得到了这样的 png 文件:

[Left Border] [Background (just a strip with the gradient)] [Right Border]

我认为我可以像这样分配按钮的属性:

Background: Background.png
Drawable left: LeftBorder.png
Drawable right: RightBorder.png

但它不应该是那样的 ;) 现在 Background.png 从 Drawable Left 开始的地方开始,在 Drawable Right 结束的地方结束。在这种情况下使用这些 Drawable 属性的方式不正确吗?

代码如下:

<Button
android:text="@+id/Button01"
android:id="@+id/Button01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/top_loaction_left"
android:drawableRight="@drawable/top_loaction_right"
android:background="@drawable/top_loaction_bg"></Button>

..

最佳答案

关于Android/样式按钮 : Background also behind Drawable left and Drawable right,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3719423/

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