我解決了這個通過使用列表層,結合兩種形狀,其中一個放置在底部
optionscreen_bottomrectangle.xml高度1DP的:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is the line -->
<item>
<shape>
<solid android:color="#535353" />
</shape>
</item>
<!-- This is the main color -->
<item android:bottom="1dp">
<shape>
<solid android:color="#252525" />
</shape>
</item>
</layer-list>
然後,在佈局/主.xml文件
<TextView
android:id="@+id/bottom_rectangle"
android:background="@drawable/optionscreen_bottomrectangle"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_below="@id/table_options"
android:layout_above="@id/exit_bar"/>
填補table_options之間的差距,並與背景,只是exit_bar打印1DP前行exit_bar。這對我來說是訣竅,我希望它能幫助別人。
回答編輯按照正確的順序放置圖層。 Thx亞歷克斯!
如果您真的想親自回答問題,如果您不想發佈答案,可能會非常方便。當其他開發者看到已經有一個答案的時候(在這種情況下它實際上並不是),他們並不傾向於回答。 – MrSnowflake 2010-03-30 16:35:33
我用有用的信息編輯了答案。 – Maragues 2010-03-31 08:13:07