title: Set cursor position in edittext android
body: <p>I have implemented a text editor type application in android, the issue is when i re-open the activity in which i have placed my multi-line edit text, the cursor is always set to the start position of the edit text. so when ever i tried to enter the text it was added to the start position, i solved this issue, by using, </p>
  
  <pre><code>EditText.setSelection(EditText.getText().length());
  </code></pre>
  
  <p>But now, i cannot edit any text that is already written in the edit text view because, my cursor always moves to the end of the text.</p>
  
  <p>I want to place the cursor such that i can edit any text , any line any paragraph written in my edit text box, what should i do.</p>
  
  <p>Below is the xml of my Edit text</p>
  
  <pre><code>&lt;EditText
          android:id="@+id/editText11"
          android:layout_width="wrap_content"
          android:layout_height="200sp"
          android:layout_above="@+id/horizontalScrollView1"
          android:layout_alignParentLeft="true"
          android:layout_alignParentRight="true"
          android:layout_alignParentTop="true"
          android:gravity="top"
          android:background="#00000000"
          android:inputType="textMultiLine"
          android:singleLine="true" &gt;
  
          &lt;requestFocus /&gt;
  </code></pre>