you need to follow below steps
1) have a button there which you want to use for finish writing, and set its property to "invisible" or "gone"
2) set a listener for editbox ( using setOnClickListener ) which you said is too small
3) in listener write the code to increase the width, you will first need to get layoutParam from editbox, update width for layoutParam, and assign it back to edit box
to strech it you need to follow these steps
1) create animation xml in drawable/anim folder i.e. myAnim.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true">
<scale android:fromXScale=".9"
android:toXScale="1"
android:fromYScale=".7"
android:toYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:duration="300"
android:interpolator="@android:anim/linear_interpolator"/>
<alpha android:fromAlpha="0"
android:toAlpha="1"
android:duration="300"
android:interpolator="@android:anim/linear_interpolator" />
</set>
2) Load above animation during create method
Animation myAnimation= AnimationUtils.loadAnimation(this, R.anim.myAnimation);
3) call this code from listener mentioned in first part of my answer
button.startAnimation(myAnimation);