Android 内置EditText的NestedScrollview内部Cardview内部CoordinatorLayout不';t填充视口
在我的活动中,我有一个类似于以下内容的布局:Android 内置EditText的NestedScrollview内部Cardview内部CoordinatorLayout不';t填充视口,android,android-scrollview,android-coordinatorlayout,Android,Android Scrollview,Android Coordinatorlayout,在我的活动中,我有一个类似于以下内容的布局: <android.support.v7.widget.CardView 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="ma
<android.support.v7.widget.CardView
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="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="10dip"
android:paddingRight="10dip">
<EditText
android:id="@+id/noteBodyEdit"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textCapSentences|textMultiLine"
android:overScrollMode="always"
android:scrollbarStyle="insideInset"
android:scrollbars="vertical" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.v7.widget.CardView>
此视图作为内容视图包含在CoordinatorLayout中,并添加了带工具栏的标准AppbarLayout
使用此代码,我希望Scrollview和EditText填充所有内容视图。然而,在这种形式中,它们以wrap_内容行为结束
如果我更改代码并将布局行为从CardView移动到Scrollview,fillportview会进行修复,但工具栏会部分覆盖内容
如何通过以下两种方法解决此问题:
在我更新到support lib 23.0.0之后,问题似乎消失了