How to use TextInputLayout with Theme.material?
<p>I'm trying to use TextInputLayout with Theme.material and the code look like....</p>

<p>activity_mail.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:drawableLeft="http://schemas.android.com/apk/res-auto"
    android:background="#2196F3"
    android:orientation="vertical"
    android:scrollbarAlwaysDrawVerticalTrack="true"
    tools:context="com.realmilk.MainActivity"&gt;

    &lt;TextView
        android:id="@+id/login_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="16dp"
        android:layout_marginTop="22dp"
        android:gravity="center_horizontal"
        android:text="Account Login"
        android:textColor="#fff"
        android:textSize="26sp"
        android:textStyle="bold" /&gt;

    &lt;RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/login_title"
        android:layout_marginTop="70dp"
        android:background="#fff"
        android:elevation="4dp"
        android:orientation="vertical"
        android:padding="20dp"&gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingTop="30dp"&gt;

            &lt;android.support.design.widget.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;

                &lt;EditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/ic_supervisor_account_black_24dp"
                    android:drawableTint="#FF4081"
                    android:singleLine="true"
                    android:hint="User Name"
                    android:inputType="textEmailAddress" /&gt;
            &lt;/android.support.design.widget.TextInputLayout&gt;

            &lt;android.support.design.widget.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"&gt;

                &lt;EditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:singleLine="true"
                    android:drawableLeft="@drawable/ic_lock_black_24dp"
                    android:drawableTint="#FF4081"
                    android:hint="Password"
                    android:inputType="numberPassword" /&gt;
            &lt;/android.support.design.widget.TextInputLayout&gt;

            &lt;TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right"
                android:paddingTop="5dp"
                android:text="Forgot Password?" /&gt;


            &lt;Button
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_margin="22dp"
                android:background="#d67601"
                android:text="Sign in"
                android:textAllCaps="false"
                android:textColor="#fff"
                android:textSize="18sp" /&gt;
        &lt;/LinearLayout&gt;
    &lt;/RelativeLayout&gt;

    &lt;ImageButton
        android:id="@+id/user_profile_photo"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_below="@+id/login_title"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="16dp"
        android:background="@drawable/user_profile_image_background"
        android:elevation="4dp" /&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<p>The MainActivity look like this..</p>

<pre><code>public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}
</code></pre>

<p>When i try to execute this </p>

<pre><code>Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.                                                                 
           at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:343)
           at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:312)
           at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:277)
           at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
           at com.realmilk.MainActivity.onCreate(MainActivity.java:11)
           at android.app.Activity.performCreate(Activity.java:6237)
           at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
           at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
           at android.app.ActivityThread.-wrap11(ActivityThread.java) 
           at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
           at android.os.Handler.dispatchMessage(Handler.java:102) 
           at android.os.Looper.loop(Looper.java:148) 
           at android.app.ActivityThread.main(ActivityThread.java:5417)
</code></pre>

<p>This was at console I observed.</p>

<p>Can anyone help me to find where I have mistaken.</p>