아래와 같이 했는데 버튼도 안나오고..--; 하단으로 해도 안맞춰지네요..벌써 4시간째 ㅠㅠ..코딩보다 UI작업이
이렇게 어려울줄이야..ㅠㅠ
위에 텍스트 내용 나오고 버튼은 맨하단에 고정으로 박히도록. 하고 싶네요..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight ="1"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="테스트입니다."
android:textSize="18dip"
></TextView>
<Button
android:id="@+id/withdrawal_choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true"
android:text="확인"
android:onClick="Confirm" />
</LinearLayout>
</LinearLayout>
이해가기가 조금 어려운데요.
이해가 가는부분은 레이아웃으로 텍스트뷰와 버튼을을 감싸서 weight를 주라고 해서 아래와 같이 했는데 맞는건지요?
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight ="1"
><TextView
android:layout_width="fill_parent"
android:layout_height="200px"
android:gravity="center"
android:text="테스트입니다."
android:textSize="18dip"
></TextView>
<Button
android:id="@+id/withdrawal_choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true"
android:text="확인"
android:onClick="goWithdrawalChoice" />
</LinearLayout>
아뇨 텍스트뷰를 레이아웃으로 싸고 버튼도 레이아웃으로 싼 다음 텍스트뷰 감싼 레이아웃의 weight를 9 버튼감싼 레이아웃의 weight를 1정도로 두라는 말이었습니다.
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight ="9"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="200px"
android:gravity="center"
android:text="테스트입니다."
android:textSize="18dip"
></TextView>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight ="1"
>
<Button
android:id="@+id/withdrawal_choice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true"
android:text="확인"
android:onClick="goWithdrawalChoice" />
</LinearLayout>




relative로 버튼 먼저 그리고 텍스트뷰 넣으시던지 텍스트뷰와 버튼을 레이아웃으로 감싸서 weight주시던지 텍스트뷰 세로를 원하는만큼 고정시키던지 하면 되겠네요.