سؤال

For some reason i don't know graphical layout on eclipse stop working

After some test i know the probleme is the EditText

I don't know why i paste here my EditText tell me if i do something wrong

<EditText
    android:id="@+id/input"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:ems="10" android:inputType="">
    <requestFocus />
</EditText>

Eclipse error log is:

String index out of range: 0
هل كانت مفيدة؟

المحلول

Just add android:inputType="" to some type which you want like "text".It will work fine.

نصائح أخرى

<EditText
    android:id="@+id/input"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:ems="10" android:inputType="PLS FILL ME">
    <requestFocus />
</EditText>

You should either remove android:inputType="" or fill it with some valid value

Either you have to remvoe the inputType from your edit text or you have to enter some value in this field :

Put some value :

<EditText
    android:id="@+id/input"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:ems="10"
    android:inputType="text" >

    <requestFocus />
</EditText>

Or remove the tag

<EditText
    android:id="@+id/input"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:ems="10" >

    <requestFocus />
</EditText>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top