Я использую android.support.v7.widget.Toolbar в своем приложении в чате. Но как только EditText фокусируется и открывается клавиатура, панель инструментов скрывается.Скрыть панель инструментов в фокусе EditText issue
Это мой XML-код: app_bar.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/primaryColor"
android:minHeight="?attr/actionBarSize"
app:theme="@style/myCustomToolBarTheme"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark" >
</android.support.v7.widget.Toolbar>
activity.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ccc"
android:orientation="vertical" >
<include
android:id="@+id/app_bar"
layout="@layout/app_bar" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/app_bar" >
<ListView
android:id="@+id/my_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:ems="10" >
<requestFocus />
</EditText>
</RelativeLayout>
</RelativeLayout>
Выходные экраны:
Пожалуйста, помогите мне.
Спасибо за ваш ответ, но можете ли вы отправить здесь практический код. –
Проверьте измененный ответ. –
Спасибо за ваши усилия, но все же он не работает. –