0

現在、これらのボタンはうまく並んでいますが、ボタンの間にはスペースがあります。よりプロフェッショナルなヘッダーのように見せるために、ボタン間にスペースを入れないようにしたいと思います。それは可能ですか?

これが私の現在のレイアウトです:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" 
android:layout_height="fill_parent"
 android:orientation="horizontal"
>


 <Button android:id="@+id/home"
  android:layout_width="0dp" 
  android:layout_height="wrap_content"
  android:layout_weight="1"
  android:text="Home"
  android:textSize="11dp"
/>

<Button android:id="@+id/questions"
 android:layout_width="0dp" 
 android:layout_height="wrap_content"
 android:layout_weight="1"
 android:text="Questions"
 android:textSize="11dp"
android:layout_toRightOf="@+id/home"  />  


 <Button android:id="@+id/businesses"
  android:layout_width="0dp" 
  android:layout_height="wrap_content"
  android:layout_weight="1"
  android:textSize="11dp"
  android:text="Businesses"
  android:layout_toRightOf="@+id/questions"
 />  

 <Button android:id="@+id/learn"
  android:layout_width="0dp" 
  android:layout_height="wrap_content"
  android:layout_weight="1"
  android:text="Learn"
  android:textSize="11dp"
  android:layout_toRightOf="@+id/businesses"
 />  

</LinearLayout>

ありがとう!

4

1 に答える 1

3

ボタンの画像を変更する必要があります。使用しているデフォルトのボタンの背景には、周囲にパディングがあります。そのため、それらの間にスペースが表示されます。

ボタンのユースケースが異なるため、新しい画像が必要になります。

于 2012-05-18T03:19:03.107 に答える