-4

when i am going to design the activity_mail.xml i just change the layout type as LinearLayout but i cannot write anything i created to look like this i cannot write the android:layout_width height inside the EditText why i don't

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <EditText/>



</LinearLayout>
CHINNA CHARY
  • 21
  • 1
  • 7
thusy ram
  • 1
  • 4

3 Answers3

1

Try like below:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <EditText 
        android:layout_height="wrap_content"
        android:layout_width="match_parent" />

</LinearLayout>
Md. Asaduzzaman
  • 14,963
  • 2
  • 34
  • 46
0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <EditText 
        android:layout_height="wrap_content"
        android:layout_width="match_parent" />

 <TextView
        android:layout_height="wrap_content"
        android:layout_width="match_parent" />

</LinearLayout>
Shivam Oberoi
  • 1,447
  • 1
  • 9
  • 18
0

Gradle (click elephant icon) or File -> Inviladate Cache/Restart

Rofie Sagara
  • 289
  • 5
  • 17