title: Why does my EditText got expanded horizontally or vertically after setting Width and Height as wrap_content in android?
body: <p>I'm newbie to android. So I'm struggling with the following problem.</p>
  
  <p>1.after set <code>android:layout_width = "wrap_content"</code> in EditText, it got expanded vertically.</p>
  
  <p>2.after set <code>android:layout_width="180dp"</code> in EditText, it got expanded horizontally.</p>
  
  <p>Is there anyway to set my EditText fixed? Ex: If am going to type a long email address in EditText, font size of the text should get shrinked based on long text instead of EditText getting expanded. is there any possibility to achieve this task?</p>
  
  <p>here is my code</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"                            android:layout_width="match_parent"
  android:layout_height="match_parent" 
  
  tools:context="com.vadmin.myrx.SendReport"&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="Doctor Email"
      android:textStyle="bold"
      android:id="@+id/textView1"
      android:layout_marginTop="75dp"
      android:layout_marginLeft="25dp"
      android:layout_marginStart="25dp"
      android:layout_alignParentTop="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true" /&gt;
  
  &lt;EditText
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:hint="example@xyz.com"
      android:padding="3dp"
      android:background="@drawable/text_oval"
      android:id="@+id/textView2"
      android:layout_alignBottom="@+id/textView1"
      android:layout_alignParentRight="true"
      android:layout_alignParentEnd="true"
      /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="Phone"
      android:textStyle="bold"
      android:id="@+id/textView3"
      android:layout_marginRight="24dp"
      android:layout_marginEnd="24dp"
      android:layout_marginTop="44dp"
      android:layout_below="@+id/textView1"
      android:layout_alignRight="@+id/textView1"
      android:layout_alignEnd="@+id/textView1" /&gt;
  
  &lt;EditText
      android:layout_width="180dp"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:hint="+91 0000 000 000"
      android:padding="3dp"
      android:id="@+id/textView4"
      android:layout_alignTop="@+id/textView3"
      android:layout_alignLeft="@+id/textView2"
      android:layout_alignStart="@+id/textView2"
      android:background="@drawable/text_oval"/&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="Report"
      android:textStyle="bold"
      android:id="@+id/textView5"
      android:layout_marginTop="45dp"
      android:layout_below="@+id/textView4"
      android:layout_alignRight="@+id/textView3"
      android:layout_alignEnd="@+id/textView3" /&gt;
  
  &lt;Spinner
      android:layout_width="250dp"
      android:layout_height="48dp"
      android:id="@+id/spinner"
      android:spinnerMode="dropdown"
      android:background="@android:drawable/btn_dropdown"
      android:layout_alignTop="@+id/textView5"
      android:layout_alignLeft="@+id/textView4"
      android:layout_alignStart="@+id/textView4" /&gt;
  
     &lt;Button
         android:layout_width="wrap_content"
         android:layout_height="40dp"
         android:text="Save"
         android:layout_marginTop="57dp"
         android:id="@+id/button"
         android:layout_below="@+id/spinner"
         android:layout_toRightOf="@+id/textView3"
         android:layout_toEndOf="@+id/textView3"
         android:textColor="#000000"
          android:background="@drawable/oval"
  
         /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks
  Anita</p>
  
  <p><img src="https://i.stack.imgur.com/kumHB.png" alt="enter image description here"></p>