我有ParallaxScrollView,其中包含两个ListViews以及TextViews,它在所有设备中都运行正常但在平板电脑(croma CRXT1125Q)中,最后一个项目在第一个ListView中切断,我也做了平板电脑布局但是我没有成功。请guyz帮忙解决它。 帮助将是欣赏。
我的xml如下所示
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
android:orientation="vertical">
<cutomView.ParallaxScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:scrollbars="none"
android:visibility="gone"
app:parallax_factor="1.9">
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:id="@+id/cardAmount"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorGreyBackground"
android:elevation="@dimen/viewmargin"
card_view:cardPreventCornerOverlap="false"
card_view:contentPaddingLeft="@dimen/negContentPadding"
card_view:contentPaddingRight="@dimen/negContentPadding"
card_view:contentPaddingTop="@dimen/negContentPadding">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<RelativeLayout
android:id="@+id/relPackagePhoto"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imgPackage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY" />
<View
android:id="@+id/mTranspherentView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/trending_gradient_shape" />
<cutomView.TextViewAvenirMedium
android:id="@+id/txtPackageName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/mTranspherentView"
android:layout_centerHorizontal="true"
android:maxLines="2"
android:padding="@dimen/small_margine"
android:singleLine="false"
android:text=""
android:textColor="@color/white"
android:textSize="@dimen/small_font" />
<ProgressBar
android:id="@+id/mProgressBar"
style="?android:attr/progressBarStyleSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/margin_leftt"
android:layout_below="@+id/relPackagePhoto"
android:layout_centerVertical="true"
android:orientation="horizontal"
android:weightSum="3">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<cutomView.TextViewAvenirMedium
android:id="@+id/txtOutstandingAmount"
style="@style/CustomBlackTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center"
android:maxLines="2"
android:padding="@dimen/main_margin"
android:singleLine="false"
android:text="@string/total_due_amount"
android:textColor="@color/blue_text"
android:textSize="@dimen/normal_font" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<cutomView.TextViewAvenirMedium
android:id="@+id/txtTotalAmount"
style="@style/CustomBlackTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center"
android:padding="@dimen/main_margin"
android:text=""
android:textSize="@dimen/normal_font" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1">
<cutomView.TextViewAvenirMedium
android:id="@+id/txtPayNow"
style="@style/CustomBlackTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:background="@drawable/darkbluebutton"
android:gravity="center"
android:padding="@dimen/main_margin"
android:text="@string/pay_now"
android:textColor="@color/white"
android:textSize="@dimen/normal_font" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/cardAmount"
android:layout_marginTop="@dimen/margin_left"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="2dp"
card_view:cardPreventCornerOverlap="false"
card_view:cardUseCompatPadding="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/main_margin"
android:layout_marginRight="@dimen/main_margin"
android:orientation="vertical">
<ListView
android:id="@+id/listPaidPayment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cacheColorHint="#00000000"
android:divider="@null"
android:dividerHeight="@dimen/small_margine"
android:fastScrollEnabled="true"
android:listSelector="@android:color/transparent"
android:scrollbars="none"
android:smoothScrollbar="true" />
<View
android:id="@+id/viewSeperator"
android:layout_width="match_parent"
android:layout_height="@dimen/view_width"
android:layout_marginLeft="@dimen/margin_top_"
android:layout_marginRight="@dimen/main_margin"
android:layout_marginTop="@dimen/main_margin"
android:background="@color/darkGreyCardBg"
android:visibility="gone" />
</LinearLayout>
<cutomView.TextViewAvenirMedium
android:id="@+id/txtDueAmount"
style="@style/CustomBlackTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/margin_left"
android:background="@color/footertext"
android:gravity="center"
android:padding="@dimen/main_margin"
android:text="@string/total_due_amount"
android:textColor="@color/white"
android:textSize="@dimen/normal_font" />
<ListView
android:id="@+id/listDuePayment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/main_margin"
android:layout_marginRight="@dimen/main_margin"
android:cacheColorHint="#00000000"
android:divider="@null"
android:dividerHeight="@dimen/small_margine"
android:fastScrollEnabled="true"
android:listSelector="@android:color/transparent"
android:scrollbars="none"
android:smoothScrollbar="true" />
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
</cutomView.ParallaxScrollView>
</LinearLayout>