Я хочу, чтобы изображение View View имело фиксированное положение в нижней части экрана и не менялось при появлении клавиатуры. но это не работает, хотя изображение не находится внутри прокрутки.Мягкая клавиатура, меняющая местоположение ImageView
ниже является XML:
<RelativeLayout 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"
android:background="#fff1f1f1"
tools:context=".MainActivity"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:id="@+id/slds"
>
<include
android:id="@+id/toolbar"
layout="@layout/toolbar"
/>
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo"
android:alpha="1"
android:layout_centerHorizontal="true"
/>
</RelativeLayout>
<ScrollView
android:layout_height="match_parent"
android:layout_width="match_parent"
tools:context=".MainActivity"
android:layout_below="@+id/slds"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?android:attr/actionBarSize"
android:layout_span="2"
android:background="#1fffffff"
android:text="@string/Version_number"
android:textSize="22sp"
android:textColor="#ff7c7c7c"
android:textStyle="bold"
android:id="@+id/DB_Name"
android:visibility="gone"/>
<EditText
android:id="@+id/editText1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:layout_marginTop="200dp"
android:drawableLeft="@drawable/user"
android:ems="15"
android:gravity="left"
android:hint="@string/username"
android:maxLength="20"
android:singleLine="true"
android:textColor="#000000">
<requestFocus />
</EditText>
<EditText
android:id="@+id/editText2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/editText1"
android:drawableLeft="@drawable/password"
android:ems="15"
android:gravity="left"
android:hint="@string/password"
android:imeOptions="actionGo"
android:inputType="textPassword"
android:maxLength="20"
android:textColor="#000000"/>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
любая помощь будет оценена.
это сработало, но теперь поле EditText скрыто –
editText.bringToFront(); и после этого editText.invalidate(); –