Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android textinputLayout在编写xml时有额外的空间_Android_Xml_Material Components Android_Textinputlayout - Fatal编程技术网

android textinputLayout在编写xml时有额外的空间

android textinputLayout在编写xml时有额外的空间,android,xml,material-components-android,textinputlayout,Android,Xml,Material Components Android,Textinputlayout,我的TextInputLayout有问题 一旦我在其中写入文本,我就在屏幕底部增加了额外的空间。 即使是写在一行上,布局的高度也会以某种方式增加。 它在中间的TextinputLayout上增加了空间(左侧和右侧都可以正常工作) 我将主布局置于蓝色背景中,并将高度设置为包裹内容,以查看我的子元素占用了额外的空间: 以下是我的Xml: <com.google.android.flexbox.FlexboxLayout android:id="@+id/co2_se

我的TextInputLayout有问题 一旦我在其中写入文本,我就在屏幕底部增加了额外的空间。 即使是写在一行上,布局的高度也会以某种方式增加。 它在中间的TextinputLayout上增加了空间(左侧和右侧都可以正常工作)

我将主布局置于蓝色背景中,并将高度设置为包裹内容,以查看我的子元素占用了额外的空间:

以下是我的Xml:

<com.google.android.flexbox.FlexboxLayout
        android:id="@+id/co2_set_point_comfort_mode_relative"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/nanosense"
        android:paddingBottom="8dp"
        app:justifyContent="space_between">

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/co2_comfort_min_layout"
            android:layout_height="wrap_content"
            android:layout_width="0dp"
            app:layout_flexGrow="1"
            app:helperText="ppm"
            android:hint="@string/min"
            app:startIconTint="@color/black"
            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/co2_comfort_min"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="numberDecimal"
                android:textSize="12sp"
                android:maxLength="4"
                android:digits="0123456789."/>
        </com.google.android.material.textfield.TextInputLayout>


        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/co2_set_point_comfort_mode_layout"
            android:layout_height="wrap_content"
            android:layout_width="0dp"
            app:startIconDrawable="@drawable/occupancy_in"
            app:helperText="ppm"
            app:layout_flexGrow="1.5"
            android:hint="@string/occupancy"
            android:layout_marginStart="8dp"
            app:startIconTint="@color/black"
            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/co2_set_point_comfort_mode"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="numberDecimal"
                android:maxLength="4"
                android:digits="0123456789."/>
        </com.google.android.material.textfield.TextInputLayout>


        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/co2_comfort_max_layout"
            android:layout_height="wrap_content"
            android:layout_width="0dp"
            android:layout_marginStart="8dp"
            app:layout_flexGrow="1"
            app:helperText="ppm"
            android:hint="@string/max"
            app:startIconTint="@color/black"
            style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/co2_comfort_max"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="numberDecimal"
                android:textSize="12sp"
                android:maxLength="4"
                android:digits="0123456789."/>
        </com.google.android.material.textfield.TextInputLayout>

    </com.google.android.flexbox.FlexboxLayout>

`

我可以将我的FlexbotLayout高度设置为固定高度,但我希望避免这种情况 你知道有什么问题吗? 先谢谢你