V
V
Valera Figol2017-03-17 20:50:23
Android
Valera Figol, 2017-03-17 20:50:23

How to raise items?

I have code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/ic_background_logo"
    android:theme="@style/Theme.Login.EditText"
    android:weightSum="100">
    <LinearLayout
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:layout_width="0px"
        android:layout_height="0px"
        android:layout_weight="15" />
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="160dp"
        android:src="@drawable/ic_logo" />
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="57" />
    <android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/email_input"
            android:hint="Enter email"
            android:textColor="@android:color/white"
            android:inputType="textEmailAddress"
            android:textCursorDrawable="@drawable/color_cursor" />
    </android.support.design.widget.TextInputLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="5" />
    <android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/password_input"
            android:hint="Password"
            android:textColorHint="@android:color/white"
            android:inputType="textPassword"
            android:textCursorDrawable="@drawable/color_cursor" />
    </android.support.design.widget.TextInputLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="10" />
    <Button
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:text="Log In"
        android:background="#48FFFFFF"
        android:textColor="#FFFFFF"
        android:textAllCaps="false"
        android:textSize="17sp" />
</LinearLayout>

How to make that when the keyboard is opened, EditText's and the button rise above the keyboard and the icon remains in its place?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question