내 현재 레이아웃 스크롤 +의 LinearLayout +의 GridView ..의 GridView 스크롤하지
<ScrollView
android:id="@+id/scrMain"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_gravity="top"
android:fillViewport="true" >
<RelativeLayout
android:id="@+id/rl"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:id="@+id/llGridToday"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" android:visibility="gone">
<FrameLayout
android:id="@+id/FrameLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gridframe" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/calender" >
<TextView
android:id="@+id/txtDateToday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="28" />
</FrameLayout>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:text="Today"
android:textColor="#000" />
</FrameLayout>
<GridView
android:id="@+id/gridToday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_below="@+id/FrameLayout1"
android:layout_weight="1"
android:numColumns="3" >
</GridView>
</RelativeLayout>
<RelativeLayout
android:id="@+id/llGridTomorrow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/llGridToday"
android:orientation="vertical" android:visibility="gone">
<FrameLayout
android:id="@+id/FrameLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<ImageView
android:id="@+id/ImageView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gridframe" />
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/calender" >
<TextView
android:id="@+id/txtDateTomorrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="28" />
</FrameLayout>
<TextView
android:id="@+id/TextView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:text="Tomorrow"
android:textColor="#000" />
</FrameLayout>
<GridView
android:id="@+id/gridTomorrow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_below="@+id/FrameLayout1"
android:layout_weight="1"
android:numColumns="3" >
</GridView>
</RelativeLayout>
<RelativeLayout
android:id="@+id/llGridMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/llGridTomorrow"
android:orientation="vertical" android:visibility="gone">
<FrameLayout
android:id="@+id/FrameLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<ImageView
android:id="@+id/ImageView02"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/gridframe" />
<TextView
android:id="@+id/TextView03"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="2dp"
android:text="This Month"
android:textColor="#000" />
</FrameLayout>
<GridView
android:id="@+id/gridMonth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/FrameLayout1"
android:numColumns="3" android:stretchMode="columnWidth">
</GridView>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
<?xml version="1.0" encoding="utf-8"?>
않습니다
Layout
세
GridViews
가 포함되어 있습니다. 부모님
RelativeLayout
의
GridViews
을 로직으로 표시하고 부풀려서
ImageView
+
TextView
을
GridView
으로 추가했습니다.
괜찮아 보인다. 스크롤링은 없습니다.
내로
GridAdapter
Inflate
당신의GridItems
를 사용하여와한 레이아웃. 특히'ScrollView'는'GridView'와 같이 수직으로 스크롤되는 것들로는 거의 사용되지 않습니다. – CommonsWare
gridviews는 화면이 흐려질 때만 (기본적으로) 스크롤 할 수 있습니다. 그런 다음 홀더를 사용하여 데이터를 보관할 수 있습니다. –