【发布时间】:2015-05-07 08:22:27
【问题描述】:
【问题讨论】:
【问题讨论】:
看来您是对的,并且图片中有带圆角的布局。为此,请使用如下代码:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<stroke android:width="3dip" android:color="#B1BCBE" />
<corners android:radius="10dip"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>
来源: How to make layout with rounded corners..? 和 round corners with border color
在这种情况下,您不会遇到缩放问题。
【讨论】:
您可以使用RelativeLayout 来放置带有描边和文本+ 按钮的背景容器。然后放一个TextView 属性android:layout_alignParentTop=true
<RelativeLayout
...>
<LinearLayout
....
android:background="@drawable/blue_stroke">
//Text + Button
</LinearLayout>
<TextView
...
android:background="@android:color/white"
android:layout_alignParentTop="true"/>
</RelativeLayout>
【讨论】: