【发布时间】:2018-02-24 19:49:10
【问题描述】:
我的主要活动是android:windowSoftInputMode="adjustResize" 的片段的容器。我的布局包含底部按钮,这些按钮与软键盘一起使用,并且对于大多数片段逻辑都是可以接受的。但在一个片段中,我想防止底部按钮出现这种行为。如何在不改变 android:windowSoftInputMode="adjustResize" 的情况下实现这一点?我有这样结构的布局:
<?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"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/widget_toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/dimen_56dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true" />
<include
android:id="@+id/container_company_header"
android:layout_height="@dimen/dimen_55dp"
android:layout_width="wrap_content"
layout="@layout/container_company_header"
android:layout_below="@+id/toolbar" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_service_review"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/container_bottom_buttons"
android:layout_below="@+id/container_company_header"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
tools:listitem="@layout/item_review_linear" />
<include
android:id="@+id/container_bottom_buttons"
layout="@layout/container_bottom_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
【问题讨论】:
标签: android android-softkeyboard