TextField with initial value in ConstraintLayout

1

I can not identify the error in the XML specification, with each character added at TextField initialization, which is inside the ConstraintLayout, the LinearLayout root increases height.

In advance thank you.

Theredbackgroundlayout,whichcontainsTitleandContraintLayout,isasfollows:

<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
    android:background="@color/r500">

The internal is this

<include layout="@layout/main_dialog_title"/>

<android.support.constraint.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="@dimen/layout_margin10"
    android:paddingTop="@dimen/layout_margin20"
    android:paddingRight="@dimen/layout_margin10"
    android:background="@color/g500">

    <TextView
        style="@style/label"
        android:id="@+id/labCod"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:text="@string/codigo"/>

    <lib.client.control.CTextField
        style="@style/textField"
        android:id="@+id/txfCod"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintWidth_percent="0.3"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/labCod"

        android:text="AAA_A"/>

    <TextView
        style="@style/label"
        android:id="@+id/labNom"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/layout_margin10"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/txfCod"
        android:text="@string/nome"/>

    <lib.client.control.CTextField
        style="@style/textField"

        android:id="@+id/txfNom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/labNom"/>

    <lib.client.control.CLabelCount
        style="@style/labelCount"
        android:id="@+id/labCnt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toTopOf="@+id/txfNom"
        app:layout_constraintRight_toRightOf="@+id/txfNom"
        app:layout_constraintBottom_toBottomOf="@+id/txfNom"/>

    <Button
        style="?android:attr/buttonBarButtonStyle"
        android:id="@+id/btnOkk"

        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/layout_margin10"
        app:layout_constraintTop_toBottomOf="@+id/txfNom"
        app:layout_constraintRight_toRightOf="parent"/>

</android.support.constraint.ConstraintLayout>

    
asked by anonymous 14.05.2018 / 23:05

0 answers