【问题标题】:Changing the height of ConstraintLayout from wrap-content to 0dp changes height of children将 ConstraintLayout 的高度从 wrap-content 更改为 0dp 会更改子项的高度
【发布时间】:2017-12-27 11:48:21
【问题描述】:

基本上,我有一个 ConstraintLayout 作为根,然后有 2 个 ConstraintLayouts 作为子级,垂直对齐(以 wrap-content 作为其高度)和最后一个第三个,以填充所有剩余空间(0dp 高度,设置所有约束) .但是,这第三个 ConstraintLayout,首先将 wrap-content 作为其高度,当我将高度更改为 0dp 时,第三个布局中的所有视图看起来都没有高度(它们的高度为 wrap-content,这不是改变)。当我手动输入高度时,例如'30dp' 作为视图的高度,它可以工作,但视图高度的包装内容不起作用。此外,设置约束,即底部提升视图。有谁知道怎么回事?

This 是我得到的行为。

== 约束布局(根)

== ConstraintLayout(包装内容)

== ConstraintLayout(包装内容)

== ConstraintLayout(高宽0dp,所有约束集,填充剩余空间)

=== 视图(宽度为 0dp,高度为 wrap_content,但不显示高度(主要是 ImageView 和 EditTexts)。

看到这个image,红色区域是我遇到问题的 ConstraintLayout,并且布局中的 View 是黄色的。

这是我的整个布局文件:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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.support.constraint.ConstraintLayout android:layout_width="0dp" android:layout_height="wrap_content"
        android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent" android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent"
        android:layout_marginTop="16dp" android:id="@+id/constraintLayout28" android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp">

        <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content"
            app:srcCompat="@drawable/ic_team" android:id="@+id/imageView17" app:layout_constraintTop_toTopOf="parent"
            android:layout_marginTop="8dp" android:layout_marginLeft="8dp" app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="8dp" android:layout_marginStart="8dp" />
        <AutoCompleteTextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent"
            android:id="@+id/cL1" app:layout_constraintLeft_toRightOf="@+id/imageView17"
            android:layout_marginLeft="8dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="8dp"
            android:layout_marginStart="8dp" android:padding="4dp" android:background="@drawable/edittext"
            android:layout_marginEnd="8dp" android:hint="Opdrachtgever*" />
        <LinearLayout android:orientation="horizontal" android:layout_width="0dp" android:layout_height="wrap_content"
            android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/cL1"
            android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintLeft_toRightOf="@+id/imageView17" android:layout_marginLeft="8dp"
            app:layout_constraintHorizontal_bias="0.0" app:layout_constraintBottom_toBottomOf="parent"
            android:layout_marginBottom="8dp" android:layout_marginStart="8dp" android:layout_marginEnd="8dp">
            <AutoCompleteTextView android:layout_width="0dp" android:layout_height="wrap_content"
                android:id="@+id/cL2" android:padding="4dp" android:background="@drawable/edittext"
                android:layout_weight="1" android:layout_marginRight="4dp" android:hint="Voornaam" />
            <AutoCompleteTextView android:layout_width="0dp" android:layout_height="wrap_content" android:id="@+id/cL3"
                android:padding="4dp" android:background="@drawable/edittext" android:layout_weight="1" android:layout_marginLeft="4dp"
                android:hint="Achternaam" />
        </LinearLayout>
    </android.support.constraint.ConstraintLayout>
    <android.support.constraint.ConstraintLayout android:layout_width="0dp" android:layout_height="1px"
        android:layout_marginTop="16dp" app:layout_constraintTop_toBottomOf="@+id/constraintLayout28"
        android:layout_marginLeft="8dp" app:layout_constraintLeft_toLeftOf="parent" android:layout_marginRight="8dp"
        app:layout_constraintRight_toRightOf="parent" android:background="@color/dividerColor"
        android:id="@+id/constraintLayout29" android:layout_marginStart="8dp" android:layout_marginEnd="8dp">

    </android.support.constraint.ConstraintLayout>
    <android.support.constraint.ConstraintLayout android:layout_width="0dp" android:layout_height="wrap_content"
        android:layout_marginTop="16dp" app:layout_constraintTop_toBottomOf="@+id/constraintLayout29"
        android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent" android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent" android:id="@+id/constraintLayout30"
        android:layout_marginStart="8dp" android:layout_marginEnd="8dp">

        <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content"
            app:srcCompat="@drawable/ic_location" android:id="@+id/imageView19" android:layout_marginLeft="8dp"
            app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent"
            android:layout_marginTop="8dp" app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="8dp"
            android:layout_marginStart="8dp" />
        <LinearLayout android:orientation="horizontal" android:layout_width="0dp" android:layout_height="wrap_content"
            app:layout_constraintLeft_toRightOf="@+id/imageView19" android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="8dp" android:weightSum="1"
            app:layout_constraintHorizontal_bias="0.0" android:id="@+id/linearLayout2" android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp">
            <AutoCompleteTextView android:layout_width="0dp" android:hint="Straat" android:id="@+id/cL4"
                android:layout_height="wrap_content" android:padding="4dp" android:background="@drawable/edittext"
                android:layout_weight="0.8" android:layout_marginRight="4dp" />
            <EditText android:layout_width="0dp" android:hint="#" android:id="@+id/cL4Number"
                android:layout_height="wrap_content" android:padding="4dp" android:background="@drawable/edittext"
                android:layout_weight="0.2" android:layout_marginLeft="4dp" />
        </LinearLayout>
        <EditText android:layout_width="0dp" android:layout_height="wrap_content" android:id="@+id/cL5"
            android:hint="Stad" android:padding="4dp" android:background="@drawable/edittext" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/linearLayout2"
            android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintLeft_toRightOf="@+id/imageView19" android:layout_marginLeft="8dp"
            app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="8dp"
            android:layout_marginStart="8dp" android:layout_marginEnd="8dp" />
    </android.support.constraint.ConstraintLayout>
    <android.support.constraint.ConstraintLayout android:layout_width="0dp" android:layout_height="1px"
        android:layout_marginTop="16dp" app:layout_constraintTop_toBottomOf="@+id/constraintLayout30"
        android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent" android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent" android:background="@color/dividerColor"
        android:id="@+id/constraintLayout31" android:layout_marginStart="8dp" android:layout_marginEnd="8dp">

    </android.support.constraint.ConstraintLayout>

    <android.support.constraint.ConstraintLayout
        android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent" android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/constraintLayout31" android:layout_marginTop="16dp"
        android:layout_marginBottom="8dp" app:layout_constraintBottom_toTopOf="@+id/cL6"
        android:layout_width="0dp" android:layout_height="0dp">


        <ImageView android:layout_width="0dp" android:layout_height="0dp" app:srcCompat="@drawable/ic_description"
            android:id="@+id/imageView20" android:layout_marginLeft="8dp" app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="8dp"
            app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="8dp"
            app:layout_constraintVertical_bias="1.0" />
        <EditText android:layout_width="0dp" android:layout_height="wrap_content" android:id="@+id/cL7"
            android:hint="Referentie nummer"  app:layout_constraintTop_toTopOf="parent"
            android:layout_marginTop="8dp" android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintLeft_toRightOf="@+id/imageView20" android:layout_marginLeft="8dp" android:padding="4dp"
            android:background="@drawable/edittext" />
        <AutoCompleteTextView android:layout_width="0dp" android:layout_height="wrap_content" android:id="@+id/cL8"
            android:hint="Project" android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/cL7"
            app:layout_constraintLeft_toRightOf="@+id/imageView20" android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintHorizontal_bias="0.0" android:padding="4dp" android:background="@drawable/edittext" />
        <EditText android:layout_width="0dp" android:layout_height="0dp" android:id="@+id/cL9"
            android:hint="Omschrijving" android:layout_marginRight="8dp" app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintLeft_toRightOf="@+id/imageView20" android:layout_marginLeft="8dp" android:padding="4dp"
            android:background="@drawable/edittext" app:layout_constraintHorizontal_bias="0.0" android:layout_marginTop="8dp"
            app:layout_constraintTop_toBottomOf="@+id/cL8"
            app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="8dp" />
    </android.support.constraint.ConstraintLayout>

    <ImageView android:layout_width="0dp" android:layout_height="wrap_content"
        app:srcCompat="@drawable/bt_cL6" android:id="@+id/cL6"
        app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintLeft_toLeftOf="parent" android:adjustViewBounds="true" android:scaleType="fitXY" />
</android.support.constraint.ConstraintLayout>

【问题讨论】:

  • 你能发布完整的布局吗?
  • @AskQ 我更新了帖子。
  • 您在 CL 以下的 CL 有问题,ID 为 constraintLayout31。它的高度是问题吧?
  • @AskQ 我的布局及其内容有问题。 CL 本身的尺寸很好,所有字段都正确并且应用正确,但是,它的所有子视图都不显示任何形式的高度(如我原始帖子中的图像所示),即使它们具有 wrap-content 为他们的身高。
  • 是的,因为它的 0dp。检查我发布的xml!

标签: java android android-constraintlayout


【解决方案1】:

将下面的代码复制到您的布局文件中。

<android.support.constraint.ConstraintLayout
    android:id="@+id/constraintLayout28"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="8dp"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="16dp"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toTopOf="parent">

    <ImageView
        android:id="@+id/imageView17"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@mipmap/ic_launcher_round"/>

    <AutoCompleteTextView
        android:id="@+id/cL1"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:hint="Opdrachtgever*"
        android:padding="4dp"
        app:layout_constraintLeft_toRightOf="@+id/imageView17"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:orientation="horizontal"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintLeft_toRightOf="@+id/imageView17"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/cL1">

        <AutoCompleteTextView
            android:id="@+id/cL2"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginRight="4dp"
            android:layout_weight="1"
            android:hint="Voornaam"
            android:padding="4dp"/>

        <AutoCompleteTextView
            android:id="@+id/cL3"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="4dp"
            android:layout_weight="1"
            android:hint="Achternaam"
            android:padding="4dp"/>
    </LinearLayout>
</android.support.constraint.ConstraintLayout>

<android.support.constraint.ConstraintLayout
    android:id="@+id/constraintLayout29"
    android:layout_width="0dp"
    android:layout_height="1dp"
    android:layout_marginEnd="8dp"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="16dp"
    android:background="@color/colorPrimary"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/constraintLayout28">

</android.support.constraint.ConstraintLayout>

<android.support.constraint.ConstraintLayout
    android:id="@+id/constraintLayout30"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="8dp"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="16dp"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/constraintLayout29"
    app:layout_constraintBottom_toTopOf="@+id/constraintLayout32">

    <ImageView
        android:id="@+id/imageView19"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@mipmap/ic_launcher_round"
        />

    <LinearLayout
        android:id="@+id/linearLayout2"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:orientation="horizontal"
        android:weightSum="1"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintLeft_toRightOf="@+id/imageView19"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <AutoCompleteTextView
            android:id="@+id/cL4"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginRight="4dp"
            android:layout_weight="0.8"
            android:hint="Straat"
            android:padding="4dp"/>

        <EditText
            android:id="@+id/cL4Number"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="4dp"
            android:layout_weight="0.2"
            android:hint="#"
            android:padding="4dp"/>
    </LinearLayout>

    <EditText
        android:id="@+id/cL5"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:hint="Stad"
        android:padding="4dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toRightOf="@+id/imageView19"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/linearLayout2"/>
</android.support.constraint.ConstraintLayout>


<android.support.constraint.ConstraintLayout
    android:id="@+id/constraintLayout32"
    app:layout_constraintTop_toBottomOf="@+id/constraintLayout30"
    app:layout_constraintBottom_toTopOf="@+id/cL6"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintHorizontal_bias="0.0">

    <ImageView
         android:id="@+id/imageView20"
         android:layout_width="0dp"
         android:layout_height="0dp"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toLeftOf="@+id/cL7"
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"
         app:srcCompat="@mipmap/ic_launcher_round"
       />


     <EditText
         android:id="@+id/cL7"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:text="Reference number"
         app:layout_constraintLeft_toRightOf="@+id/imageView20"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toTopOf="parent"
         />

    <AutoCompleteTextView
         android:id="@+id/cL8"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:hint="Project"
         app:layout_constraintLeft_toRightOf="@+id/imageView20"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/cL7"
         app:layout_constraintBottom_toTopOf="@+id/cL9"/>

     <EditText
         android:id="@+id/cL9"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:text="Omschrijving"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toRightOf="@+id/imageView20"
         app:layout_constraintRight_toRightOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/cL8"/>
</android.support.constraint.ConstraintLayout>

<ImageView
    android:id="@+id/cL6"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:adjustViewBounds="true"
    android:scaleType="fitXY"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintRight_toRightOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/constraintLayout32"
    app:srcCompat="@mipmap/ic_launcher_round"/>

【讨论】:

  • 我的结构几乎相同:我已经更新了我原来的帖子。
  • 我已经修改了我的布局,请检查
【解决方案2】:

当您在两个布局之间约束 CL 时,它的作用域是在运行时在这两个布局之间进行拉伸。在设计预览中,您看不到它延伸到剩余空间,因为它是 CL。也不要使用 CL 来显示分隔符。使用视图标签。

您可以使用android studio的下面功能来CL您想要填充剩余空间。它所做的是将 CL 的 layout_height 更改为在设计时计算的一些值。 (例如:275dp)。


布局 XML:

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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.support.constraint.ConstraintLayout
        android:id="@+id/constraintLayout28"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="16dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/imageView17"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_allahabad_bank" />

        <AutoCompleteTextView
            android:id="@+id/cL1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:background="@drawable/ic_allahabad_bank"
            android:hint="Opdrachtgever*"
            android:padding="4dp"
            app:layout_constraintLeft_toRightOf="@+id/imageView17"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:orientation="horizontal"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintLeft_toRightOf="@+id/imageView17"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/cL1">

            <AutoCompleteTextView
                android:id="@+id/cL2"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginRight="4dp"
                android:layout_weight="1"
                android:background="@drawable/ic_allahabad_bank"
                android:hint="Voornaam"
                android:padding="4dp" />

            <AutoCompleteTextView
                android:id="@+id/cL3"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dp"
                android:layout_weight="1"
                android:background="@drawable/ic_allahabad_bank"
                android:hint="Achternaam"
                android:padding="4dp" />
        </LinearLayout>
    </android.support.constraint.ConstraintLayout>

    <android.support.constraint.ConstraintLayout
        android:id="@+id/constraintLayout29"
        android:layout_width="0dp"
        android:layout_height="1px"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="16dp"
        android:background="@color/black"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/constraintLayout28">

    </android.support.constraint.ConstraintLayout>

    <android.support.constraint.ConstraintLayout
        android:id="@+id/constraintLayout30"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="16dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/constraintLayout29">

        <ImageView
            android:id="@+id/imageView19"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_logout" />

        <LinearLayout
            android:id="@+id/linearLayout2"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:orientation="horizontal"
            android:weightSum="1"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintLeft_toRightOf="@+id/imageView19"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <AutoCompleteTextView
                android:id="@+id/cL4"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginRight="4dp"
                android:layout_weight="0.8"
                android:background="@drawable/ic_allahabad_bank"
                android:hint="Straat"
                android:padding="4dp" />

            <EditText
                android:id="@+id/cL4Number"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dp"
                android:layout_weight="0.2"
                android:background="@drawable/ic_allahabad_bank"
                android:hint="#"
                android:padding="4dp" />
        </LinearLayout>

        <EditText
            android:id="@+id/cL5"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:background="@drawable/ic_allahabad_bank"
            android:hint="Stad"
            android:padding="4dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@+id/imageView19"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/linearLayout2" />
    </android.support.constraint.ConstraintLayout>

    <android.support.constraint.ConstraintLayout
        android:id="@+id/constraintLayout31"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="16dp"
        android:background="@color/black"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/constraintLayout30">

    </android.support.constraint.ConstraintLayout>

    <android.support.constraint.ConstraintLayout
        android:id="@+id/constraintLayout"
        android:layout_width="0dp"
        android:layout_height="275dp"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintBottom_toTopOf="@+id/cL6"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/constraintLayout31">


        <ImageView
            android:id="@+id/imageView20"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginTop="8dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="1.0"
            app:srcCompat="@drawable/ic_bank" />

        <EditText
            android:id="@+id/cL7"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginTop="8dp"
            android:background="@drawable/ic_allahabad_bank"
            android:hint="Referentie nummer"
            android:padding="4dp"
            app:layout_constraintLeft_toRightOf="@+id/imageView20"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <AutoCompleteTextView
            android:id="@+id/cL8"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginTop="8dp"
            android:background="@drawable/ic_allahabad_bank"
            android:hint="Project"
            android:padding="4dp"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintLeft_toRightOf="@+id/imageView20"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/cL7" />

        <EditText
            android:id="@+id/cL9"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginTop="8dp"
            android:background="@drawable/ic_allahabad_bank"
            android:hint="Omschrijving"
            android:padding="4dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintLeft_toRightOf="@+id/imageView20"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/cL8" />
    </android.support.constraint.ConstraintLayout>

    <ImageView
        android:id="@+id/cL6"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"


        android:layout_marginEnd="8dp"


        android:layout_marginStart="8dp"
        android:adjustViewBounds="true"
        android:scaleType="center"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/ic_allahabad_bank" />
</android.support.constraint.ConstraintLayout>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-09-03
    • 2014-08-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-01
    • 1970-01-01
    相关资源
    最近更新 更多