0

これは私のログイン レイアウトの XML ファイルです。現在、Java コーディングを使用せずにアプリケーションのレイアウト部分のみを作成しています。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/login_background"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".LoginActivity" >

<TextView
    android:id="@+id/login_heading"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:text="@string/tv_login_heading"
    android:textColor="#000"
    android:textSize="20sp"
    android:textStyle="bold" />

<EditText
    android:id="@+id/et_uname"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="60dp"
    android:hint="@string/et_uname_hint"
    android:inputType="textEmailAddress"
    android:textColor="@string/tx_color" >


</EditText>

<EditText
    android:id="@+id/et_pwd"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="20dp"
    android:ems="10"
    android:hint="@string/et_pwd_hint"
    android:inputType="textPassword"
    android:textColor="@string/tx_color" />

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="30dp" >

    <TextView
        android:id="@+id/tv_register"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:gravity="center"
        android:text="@string/register"
        android:textColor="@string/tx_color" />

    <TextView
        android:id="@+id/tv_settings"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:text="@string/settings"
        android:textColor="@string/tx_color" />

</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="30dp" >

    <Button
        android:id="@+id/btn_login"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@string/btn_login"
        android:textColor="@string/tx_color" />

    <Button
        android:id="@+id/btn_exit"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="@string/btn_exit"
        android:textColor="@string/tx_color" />

</LinearLayout>

私の電話micromax canvas a110で実行すると、log catに次のエラーが生成されます

07-22 15:02:34.210: E/AndroidRuntime(26110): java.lang.RuntimeException: Unable to start activity ComponentInfo{in.blogspot.pcnlap.sha_login_activity_2/in.blogspot.pcnlap.sha_login_activity_2.LoginActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class android.widget.EditText

24行目の編集テキストが原因で生成されると考えています。これを解決するアイデアはありますか?

4

1 に答える 1