나는 tablelayout을 포함하는 scrollview로 구성된 간단한 안드로이드 레이아웃을 가지고있다. 이 테이블은 올바르게 표시되지만 기본적으로 스크롤 막대 위에 정적 헤더를 추가하여 테이블의 열에 대한 레이블이 화면 상단에 항상 있도록합니다. 그러나 <ScrollView>
위의 내용을 내 레이아웃 파일에 <LinearLayout>
추가하면 모두 사라집니다.scrollview 위의 선형 레이아웃
누구나 내 xml 파일을 잘못 처리 한 것을 발견 할 수 있습니까? 그대로
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="top" >
<LinearLayout
android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableLayout
android:id="@+id/mainTable"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</ScrollView>
</LinearLayout>
, 나는있는 ScrollView 또는 테이블 레이아웃을 볼 수 없습니다,하지만 난 header
있는 LinearLayout을 제거하면, 그것은 잘 표시됩니다.
왜 [LinearLayouts] (http://developer.android.com/resources/tutorials/views/hello-linearlayout.html)에 대한 방향을 설정하지 않았습니까? – Adinia
그게 정확히 내가해야 할 일 이었기 때문에 ... 대답을 만들어서 받아 들일 수있다. –