我在activity xml中有一个Coordinator布局和一个包含内容布局xml的include布局。像这样:
UuidCreateSequential
当我将内容布局放在nestedscrollview中时,我的内容布局加倍了你的高度。有人可以帮帮我吗?
我的内容布局xml:
<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:layout_height="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/main">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/content_sign_in" />
</android.support.v4.widget.NestedScrollView>
我不知道为什么会发生这种情况
答案 0 :(得分:0)
我没有看到您的布局层次结构有任何问题。事情可能有点奇怪,因为你使用图像作为背景,没有固定的高度和宽度。我不知道这是XML背景还是图像文件,但如果是后者,我建议在相对布局中使用图像视图,并定义固定大小和比例类型。