2

Есть activity внутри блок TextEdit обернутый в NestedScrollView. Проблема состоит в том что при открытии клавиатуры для поля которое ближе к низу экрана toolbar уезжает вверх.

<?xml version="1.0" encoding="utf-8"?>

 <android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:id="@+id/contact_data_root"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="test.ru.ContactData">



<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/AppTheme.PopupOverlay">


    </android.support.v7.widget.Toolbar>

</android.support.design.widget.AppBarLayout>

<include  layout="@layout/content_contact_data" />


<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/fab_margin"
    android:src="@mipmap/ic_cab_done_mtrl_alpha" />



   </android.support.design.widget.CoordinatorLayout>
1
  • в манифесте в нужном активити попробуйте добавить android:windowSoftInputMode="stateVisible|adjustResize" 11 дек 2015 в 12:39

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Посмотрите другие вопросы с метками или задайте свой вопрос.