2011-05-05 12 views
0

나는이 같은 레이아웃 싶습니다안드로이드 레이아웃 디자인 도움말

<?xml version="1.0" encoding="utf-8"?> 
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_gravity="fill" android:layout_height="fill_parent" android:layout_width="fill_parent"> 
    <TableRow android:visibility="invisible" android:layout_height="wrap_content" android:layout_width="wrap_content"> 
     <ScrollView android:id="@+id/scvNotes" android:layout_width="fill_parent" android:layout_height="wrap_content"> 
      <LinearLayout android:id="@+id/lilNotes" android:layout_height="wrap_content" android:layout_width="wrap_content"> 

      </LinearLayout> 
     </ScrollView> 
    </TableRow> 
    <TableRow android:layout_width="fill_parent" android:layout_height="fill_parent"> 
     <ViewFlipper android:id="@+id/vflVisual" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="fill"> 
      <WebView android:id="@+id/wvFirst" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="fill"> 
      </WebView> 
      <WebView android:id="@+id/wvSecond" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="fill"> 
      </WebView> 
     </ViewFlipper> 
    </TableRow> 
    <TableRow android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content"> 
     <ScrollView android:id="@+id/scvPages" android:layout_width="wrap_content" android:layout_height="wrap_content"> 
      <LinearLayout android:id="@+id/lilPages" android:layout_height="wrap_content" android:layout_width="fill_parent" android:visibility="invisible"> 

      </LinearLayout> 
     </ScrollView> 
    </TableRow> 
    <TableRow android:layout_height="wrap_content" android:layout_width="wrap_content"> 
     <LinearLayout android:id="@+id/lilToolbar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> 
      <ImageView android:id="@+id/btnLibrary" android:src="@drawable/libreria" android:layout_height="44px" android:layout_width="28px"> 

      </ImageView> 
     </LinearLayout> 
    </TableRow> 
</TableLayout> 

을하지만 두 TableRow 볼 수있는 레이아웃을 생성하고, WebViews ... 두 스크롤 가능 목록은 도구 모음에서 옵션을 선택하여 사용자가 필요로하는 경우 보이지 않아야하며 표시되어야합니다. 문제를 해결하기 위해 어떤 레이아웃을 사용해야합니까? 미리 감사드립니다.

+0

LinearLayout 또는 RelativeLayout을 사용해 보셨나요? – Stephan

+1

RelativeLayout을 선택해야합니다. – Sujit

답변

0

두 번째 테이블 행은 사용 가능한 모든 높이를 사용합니다. android:layout_height="fill_parent" 그래서 두 개의 테이블 행만 표시됩니다. 변경 시도하십시오 android:layout_height="wrap_content"

+0

문제는 두 번째 행에서 wrap_content를 사용하면 사용 가능한 전체 공간을 채우지 않을 것입니다 ... –