0

내 애플 리케이션을위한 기능을 만드는 일하는 안드로이드 양식에 일하고 있어요. 하지만 현재 중첩 된 scrollview 함께 CoordinatorLayout 사용하고 있습니다. 그러나 그것은 나의 두루마리의 바닥에 공백을 준다. 이것을 제거하는 방법? 내가 스택 오버 플로우에서 발견 몇 가지를 시도했지만 working.How 나는이 문제를 해결할 수 없습니다중첩 된 scrollview 코디네이터 레이아웃 여분의 공간을 걸릴

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 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/ash" 
android:orientation="vertical"> 

<android.support.design.widget.CoordinatorLayout 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/ash" 
    android:fitsSystemWindows="true"> 

    <android.support.design.widget.AppBarLayout 
     android:id="@+id/app_bar_layout" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:fitsSystemWindows="true" 
     android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> 

     <android.support.design.widget.CollapsingToolbarLayout 
      android:id="@+id/ctl" 
      android:layout_width="match_parent" 
      android:layout_height="350dp" 
      android:background="@color/ash" 
      android:fitsSystemWindows="true" 
      app:contentScrim="?attr/colorPrimary" 
      app:expandedTitleTextAppearance="@android:color/transparent" 
      app:layout_scrollFlags="scroll|exitUntilCollapsed"> 

      <RelativeLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:background="@drawable/layout_layer" 
       android:gravity="center_horizontal" 
       android:orientation="vertical"> 

       <ImageView 
        android:id="@+id/img_chatroom" 
        android:layout_width="match_parent" 
        android:layout_height="150dp" 
        android:contentDescription="@string/app_name" 
        android:scaleType="centerCrop" 
        android:src="@drawable/profile_img_bg" 
        app:layout_collapseMode="parallax" /> 

       <TextView 
        android:id="@+id/tv_chatroomname" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_below="@+id/img_chatroom" 
        android:gravity="center_horizontal" 
        android:padding="5dp" 
        android:text="Chatroom Name" 
        android:textColor="@color/black" 
        android:textSize="@dimen/large_text" /> 

       <TextView 
        android:id="@+id/tv_chatroomdescription" 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:layout_below="@+id/tv_chatroomname" 
        android:layout_margin="10dp" 
        android:padding="5dp" 
        android:text="Chatroom DescriptionChatroom DescriptionChatroomChatroom DescriptionChatroom DescriptionChatroomChatroom DescriptionChatroom DescriptionChatroomChatroom DescriptionChatroom DescriptionChatroom" 
        android:textColor="@color/black" 
        android:textSize="@dimen/small_text" /> 
      </RelativeLayout> 

      <android.support.v7.widget.Toolbar 
       android:id="@+id/toolbar" 
       android:layout_width="match_parent" 
       android:layout_height="?attr/actionBarSize" 
       android:title="Settings" 
       app:layout_collapseMode="pin" /> 
     </android.support.design.widget.CollapsingToolbarLayout> 
    </android.support.design.widget.AppBarLayout> 


    <android.support.v4.widget.NestedScrollView 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior"> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:background="@drawable/layout_layer" 
      android:orientation="vertical"> 

      <RelativeLayout 
       android:id="@+id/rl_create_menu" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_below="@+id/rl_picture" 
       android:layout_margin="10dp"> 

       <LinearLayout 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_margin="10dp" 
        android:orientation="vertical"> 

        <LinearLayout 
         android:layout_width="match_parent" 
         android:layout_height="wrap_content" 
         android:layout_margin="10dp" 
         android:orientation="horizontal"> 

         <TextView 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content" 
          android:layout_gravity="center" 
          android:layout_weight="1" 
          android:text="Chatroom Type" 
          android:textColor="@color/black" /> 

         <RadioGroup 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content" 
          android:orientation="horizontal"> 

          <RadioButton 
           android:layout_width="wrap_content" 
           android:layout_height="wrap_content" 
           android:text="Public" 
           android:theme="@style/MyRadioButton" /> 

          <RadioButton 
           android:layout_width="wrap_content" 
           android:layout_height="wrap_content" 
           android:text="Private" 
           android:theme="@style/MyRadioButton" /> 
         </RadioGroup> 

        </LinearLayout> 

        <LinearLayout 
         android:layout_width="match_parent" 
         android:layout_height="wrap_content" 
         android:gravity="center_vertical" 
         android:padding="10dp"> 


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

          <RelativeLayout 
           android:id="@+id/rl_country_res" 
           android:layout_width="wrap_content" 
           android:layout_height="match_parent"> 

           <TextView 
            android:layout_width="match_parent" 
            android:layout_height="wrap_content" 
            android:layout_gravity="center_vertical" 
            android:text="Country Wise Restriction" 
            android:textColor="@color/black" 
            android:textSize="@dimen/small_medium_text" /> 
          </RelativeLayout> 

          <View 
           android:layout_width="match_parent" 
           android:layout_height="0.5dp" 
           android:layout_gravity="bottom" 
           android:layout_marginTop="10dp" 
           android:background="@color/deep_ash" /> 

          <RelativeLayout 
           android:id="@+id/rl_chatroom_capacity" 
           android:layout_width="match_parent" 
           android:layout_height="wrap_content" 
           android:layout_marginTop="15dp"> 

           <TextView 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="Chatroom Capacity" 
            android:textColor="@color/black" 
            android:textSize="@dimen/small_medium" /> 
          </RelativeLayout> 

          <View 
           android:layout_width="match_parent" 
           android:layout_height="0.5dp" 
           android:background="@color/ash" /> 

          <RelativeLayout 
           android:id="@+id/rl_country" 
           android:layout_width="match_parent" 
           android:layout_height="wrap_content" 
           android:layout_marginTop="15dp"> 

           <TextView 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="Country" 
            android:textColor="@color/black" 
            android:textSize="@dimen/small_medium" /> 
          </RelativeLayout> 

          <View 
           android:layout_width="match_parent" 
           android:layout_height="0.5dp" 
           android:layout_gravity="bottom" 
           android:background="@color/ash" /> 

          <RelativeLayout 
           android:layout_width="match_parent" 
           android:layout_height="wrap_content" 
           android:layout_marginTop="5dp" 
           android:padding="5dp"> 

           <TextView 
            android:id="@+id/tv_protect_chatroom" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="Protect Chatroom" 
            android:textColor="@color/black" 
            android:textSize="@dimen/small_medium" /> 

           <ToggleButton 
            android:layout_width="40dp" 
            android:layout_height="18dp" 
            android:layout_alignParentRight="true" 
            android:background="@drawable/toggle_silector" 
            android:checked="false" 
            android:text="" 
            android:textOff="" 
            android:textOn="" /> 

           <TextView 
            android:layout_width="match_parent" 
            android:layout_height="wrap_content" 
            android:layout_below="@+id/tv_protect_chatroom" 
            android:layout_marginTop="10dp" 
            android:text="Without code no one can join with you" /> 
          </RelativeLayout> 

          <RelativeLayout 
           android:layout_width="match_parent" 
           android:layout_height="wrap_content" 
           android:layout_marginTop="5dp" 
           android:padding="5dp"> 

           <TextView 
            android:id="@+id/tv_auto_flood_control" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="Auto Flood Control" 
            android:textColor="@color/black" 
            android:textSize="@dimen/small_medium" /> 

           <ToggleButton 
            android:layout_width="40dp" 
            android:layout_height="18dp" 
            android:layout_alignParentRight="true" 
            android:background="@drawable/toggle_silector" 
            android:checked="false" 
            android:text="" 
            android:textOff="" 
            android:textOn="" /> 

           <TextView 
            android:layout_width="match_parent" 
            android:layout_height="wrap_content" 
            android:layout_below="@+id/tv_auto_flood_control" 
            android:layout_marginTop="10dp" 
            android:text="If you enable flood control , User will be kicked automatically from chatroom" /> 
          </RelativeLayout> 

          <RelativeLayout 
           android:id="@+id/rl_idle_time" 
           android:layout_width="match_parent" 
           android:layout_height="wrap_content" 
           android:layout_marginTop="15dp"> 

           <TextView 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:text="Maximum Idle Time" 
            android:textColor="@color/black" 
            android:textSize="@dimen/small_medium" /> 
          </RelativeLayout> 

          <Button 
           android:layout_width="wrap_content" 
           android:layout_height="wrap_content" 
           android:layout_gravity="center" 
           android:layout_marginTop="35dp" 
           android:background="@drawable/shape_for_submit_button" 
           android:gravity="center" 
           android:padding="4dp" 
           android:text="Create Chatroom" 
           android:textColor="@color/black" 
           android:textSize="@dimen/small_medium" /> 
         </LinearLayout> 
        </LinearLayout> 
       </LinearLayout> 
      </RelativeLayout> 
     </LinearLayout> 
    </android.support.v4.widget.NestedScrollView> 
</android.support.design.widget.CoordinatorLayout> 

: 여기

내 XML인가?

+0

출력 내용을 추가 공백으로 게시 하시겠습니까 ?? – sushildlh

+0

죄송합니다, 형제 님, 사진을 업로드하는 데 문제가 있습니다. 다시 시도하고 알려 드리겠습니다. 하지만 문제는 내가 아래로 스크롤 할 때 맨 아래에 여분의 빈 공간이 생겼다는 것입니다. –

답변

0

변경 match_parent

<android.support.v4.widget.NestedScrollView 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="#Ff0000" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior"> 

에 높이 나는 background 추가하고 그것의 색상을 볼 수 있습니다.

+0

동생이 아닙니다. –

+0

배경색을 확인하십시오. – KeLiuyue

+0

지금까지 작동하지 않습니다 ... –