My Code xml:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:paddingTop="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/home_header"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginTop="35dp"
android:paddingLeft="20dp"/>
<TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintTextAppearance="@android:style/TextAppearance.Medium"
android:id="@+id/textInputLayout_carRegNumber">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/editText_carRegNumber"
/>
</TextInputLayout>
</LinearLayout>
I am using the above layout in a Fragment class and the error I am getting is;
android.view.InflateException: Binary XML file line #25: Error inflating class TextInputLayout
I know my class should extend AppCompatActivity but I am working with Fragment because I am using Tabs from the support design library. How can I work with TextInputLayout inside Fragment class?