마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

리니어 레이아웃 안에 보기좋게 정렬이 안되네요 ㅠ

0 추천

안녕하세요 ..

한 렐러티브 레이아웃의 한줄에서  왼쪽은 텍스트뷰로 성별과

오른쪽은 라디오그룹으로 묶인 남,녀 라디오버튼을 만드는데..

자꾸 위치가 떨어지게 만들어져서 너무 힘듭니다 ㅠ ㅠ

이것때문에 계속 고민을 겪고 있는데 도움을 좀

부탁드리고자 이렇게 글을 올렸습니다 ㅠ ㅠ

 도와주세요.. 어디가 잘못되었는지 .. 꿈쩍도 안합니다.

 

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"

    android:layout_marginTop="10dp">

    <TextView
        android:id="@+id/Text_register_Gender"
        android:layout_width="100dp"
        android:layout_height="wrap_content"

        android:layout_centerVertical="true"

        android:layout_marginLeft="20dp"

        android:textStyle="bold"
        android:textColor="#000000"
        android:textSize="15sp"
        android:text="이름"/>

    <RadioGroup
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/radioGroup"
        android:layout_gravity="center_horizontal"
        android:orientation="horizontal"

        android:weightSum="1"
        android:layout_alignBottom="@+id/textView7"
        android:layout_toRightOf="@+id/textView7"
        android:layout_alignTop="@+id/textView7"
        android:layout_alignRight="@+id/editText7"
        android:layout_alignEnd="@+id/editText7">

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="   "
            android:id="@+id/radioButton"
            android:layout_weight="0.53" />

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="   "
            android:id="@+id/radioButton2"
            android:layout_weight="0.53" />

    </RadioGroup>

</RelativeLayout>
Kind카인드 (3,600 포인트) 님이 2016년 10월 20일 질문

1개의 답변

0 추천
 
채택된 답변

xml 내 attribute 들이 어떤 의미인지 찾아보시기 바랍니다. 

 

<TextView
    android:id="@+id/Text_register_Gender"
    android:layout_width="100dp"
    android:layout_height="wrap_content"
    android:textStyle="bold"
    android:textColor="#000000"
    android:textSize="15sp"
    android:text="이름"/>

<RadioGroup
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/radioGroup"
    android:orientation="horizontal"
    android:layout_toRightOf="@id/Text_register_Gender"
    >

    <RadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="   남"
        android:id="@+id/radioButton"
        android:layout_weight="0.53" />

    <RadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="   여"
        android:id="@+id/radioButton2"
        android:layout_weight="0.53" />

</RadioGroup>

 

 

aucd29 (218,390 포인트) 님이 2016년 10월 21일 답변
Kind카인드님이 2016년 10월 21일 채택됨
해결했습니다. 감사합니다.
...