0

Hi in the below code i have these layout. once touch inside username edittext i want to move full layout upwards.onfousing the keyboard should be stay like that want to move full layout upwards

Can any one help me

layout

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            >

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:background="@drawable/texture">

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    android:background="#FFFFFF"
                    android:orientation="vertical"
                    android:id="@+id/login">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:orientation="vertical"
                        android:gravity="center"
                        android:paddingTop="100dp"
                        >


                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:textAppearance="?android:attr/textAppearanceMedium"
                            android:textColor="#6E6864"
                            android:text="Sign in to continue"
                            android:id="@+id/login_tv_sign_continue" />

                        <EditText
                            android:layout_width="300dp"
                            android:layout_height="50dp"
                            android:layout_marginTop="20dp"
                            android:paddingLeft="10dp"
                            android:hint="User Name"
                            android:id="@+id/login_ed_username"
                            android:background="@drawable/edit_text_back"
                            android:imeOptions="actionNext"
                            android:singleLine="true"

                            />

                        <EditText
                            android:layout_width="300dp"
                            android:layout_height="50dp"
                            android:layout_marginTop="20dp"
                            android:paddingLeft="10dp"
                            android:hint="Password"
                            android:id="@+id/login_ed_password"
                            android:background="@drawable/edit_text_back"
                            android:imeOptions="actionDone"
                            android:singleLine="true"
                            android:inputType="textPassword"

                            />

                        <Button
                            android:layout_width="300dp"
                            android:layout_height="50dp"
                            android:layout_marginTop="20dp"
                            android:textColor="#6E6864"
                            android:textAppearance="?android:attr/textAppearanceMedium"
                            android:id="@+id/login_btn_login"
                            android:text="Sign In"
                            android:background="#ECBC3B"
                            />

                        <TextView
                            android:layout_width="300dp"
                            android:layout_height="wrap_content"
                            android:textAppearance="?android:attr/textAppearanceSmall"
                            android:id="@+id/txt_forgetpwd"
                            android:text="Forgot Password?"
                            android:gravity="right"
                            android:layout_marginTop="20dp"
                            />

                    </LinearLayout>

                </LinearLayout>

            </LinearLayout>

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/logo"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                />

        </RelativeLayout>

    </LinearLayout>
</ScrollView>
care567
  • 231
  • 3
  • 15
  • Can you show us any mockup for this view(i mean if you have any image please share here). The layout you have given here is seem to be incorrect. Also, for your need can you try with windowssoftinputmode:adjustpan – Rotomac17 Oct 16 '15 at 13:57
  • @Rotomac17 yes i added in manifest activity then also not working.onfouse on edittext want to move to top – care567 Oct 16 '15 at 13:58
  • Can you show me the exact image of how your layout will look like? – Rotomac17 Oct 16 '15 at 14:06
  • http://stackoverflow.com/questions/16411056/how-to-adjust-layout-when-soft-keyboard-appears same screen – care567 Oct 16 '15 at 14:41

0 Answers0