2010-06-21 79 views

回答

1

你应该只能够布置一个EditText和一个按钮彼此相邻,它们之间0填充:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <EditText android:paddingRight="0dp" 
     android:layout_width="wrap_content" 
     android:layout_height="fill_parent"/> 
    <Button android:paddingLeft="0dp" 
     android:layout_width="wrap_content" 
     android:layout_height="fill_parent"/> 
</LinearLayout> 

要获得外侧弯曲角,而不是内部,你可能需要为你的EditText和Button定义一个新的样式。请参阅applying styles and themes.

通常情况下,您需要使用9贴片创建背景图像以获得具有适当缩放比例的弯曲拐角。见Draw 9-patch