3

ConstraintLayout 内のサポート デザイン ライブラリから TextInputLayout を使用しようとしましたが、エラーが発生しました。

android.widget.LinearLayout$LayoutParams 
cannot be cast to android.support.constraint.ConstraintLayout$LayoutParams

どうすれば support.design.widget.TextInputLayout と同じ機能を ConstraintLayout で実現できますか?

完全なレイアウトはこちら: http://pastebin.com/TjC0FAdS

問題は次のとおりです。

<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:id="@+id/constraintLayout">

    <android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <AutoCompleteTextView
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:singleLine="true"
            android:id="@+id/email"
            android:hint="@string/prompt_email"
            app:layout_constraintLeft_toRightOf="@+id/imageView3"
            android:layout_marginStart="8dp"
            app:layout_constraintTop_toBottomOf="@+id/logo"
            android:layout_marginTop="16dp"
            app:layout_constraintRight_toRightOf="@+id/constraintLayout"
            android:layout_marginEnd="16dp" />
    </android.support.design.widget.TextInputLayout>
</android.support.constraint.ConstraintLayout>
4

2 に答える 2