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

리니어 레이아웃 도와주세요 ㅠㅠ

0 추천

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="horizontal" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="#ff0000"
            android:orientation="vertical" >
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="#00ff00"
            android:orientation="vertical" >

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="#ffff00"
                android:orientation="vertical" >
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="#000000"
                android:orientation="vertical" >
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="#0000ff"
        android:orientation="vertical" >
    </LinearLayout>
 
</LinearLayout>

이 소스를 쳣을 때  나오는 화면과 같은 화면은 나오지만 소스코드는 다르게... 어떻게 안될까요 ㅠㅠ 부탁드립니다...화면 배분 어떻게하는지 전혀 감을 못잡겟습니다.. 코드라도 외울수 있게 좀 부탁드립니다...

 

대장쿄 (110 포인트) 님이 2014년 4월 20일 질문

1개의 답변

0 추천
xml 코드는 다르게 하되 같은 화면을 구성해야하는 이유가 있나요??

제 생각에는 무의미해보이는데.. 그리고 위의 코드는 외우고 뭐고 할게 아니구

이클립스환경이시면 그래피컬 레이아웃에서 레이아웃 배치만 하면 되요
초보개발자ㅠ (33,870 포인트) 님이 2014년 4월 21일 답변
...