어제 올린 글의 내용을 수정하여 다시 올립니다.

답변주신 분들 감사드리며, 저의 경우는 버튼 가로 사이즈가 동일하게 나오질 않아서 다시 글 올립니다.

 

3개의 버튼이 가로로 같은 크기로 보이게 하려고 합니다.

그런데 문제는 버튼마다     "Yes"   "No"  "Cancel" 이라고 표시한다면

버튼에 표시할 텍스트의 길이 때문에 버튼의 사이즈가 다르게 나와 버립니다.

 

layout_weight를  부여해도 마찬가지입니다. (버튼 글자수가 같은 경우는 원하는데로 잘됩니다.) 

(어떤 해상도이던 가로 세로 변환시에도 가로방향 꽉찬 형태로 보여야 합니다.)

width를 수치로 고정할 수 없는 상황입니다.

 

안드로이드 버전은 2.2에서 테스트 중입니다. (에뮬, 기기 같은 증상이고요)

 

참고로 사용한 xml 입니다. 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical" android:layout_width="fill_parent"
 android:layout_height="fill_parent">
 <TextView android:layout_width="fill_parent"
  android:layout_height="wrap_content" android:text="@string/hello" />

 <LinearLayout android:layout_height="wrap_content"
  android:id="@+id/linearLayout1" android:layout_width="match_parent"
  android:orientation="horizontal">

  <Button android:layout_width="wrap_content" android:id="@+id/button1"
   android:text="Yes" android:layout_height="wrap_content"
   android:layout_weight="1"></Button>

  <Button android:layout_width="wrap_content" android:id="@+id/button2"
   android:text="No" android:layout_height="wrap_content"
   android:layout_weight="1"></Button>

  <Button android:text="Cancel" android:id="@+id/button3"
   android:layout_width="wrap_content" android:layout_height="wrap_content"
   android:layout_weight="1"></Button>

 </LinearLayout>

</LinearLayout>