2016-02-27 5 views
0

Я занимаюсь разработкой пользовательского интерфейса для своего приложения. Я использую Android CardView, чтобы содержать кнопки и тексты вместе со списком прокрутки. Когда я прокручиваю вниз, я не вижу нижней части CardView, а нижняя часть карты слегка отсекается клавишами навигации.Нижняя часть Android CardView заблокирована навигационными кнопками

Ниже приведен пример того, что я имею в виду

Top of the card

Bottom of the card

Кроме того, здесь есть XML-код для моего макета

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:orientation="horizontal" 
android:weightSum="3"> 



<ScrollView 
    android:layout_width="match_parent" 
    android:scrollbars="none" 
    android:layout_height="wrap_content"> 

    <android.support.v7.widget.CardView android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:scrollIndicators="none" 
     android:layout_margin="8dp"> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 


      <RelativeLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_weight="1"> 

       <Button 
        android:layout_width="wrap_content" 
        android:layout_height="300dp" 
        android:text="New Button" 
        android:id="@+id/button" 
        android:layout_alignParentTop="true" 
        android:layout_centerHorizontal="true" /> 

       <Button 
        android:layout_width="wrap_content" 
        android:layout_height="300dp" 
        android:text="New Button" 
        android:id="@+id/button2" 
        android:layout_below="@+id/button" 
        android:layout_centerHorizontal="true" /> 

       <Button 
        android:layout_width="wrap_content" 
        android:layout_height="300dp" 
        android:text="New Button" 
        android:id="@+id/button3" 
        android:layout_below="@+id/button2" 
        android:layout_centerHorizontal="true" /> 

       <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:textAppearance="?android:attr/textAppearanceLarge" 
        android:text="Large Text" 
        android:id="@+id/textView" 
        android:layout_below="@+id/button2" 
        android:layout_centerHorizontal="true" 
        android:layout_marginTop="300dp" 
        android:textColor="#4b1313" /> 

      </RelativeLayout> 
      <RelativeLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_weight="1"> 


       <Button 
        android:layout_width="wrap_content" 
        android:layout_height="300dp" 
        android:text="New Button" 
        android:id="@+id/button4" 
        android:layout_below="@+id/button6" 
        android:layout_alignLeft="@+id/button5" 
        android:layout_alignStart="@+id/button5" /> 

       <Button 
        android:layout_width="wrap_content" 
        android:layout_height="300dp" 
        android:text="New Button" 
        android:id="@+id/button5" 
        android:layout_below="@+id/button4" 
        android:layout_centerHorizontal="true" /> 

       <Button 
        android:layout_width="wrap_content" 
        android:layout_height="300dp" 
        android:text="New Button" 
        android:id="@+id/button6" 
        android:layout_alignParentTop="true" 
        android:layout_alignLeft="@+id/button4" 
        android:layout_alignStart="@+id/button4" /> 
      </RelativeLayout> 
      <RelativeLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_weight="1"> 



      </RelativeLayout> 
     </LinearLayout> 
    </android.support.v7.widget.CardView> 
</ScrollView> 

ответ

0

Дайте маржу в основной LinearLayout

marginandroid:layout_marginBootom="10dp" 
+0

Не похоже, чтобы исправить эту проблему, ничего не изменилось, когда я добавить его в основной макет – Michael

+0

поддавки обивка затем – Dayvon

Смежные вопросы