2013-06-26 2 views

답변

0

당신은 레이아웃의 유형을 달성하기 위해 RelativeLayout를 사용할 수 있습니다.

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    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:background="#00FFFF" 
     android:orientation="vertical" > 
    </LinearLayout> 

    <LinearLayout 
     android:layout_width="200dp" 
     android:layout_height="300dp" 
     android:layout_alignParentBottom="true" 
     android:layout_alignParentLeft="true" 
     android:background="#FF0000" 
     android:orientation="vertical" > 
    </LinearLayout> 

</RelativeLayout> 
2

이 모양의 Layout 유형은 사용할 수 없습니다. 그러나 당신은 약간 속임수를 쓰고 사용자가 그렇게 생각할 수 있습니다. 레이아웃 B의 컨텐트를 원하는 방식으로 설정하면됩니다.

0

Krrishnaaaa의 대답과 같이 겹치는 레이아웃이 없어지지 않습니다.

small fragment

horizontal full width fragment

:

를 사용하면 다음과 비슷한 일을 시도 할 수있다 유지하려는 Views 내용에 따라 별도의 두 가지로 조각 B 분할 곳

관련 문제