更改方向后,viewPager会在屏幕底部留下空格

时间:2016-04-22 10:35:02

标签: android

当我旋转屏幕然后CoordinatorLayout在屏幕底部留下空白区域时,如果有人有解决方案,请帮帮我

CRS-ISAU-RPV#3430_Dedalus_Conc.ok.erto_AOTreviglio.doc

图片为here

1 个答案:

答案 0 :(得分:0)

Whenever we load list items then list item's xml's height should be "wrap_content" if we take match_parent then it will take empty white space.
<?xml version="1.0" encoding="utf-8"?>
<layout
    xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#999999"
                android:textSize="12sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#999999"
                android:textSize="12sp" />
        </LinearLayout>

   </layout>