2013-02-27 4 views
2

У меня проблема с моей пользовательской Gridview. Я сделал это в соответствии с этим решением. Custom GridView У меня есть изображение ниже gridview, на всем устройстве он работает правильно, кроме устройств с layout-sw360 (Galaxy Nexus, Galaxy S3). Текст ниже последних двух элементов сетки не отображается полностью. Спасибо за помощь и извините за плохой английскийПользовательский Gridview в ScrollView

problem

Мой Компоновка

<ScrollView 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:scrollbars="none"> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:orientation="vertical"> 

      <cz.xx.xxx.utils.CustomGridView 
        android:id="@+id/productGridview" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:gravity="center_horizontal" 
        android:numColumns="2" 
        android:listSelector="#00000000" 
        android:horizontalSpacing="5dip" 
        android:visibility="visible" 
        android:background="@null" 
        android:scrollbars="none" 
        android:paddingLeft="10dp" 
        android:paddingTop="10dp" 
        android:paddingRight="10dp" 
        android:layout_marginBottom="20dp"> 
      </cz.xxx.xxx.xxx.CustomGridView> 

      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="80dp" 
       android:id="@+id/img_dobre_jistoty" 
       android:layout_gravity="center" 
       android:adjustViewBounds="true" 
       android:clickable="true" 
       android:contentDescription="obr" 
       android:src="@drawable/img_cdjabout" 
       android:onClick="cdjClick" 
       android:layout_marginBottom="5dp" 
       android:layout_marginTop="30dp"/> 

      <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="xxx" 
        android:id="@+id/textView" 
        android:layout_gravity="center" 
        android:layout_marginBottom="10dp" 
        android:layout_marginTop="-3dp" 
        android:singleLine="true" 
        android:textColor="#000000" 
        android:textSize="12dp" 
        android:textStyle="bold"/> 

     </LinearLayout> 
    </ScrollView> 

ответ

0

Вы можете использовать андроида: fillViewport = «истинный» в Scrollview и установить высоту макета в соответствии с вашими содержание ,

Как это:

<ScrollView 
     android:layout_width="fill_parent" 
     android:layout_height="500dp" 
     android:scrollbars="none" 
     android:fillViewport="true"> 
Смежные вопросы