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

LAYOUT 설정 문의

0 추천

위와 같이 구현을 할려고 합니다.

기존에는 아래의 5개의 TextView를 세로로 일자로 출력을 하였습니다.

RelativeLayout을 사용하였습니다.

위와 같이 구현을 할려면 어떤 layout을 써야하나요??

쿠쿠부다스 (6,470 포인트) 님이 2017년 9월 22일 질문

1개의 답변

+1 추천
 
채택된 답변
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <LinearLayout android:layout_weight="60" android:layout_height="0dp"
                  android:layout_width="match_parent" >
        <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        ...
         />
    </LinearLayout>
                  
    <LinearLayout android:layout_weight="20" android:layout_height="0dp" android:layout_width="match_parent"
        android:gravity="center"
        android:orientation="horizontal">
        <TextView
            android:layout_width="0dp" android:layout_weight="1"
            android:layout_height="match_parent"
            android:text="TextView"  />
        <TextView
            android:layout_width="0dp" android:layout_weight="1"
            android:layout_height="match_parent"
            android:text="TextView"  />
    </LinearLayout>

    <LinearLayout android:layout_weight="20" android:layout_height="0dp" android:layout_width="match_parent"
        android:gravity="center"
        android:orientation="horizontal">
        <TextView
            android:layout_width="0dp" android:layout_weight="1"
            android:layout_height="match_parent"
            android:text="TextView"  />
        <TextView
            android:layout_width="0dp" android:layout_weight="1"
            android:layout_height="match_parent"
            android:text="TextView"  />
        <TextView
            android:layout_width="0dp" android:layout_weight="1"
            android:layout_height="match_parent"  
            android:text="TextView"  />
    </LinearLayout>
</LinearLayout>
Will Kim (43,170 포인트) 님이 2017년 9월 22일 답변
쿠쿠부다스님이 2017년 9월 22일 채택됨
...