android - ScrollView in RelativeLayout: bottom layout is blocking EditText in ScrollView -


this xml code:

<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:fitssystemwindows="true"     android:layout_height="match_parent">       <scrollview         android:layout_width="match_parent"         android:isscrollcontainer="false"         android:layout_height="match_parent"         android:layout_alignparentbottom="true">          <relativelayout             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:padding="16dp"             android:background="#fff"             android:elevation="2dp"             android:paddingbottom="32dp">              <view                 android:id="@+id/view7"                 android:layout_width="0dp"                 android:layout_height="match_parent"                 android:layout_centerinparent="true" />              <android.support.design.widget.textinputlayout android:textcolorhint="@color/textcolorabu"                 android:id="@+id/til_event_create_sport_date"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_weight="1"                 android:layout_below="@+id/s_sport"                 android:layout_alignleft="@+id/til_event_create_sport_starttime"                 android:layout_alignstart="@+id/til_event_create_sport_starttime">                  <edittext                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentstart="true"                     android:layout_alignparenttop="true"                     android:hint="date"                     android:imeactionid="@+id/et_search"                     android:imeactionlabel="@string/register.first_name"                     android:imeoptions="actionunspecified"                     android:inputtype="date"                     android:singleline="true"                     android:id="@+id/et_sport_date" />              </android.support.design.widget.textinputlayout>              <android.support.design.widget.textinputlayout android:textcolorhint="@color/textcolorabu"                 android:id="@+id/til_event_create_sport_starttime"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_alignend="@+id/view7"                 android:layout_alignright="@+id/view7"                 android:layout_below="@+id/til_event_create_sport_date"                 android:layout_marginbottom="4dp"                 android:layout_marginleft="4dp"                 android:layout_margintop="4dp"                 android:layout_weight="1">                  <edittext                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentstart="true"                     android:layout_alignparenttop="true"                     android:hint="start time"                     android:imeactionid="@+id/et_search"                     android:imeactionlabel="@string/register.first_name"                     android:imeoptions="actionunspecified"                     android:singleline="true"                     android:id="@+id/et_"                     android:inputtype="time" />              </android.support.design.widget.textinputlayout>              <android.support.design.widget.textinputlayout android:textcolorhint="@color/textcolorabu"                 android:id="@+id/til_event_create_sport_endtime"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_alignparentend="true"                 android:layout_alignparentright="true"                 android:layout_aligntop="@+id/til_event_create_sport_starttime"                 android:layout_toendof="@+id/til_event_create_sport_starttime"                 android:layout_torightof="@+id/til_event_create_sport_starttime"                 android:layout_weight="1">                  <edittext                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentstart="true"                     android:layout_alignparenttop="true"                     android:hint="end time"                     android:imeactionid="@+id/et_search"                     android:imeactionlabel="@string/register.first_name"                     android:imeoptions="actionunspecified"                     android:inputtype="time"                     android:singleline="true" />              </android.support.design.widget.textinputlayout>              <android.support.design.widget.textinputlayout android:textcolorhint="@color/textcolorabu"                 android:id="@+id/til_event_create_sport_location"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_below="@+id/til_event_create_sport_starttime"                 android:layout_margin="4dp">                  <edittext                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentstart="true"                     android:layout_alignparenttop="true"                     android:hint="location"                     android:imeactionid="@+id/et_search"                     android:imeactionlabel="@string/register.first_name"                     android:imeoptions="actionunspecified"                     android:inputtype="date"                     android:singleline="true"                     android:id="@+id/et_location" />             </android.support.design.widget.textinputlayout>              <linearlayout                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:layout_alignparentleft="true"                 android:layout_alignparentstart="true"                 android:layout_below="@+id/til_event_create_sport_location"                 android:gravity="center_vertical"                 android:orientation="horizontal"                 android:paddingleft="8dp"                 android:paddingright="8dp"                 android:id="@+id/linearlayout4">                  <textview                     android:id="@+id/textview43"                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_alignleft="@+id/til_event_create_sport_location"                     android:layout_alignstart="@+id/til_event_create_sport_location"                     android:layout_below="@+id/til_event_create_sport_location"                     android:layout_weight="1"                     android:text="event type" />                  <spinner                     android:id="@+id/s_eventtype"                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_aligntop="@+id/textview43"                     android:layout_toendof="@+id/til_event_create_sport_starttime"                     android:layout_torightof="@+id/til_event_create_sport_starttime"                     android:layout_weight="1"                     android:entries="@array/eventtype_arrays"                     android:spinnermode="dropdown" />             </linearlayout>              <android.support.design.widget.textinputlayout android:textcolorhint="@color/textcolorabu"                 android:id="@+id/til_event_create_sport_additionalinfo"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_below="@+id/linearlayout4"                 android:layout_alignparentleft="true"                 android:layout_alignparentstart="true">                  <edittext                     android:layout_width="match_parent"                     android:layout_height="wrap_content"                     android:layout_alignparentleft="true"                     android:layout_alignparentstart="true"                     android:layout_alignparenttop="true"                     android:hint="additional information"                     android:imeactionid="@+id/et_search"                     android:imeactionlabel="@string/register.first_name"                     android:imeoptions="actionunspecified"                     android:inputtype="textmultiline"                     android:singleline="false"                     android:id="@+id/et_additional_info" />             </android.support.design.widget.textinputlayout>              <spinner                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:id="@+id/s_sport"                 android:spinnermode="dialog"                 android:layout_below="@+id/textview10"                 android:layout_alignparentleft="true"                 android:layout_alignparentstart="true"                 android:entries="@array/sport_arrays" />              <textview                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:text="sport type"                 android:id="@+id/textview10"                 android:layout_alignparenttop="true"                 android:layout_alignparentleft="true"                 android:layout_alignparentstart="true"                 android:textsize="13sp"                 android:textcolor="@color/colorprimary"                 android:layout_marginleft="8dp" />          </relativelayout>     </scrollview>      <linearlayout         android:id="@+id/linearlayout3"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_gravity="center|bottom"         android:background="@color/colorprimary"         android:orientation="horizontal"         android:layout_alignparentbottom="true"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true">          <linearlayout             android:id="@+id/ll_cancel"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_weight="1"             android:background="?android:attr/selectableitembackground"             android:clickable="true"             android:gravity="center"             android:orientation="horizontal"             android:padding="8dp">              <imageview                 android:id="@+id/imageview4"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:background="@android:drawable/ic_menu_close_clear_cancel"                 android:src="@drawable/abc_ic_clear_mtrl_alpha" />              <textview                 android:id="@+id/textview8"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:paddingleft="8dp"                 android:text="cancel"                 android:textcolor="@color/white"                 android:textsize="18sp" />          </linearlayout>          <view             android:layout_width="1dp"             android:layout_height="fill_parent"             android:layout_marginbottom="8dp"             android:layout_margintop="8dp"             android:background="@color/white" />          <linearlayout             android:id="@+id/ll_create"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_weight="1"             android:background="?android:attr/selectableitembackground"             android:clickable="true"             android:gravity="center"             android:orientation="horizontal"             android:padding="8dp">              <imageview                 android:id="@+id/imageview3"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:background="@android:drawable/ic_menu_close_clear_cancel"                 android:src="@drawable/abc_ic_clear_mtrl_alpha" />              <textview                 android:id="@+id/textview6"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:paddingleft="8dp"                 android:text="create"                 android:textcolor="@color/white"                 android:textsize="18sp" />         </linearlayout>     </linearlayout>  </relativelayout> 

the (normal) layout looks this: http://s33.postimg.org/60h0lwg67/screenshot_2016_06_11_16_51_42_com_example_erdea.png

but when focus on edittext, view blocking it: http://s33.postimg.org/61e3cubq7/screenshot_2016_06_11_16_46_50_com_example_erdea.png

how 'remove' view? (expected result "buttons" not showing there blocking edittext when focused). thanks!

try removing scroll view's android:layout_alignparentbottom="true" , replace android:layout_alignparenttop="true"


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -