Scrollable EditText on custom dialog in android
<p>I need to put EditText box with vertical scrollbar on custom dialog.i.e when I entered more than one line on edittext, it should be scrolled. Here I used android: scrollable="vertical" on xml.
It works fine. When I use two edittext boxes, the curor will move to second edittext box when I press enter on first. Any mistakes?</p>

<p>My code... </p>

<pre><code>EditText edit1,edit,edit0;
Button ok;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //setContentView(R.layout.main);

    final Dialog dialog = new Dialog(summaact.this);
      dialog.setContentView(R.layout.main);
      edit0=(EditText)dialog.findViewById(R.id.edit0);
      edit=(EditText)dialog.findViewById(R.id.edit);
      edit1=(EditText)dialog.findViewById(R.id.edit1);

      edit0.setInputType(InputType.TYPE_NULL);
      edit.setInputType(InputType.TYPE_NULL);
      edit1.setInputType(InputType.TYPE_NULL);

      ok=(Button)dialog.findViewById(R.id.ok);
        dialog.setTitle("Content Management page");
        dialog.setCancelable(true);
        ok.setOnClickListener(new OnClickListener(){

             public void onClick(View v){
                 String str0=edit0.getText().toString(); 
                String str=edit1.getText().toString(); 
                String str1=edit.getText().toString(); 

                Toast.makeText(summaact.this,str0,Toast.LENGTH_SHORT).show();
                Toast.makeText(summaact.this,str,Toast.LENGTH_SHORT).show();
                Toast.makeText(summaact.this,str1,Toast.LENGTH_SHORT).show();


                dialog.dismiss();
             }
         });

         dialog.show();

    }
</code></pre>

<p>My xml... </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    &gt;
     &lt;EditText
    android:id="@+id/edit0"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 

 /&gt;
    &lt;EditText
    android:id="@+id/edit"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 

 /&gt;

&lt;EditText
    android:id="@+id/edit1"
    android:layout_width="fill_parent" 
    android:layout_height="100px" 
    android:scrollbars="vertical"


 /&gt;

 &lt;Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/ok"
    android:text="OK"/&gt; 

&lt;/LinearLayout&gt;
</code></pre>
