안드로이드 개발 질문/답변
(글 수 45,052)
<LinearLayout
android:id="@+id/aaa"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="aa"
android:layout_gravity="right"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
이렇게 만들었어요
그래서 결과물은
aa 체크박스
이렇게 나오게 하려고 하거든요
그런데 체크박스에다 android:layout_gravity="right"이렇게 적어도 체크박스 위치가 이동이 안되더라구요
지금 결과물은
aa 체크박스 이렇게 나와요...
체크박스를 제일 우측에 옮기는 방법좀 부탁드려요
android:id="@+id/aaa"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="aa"
android:layout_gravity="right"/>
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
이렇게 만들었어요
그래서 결과물은
aa 체크박스
이렇게 나오게 하려고 하거든요
그런데 체크박스에다 android:layout_gravity="right"이렇게 적어도 체크박스 위치가 이동이 안되더라구요
지금 결과물은
aa 체크박스 이렇게 나와요...
체크박스를 제일 우측에 옮기는 방법좀 부탁드려요
2010.10.01 14:17:40
음 예를 들면 이런식으로 하면 어떨까요
<RelativeLayout
android:id="@+id/aaa"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/aaa"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"/><CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
</RelativeLayout>
돌려본 건 아니라서 맞는지는 모르겠습니다 ^^;;