2017-04-10 1 views
0

スクロールしているときに不必要なスペースがあります。plsは私を助け、私はこのアクティビティのscrollViewを使用しています。これは私の.xmlファイルです。その不必要なスペースをスクロールして私のアプリを嫌にしているので、何をすべきか教えてください。スクロールビューでスクロールダウンしているときにスペースを避けるために

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:fitsSystemWindows="true" 
android:fillViewport="true"> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:orientation="vertical" 
android:layout_height="match_parent" 
android:paddingBottom="@dimen/activity_vertical_margin" 
android:paddingLeft="5dp" 
android:paddingRight="5dp" 
tools:context="com.example.vishal.a4sa.rubber"> 

<TextView 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:textAppearance="?android:attr/textAppearanceLarge" 
    android:text="Rubber Bowl" 
    android:gravity="center" 
    android:textColor="#01118c" 
    android:padding="@dimen/activity_horizontal_margin" 
    android:textStyle="bold" 
    android:textSize="30dp" 
    android:id="@+id/tv" 
    android:layout_alignParentTop="true" 
    android:layout_centerHorizontal="true" /> 

<ImageView 
    android:layout_width="match_parent" 
    android:layout_height="300dp" 
    android:id="@+id/image" 
    android:background="@drawable/image1" 
    android:layout_below="@+id/textView5" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentStart="true" /> 

<android.support.v4.widget.Space 
    android:layout_width="match_parent" 
    android:layout_height="8dp" /> 


<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="900dp" 
    android:textAppearance="?android:attr/textAppearanceMedium" 
    android:textColor="#000000" 
    android:id="@+id/content" 
    android:layout_alignParentBottom="true" 
    android:layout_alignLeft="@+id/imageView" 
    android:layout_alignStart="@+id/imageView" /> 

    </LinearLayout> 
    </ScrollView> 
+0

あなたはスクリーンショットを置くことはできますか? –

+0

'LinearLayout'にパディングがあります これを削除すると、' android:paddingBottom = "@d dimen/activity_vertical_margin" ' –

答えて

0
<ScrollView 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <LinearLayout 
      android:layout_width="match_parent" 
      android:orientation="vertical" 
      android:layout_height="match_parent" 
      android:paddingLeft="5dp" 
      android:paddingRight="5dp"> 

      <TextView 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceLarge" 
       android:text="Rubber Bowl" 
       android:gravity="center" 
       android:textColor="#01118c" 
       android:padding="@dimen/activity_horizontal_margin" 
       android:textStyle="bold" 
       android:textSize="30dp" 
       android:id="@+id/tv" 
       android:layout_alignParentTop="true" 
       android:layout_centerHorizontal="true" /> 

      <ImageView 
       android:layout_width="match_parent" 
       android:layout_height="300dp" 
       android:id="@+id/image" 
       android:background="@drawable/image1" 
       android:layout_below="@+id/textView5" 
       android:layout_alignParentLeft="true" 
       android:layout_alignParentStart="true" /> 

      <android.support.v4.widget.Space 
       android:layout_width="match_parent" 
       android:layout_height="8dp" /> 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:textColor="#000000" 
       android:id="@+id/content" 
       android:layout_alignParentBottom="true" 
       android:layout_alignLeft="@+id/imageView" 
       android:layout_alignStart="@+id/imageView" /> 

    </LinearLayout> 
</ScrollView> 
関連する問題