Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Android.Views.InflateException:

$
0
0

Getting Android.Views.InflateException when running my xamarin android project.

I found that this issue is because of the use of android:width instead of android:layout_width, but my main.axml not contain android:width.
Main.axml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" 
    android:layout_height="match_parent"
    android:background="#FFCDD2"
    android:orientation="vertical">
    <android.support.design.widget.TextInputLayout
        android:id="@+id/input_layout_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:id="@+id/input_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:hint="@string/hint_name" />
    </android.support.design.widget.TextInputLayout>
    <android.support.design.widget.TextInputLayout
        android:id="@+id/input_layout_email"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:id="@+id/input_email"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textEmailAddress"
            android:hint="@string/hint_email" />
    </android.support.design.widget.TextInputLayout>
    <android.support.design.widget.TextInputLayout
        android:id="@+id/input_layout_password"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <EditText
            android:id="@+id/input_password"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textPassword"
            android:hint="@string/hint_password" />
    </android.support.design.widget.TextInputLayout>
    <Button
        android:id="@+id/btn_signup"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/btn_sign_up"
        android:background="@color/colorPrimary"
        android:layout_marginTop="40dp"
        android:textColor="@android:color/white" />
</LinearLayout>

Please suggest a solution for this.
Thanks in advance :)


Viewing all articles
Browse latest Browse all 204402


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>