I want to move the a single layout to move up when soft keyboard is opened and rest of layout to stay behind...
I want to make a layout where there is a view (View 1) which contains an edit text at the bottom of a parent relative layout. Parent layout also contains some other views above View 1. I want the View 1 to move up when soft keyboard opens but rest of the views to remain in the same state, not move up and hide behind View 1. Is it possible some how?
My layout (View 1 here is 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>
android android-layout android-softkeyboard android-relativelayout
add a comment |
I want to make a layout where there is a view (View 1) which contains an edit text at the bottom of a parent relative layout. Parent layout also contains some other views above View 1. I want the View 1 to move up when soft keyboard opens but rest of the views to remain in the same state, not move up and hide behind View 1. Is it possible some how?
My layout (View 1 here is 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>
android android-layout android-softkeyboard android-relativelayout
add a comment |
I want to make a layout where there is a view (View 1) which contains an edit text at the bottom of a parent relative layout. Parent layout also contains some other views above View 1. I want the View 1 to move up when soft keyboard opens but rest of the views to remain in the same state, not move up and hide behind View 1. Is it possible some how?
My layout (View 1 here is 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>
android android-layout android-softkeyboard android-relativelayout
I want to make a layout where there is a view (View 1) which contains an edit text at the bottom of a parent relative layout. Parent layout also contains some other views above View 1. I want the View 1 to move up when soft keyboard opens but rest of the views to remain in the same state, not move up and hide behind View 1. Is it possible some how?
My layout (View 1 here is 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>
android android-layout android-softkeyboard android-relativelayout
android android-layout android-softkeyboard android-relativelayout
edited Nov 30 '18 at 8:56
Onik
11.2k103963
11.2k103963
asked Nov 23 '18 at 18:00
akshat tailangakshat tailang
537
537
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53451177%2fi-want-to-move-the-a-single-layout-to-move-up-when-soft-keyboard-is-opened-and-r%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53451177%2fi-want-to-move-the-a-single-layout-to-move-up-when-soft-keyboard-is-opened-and-r%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown