2012-08-20 5 views
0

텍스트와 테이블이 포함 된 Android App 용 LinearLayout을 만들고 싶습니다. TextView가 표시되지만 TableLayout이 숨겨져 있거나 이와 비슷합니다.테이블에 레이아웃의 내용이 표시되지 않습니다.

나는 무엇이 문제인지 알 수 없다.

은 여기 내 레이아웃의 일부 코드이다 :

<LinearLayout 
    android:id="@+id/ListWrapper" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:gravity="center_vertical" 
    android:orientation="horizontal" 
    android:layout_gravity="top" 
    android:background="@color/listBackground" > 

    <TextView 
     android:id="@+id/aboutScreenMainText" 
     android:text="@string/helpPage.mainText" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textSize="18dp" 
     android:layout_marginTop="5dp" 
     android:layout_marginLeft="5dp" 
     android:layout_gravity="top" 
     android:textColor="#000" /> 

    <TableLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical"> 

     <TableRow 
      android:layout_width="fill_parent" 
      android:layout_height="50dp"> 
      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/helpPage.addNoteText" /> 
      <View 
       android:layout_width="fill_parent" 
       android:layout_height="1dp" 
       android:background="@color/mainTextColor"> 
      </View> 
     </TableRow> 
    </TableLayout> 

</LinearLayout> 
+0

숨겨진 것은 무엇을 의미합니까? TableLayout에는 자체적으로 표시 할 내용이 없습니다. 당신이보고 싶은 경계입니까? –

+0

TextView와 TableLayout을 하나의 액티비티에 표시하고 싶습니다. 문제는 TextView 만 표시되고 TableLayout이 표시되지 않는다는 것입니다. – snix

+0

좋아, 나는 실수를 발견했다. 바깥 쪽 LinearLayout의 방향이 "수평"이었습니다. 이 속성으로는 작업 할 수 없습니다. – snix

답변

0

문제의 해결책은 너무 쉬웠다) 레이아웃의 방향은 "수평"및 "수직"아니었다.

관련 문제