I am trying to use the newest TextInputLayout in my DialogFragment.
Here\'s my code:
Instead of using EditText, use android.support.v7.widget.AppCompatEditText. For example:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:errorEnabled="true">
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="First Name"
android:inputType="textPersonName"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
Also, if you didn't do so already: Set AppCompat theme in your manifest application tag:
<application
...
android:theme="@style/Theme.AppCompat">
And inherit AppCompat at your styles.xml as root for your activity styles etc.:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"/>