Я хочу сделать макет, в котором есть вид (вид 1), который содержит текст редактирования внизу родительского относительного макета.Родительский макет также содержит некоторые другие виды над представлением 1. Я хочу, чтобы представление 1 двигалось вверх, когда открыта программная клавиатура, но остальные виды остаются в том же состоянии, а не перемещаются вверх и скрываются за представлением 1. Возможно ли это как-то?
Мой макет (представление 1 здесь - mobile_rl):
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_gradient"
tools:context=".login.LoginActivity">
<RelativeLayout
android:id="@+id/mobile_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@android:color/transparent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_20"
android:background="@android:color/white">
<TextView
android:id="@+id/header_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dimen_30"
android:fontFamily="@font/museo_500"
android:gravity="center_horizontal"
android:lineSpacingExtra="1.3sp"
android:text="@string/login_via_mobile"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_14" />
<RelativeLayout
android:id="@+id/edit_rl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/header_text"
android:layout_centerHorizontal="true"
android:visibility="gone">
<TextView
android:id="@+id/sent_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:fontFamily="@font/museo_500"
android:lineSpacingExtra="@dimen/text_4"
android:textColor="?attr/tertiary_text_color"
android:textSize="@dimen/text_12"
tools:text="We have sent OTP to " />
<ImageView
android:id="@+id/edit_iv"
android:layout_width="@dimen/dimen_12"
android:layout_height="@dimen/dimen_12"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dimen_4"
android:layout_toEndOf="@id/sent_tv"
android:contentDescription="@string/edit_icon"
android:scaleType="fitXY" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/parent_edit_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/header_text"
android:layout_marginTop="@dimen/dimen_30">
<LinearLayout
android:id="@+id/otp_ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_16"
android:layout_marginEnd="@dimen/dimen_16"
android:orientation="horizontal"
android:visibility="invisible">
<EditText
android:id="@+id/otp_et1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_2"
android:layout_marginEnd="@dimen/dimen_2"
android:layout_weight="1"
android:backgroundTint="#9e3eff"
android:digits="1234567890 "
android:fontFamily="@font/museo_500"
android:importantForAutofill="no"
android:inputType="number"
android:maxLength="2"
android:maxLines="1"
android:textAlignment="center"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_24"
tools:ignore="LabelFor"
tools:targetApi="o" />
<EditText
android:id="@+id/otp_et2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_2"
android:layout_marginEnd="@dimen/dimen_2"
android:layout_weight="1"
android:backgroundTint="#9e3eff"
android:digits="1234567890 "
android:fontFamily="@font/museo_500"
android:importantForAutofill="no"
android:inputType="number"
android:maxLength="2"
android:maxLines="1"
android:textAlignment="center"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_24"
tools:ignore="LabelFor"
tools:targetApi="o" />
<EditText
android:id="@+id/otp_et3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_2"
android:layout_marginEnd="@dimen/dimen_2"
android:layout_weight="1"
android:backgroundTint="#9e3eff"
android:digits="1234567890 "
android:fontFamily="@font/museo_500"
android:importantForAutofill="no"
android:inputType="number"
android:maxLength="2"
android:maxLines="1"
android:textAlignment="center"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_24"
tools:ignore="LabelFor"
tools:targetApi="o" />
<EditText
android:id="@+id/otp_et4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_2"
android:layout_marginEnd="@dimen/dimen_2"
android:layout_weight="1"
android:backgroundTint="#9e3eff"
android:digits="1234567890 "
android:fontFamily="@font/museo_500"
android:importantForAutofill="no"
android:inputType="number"
android:maxLength="2"
android:maxLines="1"
android:textAlignment="center"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_24"
tools:ignore="LabelFor"
tools:targetApi="o" />
<EditText
android:id="@+id/otp_et5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_2"
android:layout_marginEnd="@dimen/dimen_2"
android:layout_weight="1"
android:backgroundTint="#9e3eff"
android:digits="1234567890 "
android:fontFamily="@font/museo_500"
android:importantForAutofill="no"
android:inputType="number"
android:maxLength="2"
android:maxLines="1"
android:textAlignment="center"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_24"
tools:ignore="LabelFor"
tools:targetApi="o" />
<EditText
android:id="@+id/otp_et6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_2"
android:layout_marginEnd="@dimen/dimen_2"
android:layout_weight="1"
android:backgroundTint="#9e3eff"
android:digits="1234567890 "
android:importantForAutofill="no"
android:inputType="number"
android:maxLength="1"
android:maxLines="1"
android:textAlignment="center"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_24"
tools:ignore="LabelFor"
tools:targetApi="o" />
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/mobile_til"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_12"
android:layout_marginEnd="@dimen/dimen_12"
android:theme="@style/TextLabel"
android:visibility="visible">
<android.support.design.widget.TextInputEditText
android:id="@+id/mobile_et"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="1234567890 "
android:hint="@string/enter_10_digit_mobile_number"
android:inputType="number"
android:lineSpacingExtra="@dimen/text_4"
android:maxLength="10"
android:windowSoftInputMode="adjustNothing" />
</android.support.design.widget.TextInputLayout>
</RelativeLayout>
<TextView
android:id="@+id/error_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/parent_edit_rl"
android:layout_marginStart="@dimen/dimen_16"
android:layout_marginEnd="@dimen/dimen_16"
android:gravity="center_horizontal"
android:lineSpacingExtra="@dimen/text_4"
android:textColor="?attr/error_color"
android:textSize="@dimen/text_12"
android:visibility="invisible" />
<Button
android:id="@+id/continue_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/parent_edit_rl"
android:layout_marginStart="@dimen/dimen_16"
android:layout_marginTop="@dimen/dimen_30"
android:layout_marginEnd="@dimen/dimen_16"
android:layout_marginBottom="@dimen/dimen_24"
android:background="@drawable/cta_gradient"
android:fontFamily="@font/museo_900"
android:letterSpacing="0.17"
android:text="@string/continue_text"
android:textColor="@android:color/white"
android:textSize="@dimen/text_12" />
<TextView
android:id="@+id/resend_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/continue_button"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dimen_14"
android:fontFamily="@font/museo_500"
android:gravity="center_horizontal"
android:lineSpacingExtra="@dimen/text_4"
android:textColor="?attr/tertiary_text_color"
android:textSize="@dimen/text_12"
android:visibility="gone"
tools:text="Resend OTP in 30 secs" />
</RelativeLayout>
<RelativeLayout
android:layout_width="@dimen/dimen_40"
android:layout_height="@dimen/dimen_40"
android:layout_centerHorizontal="true"
android:background="@android:color/transparent">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/semi_circle" />
<TextView
android:id="@+id/or_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/museo_500"
android:text="@string/or"
android:textColor="?attr/secondary_text_color"
android:textSize="@dimen/text_12"
android:visibility="visible" />
<ImageView
android:id="@+id/arrow_iv"
android:layout_width="@dimen/dimen_40"
android:layout_height="@dimen/dimen_40"
android:layout_centerInParent="true"
android:contentDescription="@string/down_arrow_icon"
android:visibility="invisible" />
</RelativeLayout>
</RelativeLayout>
<ImageView
android:id="@+id/background_iv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/fb_login_rl"
android:layout_marginStart="@dimen/dimen_16"
android:layout_marginBottom="@dimen/dimen_36"
android:contentDescription="@string/backgrount_text_image"
android:scaleType="fitXY"
android:text="@string/save_nmore_than_n10k_every_nmonth" />
<TextView
android:id="@+id/login_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/fb_login_rl"
android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/dimen_36"
android:fontFamily="@font/museo_700"
android:gravity="center_horizontal"
android:lineSpacingExtra="@dimen/text_4"
android:text="@string/login_to_times_prime_to_activate_30_days_free_trial"
android:textColor="@android:color/white"
android:textSize="@dimen/text_14" />
<RelativeLayout
android:id="@+id/fb_login_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/google_login_rl"
android:layout_gravity="center_horizontal"
android:layout_marginStart="@dimen/dimen_16"
android:layout_marginEnd="@dimen/dimen_16"
android:layout_marginBottom="@dimen/dimen_14"
android:background="@drawable/facebook_shape"
android:paddingTop="@dimen/dimen_12"
android:paddingBottom="@dimen/dimen_12">
<TextView
android:id="@+id/facebook_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/museo_500"
android:lineSpacingExtra="4sp"
android:text="@string/continue_with_facebook"
android:textAllCaps="true"
android:textColor="@android:color/white"
android:textSize="@dimen/text_14"
tools:ignore="RelativeOverlap" />
<ImageView
android:id="@+id/facebook_iv"
android:layout_width="wrap_content"
android:layout_height="@dimen/dimen_24"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/dimen_30"
android:layout_toStartOf="@id/facebook_tv"
android:scaleType="fitXY"
tools:ignore="contentDescription" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/google_login_rl"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/mobile_rl"
android:layout_gravity="center_horizontal"
android:layout_marginStart="@dimen/dimen_16"
android:layout_marginEnd="@dimen/dimen_16"
android:layout_marginBottom="@dimen/dimen_30"
android:background="@drawable/google_shape"
android:paddingTop="@dimen/dimen_12"
android:paddingBottom="@dimen/dimen_12">
<TextView
android:id="@+id/google_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/museo_500"
android:lineSpacingExtra="@dimen/text_4"
android:text="@string/continue_with_google"
android:textAllCaps="true"
android:textColor="@android:color/white"
android:textSize="@dimen/text_14"
tools:ignore="RelativeOverlap" />
<ImageView
android:id="@+id/google_iv"
android:layout_width="wrap_content"
android:layout_height="@dimen/dimen_24"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/dimen_30"
android:layout_toStartOf="@id/google_tv"
android:scaleType="fitXY"
tools:ignore="contentDescription" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/progress_bar_rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99000000"
android:visibility="gone">
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="@dimen/dimen_100"
android:layout_height="@dimen/dimen_100"
android:layout_centerInParent="true" />
</RelativeLayout>
</RelativeLayout>