我正在使用Sliding Menu library在此我已经在滑动视图中使用了Scrollview
,我已经检查过我还没有使用任何边距甚至没有填充内部但仍然ScrollView
不能滚动到底。在普通activity
内使用相同的视图时,它的效果非常好。
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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/carbon_white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@drawable/bg"
android:gravity="center"
android:orientation="vertical">
<com.quade.uxarmy.customview.CircularImageView
android:id="@+id/cvUserImage"
android:layout_width="@dimen/size_64"
android:layout_height="@dimen/size_64"
android:src="@drawable/ic_launcher" />
<carbon.widget.TextView
android:id="@+id/txtUserName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="@dimen/size_05"
android:text="Name"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_normal_18"
android:textStyle="bold"
app:carbon_fontPath="@string/font_regular" />
<carbon.widget.TextView
android:id="@+id/txtCredits"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Credits"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_small"
app:carbon_fontPath="@string/font_regular" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<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:orientation="vertical">
<carbon.widget.LinearLayout
android:id="@+id/llProfile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="@dimen/padding_12"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/profile" />
<carbon.widget.RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/padding_12"
android:weightSum="1">
<carbon.widget.TextView
android:id="@+id/txtProfile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/my_profile_"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular" />
<com.quade.uxarmy.customview.CustomProgressBar
android:id="@+id/pbProfileProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/txtProfile"
android:paddingBottom="@dimen/size_05"
android:paddingTop="@dimen/size_05" />
<carbon.widget.TextView
android:id="@+id/txtProgressPer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/pbProfileProgress"
android:text="67% completed"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_v_small"
app:carbon_fontPath="@string/font_regular" />
</carbon.widget.RelativeLayout>
</carbon.widget.LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/size_05"
android:background="#99ADAFA4" />
<carbon.widget.LinearLayout
android:id="@+id/llHome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_10"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:id="@+id/imageView"
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/home_icon" />
<carbon.widget.TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="Home"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
<carbon.widget.LinearLayout
android:id="@+id/llFeedback"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/feedback" />
<carbon.widget.TextView
android:id="@+id/txtFeedback"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="Feedback"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
<carbon.widget.LinearLayout
android:id="@+id/llShare"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/share" />
<carbon.widget.TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="Share this app"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
<carbon.widget.LinearLayout
android:id="@+id/llRate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/rate" />
<carbon.widget.TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="Rate the app"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/size_10"
android:background="#99ADAFA4" />
<carbon.widget.LinearLayout
android:id="@+id/llAbout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_10"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/about" />
<carbon.widget.TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="About Us"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
<carbon.widget.LinearLayout
android:id="@+id/llTermsOfUse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/terms" />
<carbon.widget.TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="Terms of use"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
<carbon.widget.LinearLayout
android:id="@+id/llPrivacy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/privacy" />
<carbon.widget.TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="Privacy Policy"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center"
android:layout_marginTop="@dimen/size_10"
android:background="#99ADAFA4" />
<carbon.widget.LinearLayout
android:id="@+id/llLogOut"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_10"
android:orientation="horizontal"
android:paddingBottom="@dimen/size_10"
android:paddingLeft="@dimen/padding_12"
android:paddingRight="@dimen/padding_12"
android:paddingTop="@dimen/size_10"
app:carbon_rippleColor="@color/gray_normal">
<ImageView
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/icon_logout" />
<carbon.widget.TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingLeft="@dimen/padding_12"
android:text="Log out"
android:textAllCaps="false"
android:textColor="@color/carbon_black"
android:textSize="@dimen/txt_medium"
app:carbon_fontPath="@string/font_regular"
app:carbon_textAllCaps="false" />
</carbon.widget.LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
提前致谢。