Hi ameya, I think u may have did little bit mistake in your application, if you will implement these things in the following way, offcource you will got the solution.
Suppose you are using Layout as *account* and Activity as *AccountActivity*, you need to do the following modification in there account.xml <?xml version="1.0" encoding="UTF-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content"> <RelativeLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="left"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="4dip" android:paddingLeft="4dip" android:text="Email address:" android:id="@+id/emailtext"/> <EditText android:id="@+id/email" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="8dip" android:layout_marginRight="8dip" android:hint="Your email address" android:inputType="textEmailAddress" android:layout_below = "@id/emailtext"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="4dip" android:paddingLeft="4dip" android:text="Password:" android:id="@+id/passwdtext" android:layout_below = "@id/email" /> <EditText android:id="@+id/password" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="8dip" android:layout_marginRight="8dip" android:hint="Your password" android:inputType="textPassword" android:layout_below = "@id/passwdtext"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="2dip" android:id="@+id/space1" android:layout_below = "@id/password" /> <Button android:id="@+id/validate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="continue" android:layout_below = "@id/space1" android:layout_centerInParent = "true"/> </RelativeLayout> </ScrollView> </LinearLayout> AccountActivity //package //import public class AccountActivity extends Activity implements OnClickListener, AlertDialog.OnClickListener { private EditText userNameEditText; private EditText passwordEditText; private Button validateAccountButton; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.account); userNameEditText = (EditText) findViewById(R.id.email); passwordEditText = (EditText) findViewById(R.id.password); validateAccountButton = (Button) findViewById(com.skyscape.packageajccsevenektwondata.android.voucher.ui.R.id.validate); validateAccountButton.setOnClickListener(this); } public void onClick(View view) { if (view == validateAccountButton) { validate(); } } protected void validate() { //Validate your Account } public boolean onKeyDown(int keyCode, KeyEvent event) { return super.onKeyDown(keyCode, event); } } If you implement in this way, i think you will got your desired result. Let me know if you still have doubt. Regards, Rajiv On Thu, Jun 3, 2010 at 7:17 PM, ameya dandekar <ameya...@gmail.com> wrote: > Hi, > I am currently working on sdk 1.5, in which i want capture the Click event > of Enter key on Virtual Keypad. > My requirement is, for my Username/Password Login screen. Click on Username > field. Cursor is displayed in Text entry box. Click on Enter key on Virtual > Keypad. Cursor should be displayed in Password field. Take the cursor in > Password field. Click on Enter key on Virtual Keypad. Virtual Keypad should > be closed. > I am testing the app on HTC Magic. > > Regards, > Ameya. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en