android - Exception when EditText is placed after Buttons -


the following layout gives error upon application starts

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/hud"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:background="#2d4673"     android:gravity="center"     android:orientation="horizontal" >      <button         xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/b1"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b1" >     </button>      <button         xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/b2"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b2" >     </button>      <button         xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/b3"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b3" >     </button>      <button         xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/b4"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b4" >     </button>      <textview         xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/txt"         android:layout_width="fill_parent"         android:layout_height="48dp"         android:background="#2d4673"         android:textcolor="#bcd6e0"         android:textsize="36dp"         android:typeface="monospace" >     </textview>  </linearlayout> 

however when textview placed before buttons in same linearlayout, works properly.

what problem here?

remove namespace xmlns:android="http://schemas.android.com/apk/res/android" tags except parent layout.

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/hud"     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:background="#2d4673"     android:gravity="center"     android:orientation="horizontal" >      <button         android:id="@+id/b1"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b1" >     </button>      <button         android:id="@+id/b2"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b2" >     </button>      <button         android:id="@+id/b3"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b3" >     </button>      <button         android:id="@+id/b4"         android:layout_width="48dp"         android:layout_height="48dp"         android:text="b4" >     </button>      <textview         android:id="@+id/txt"         android:layout_width="fill_parent"         android:layout_height="48dp"         android:background="#2d4673"         android:textcolor="#bcd6e0"         android:textsize="36dp"         android:typeface="monospace" >     </textview>  </linearlayout> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -