【发布时间】:2012-02-08 20:23:23
【问题描述】:
我有一个简单的目标。我想在我的 FrameLayout 上有一个浅灰色的背景,在它下面有一条黑色的分界线(只在下面,而不是在四周)。到目前为止,我有这个:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" android:gravity="center">
<solid android:color="#EEEEEE" />
</shape>
</item>
<item>
<shape android:shape="line" android:gravity="bottom" >
<stroke android:width="1dip" android:color="#010101"/>
</shape>
</item>
</layer-list>
但它通过中心画线,即忽略重力='底部'位。我该如何解决这个问题?
编辑:这个问题非常老了。选择的答案可能与当前的 API 等一致,也可能不一致。我们鼓励您提出自己的问题,而不是添加到不再受监控的问题中。
【问题讨论】: