clear text in edittext when entered using -'android,android-edittext'

clear text in edittext when entered  using -'android,android-edittext'

I'm trying to set and onclicklistener so that when I click within the edittext element it will clear its current contents. Is there something wrong here? When I compile this code I get a force quit and  ActivityManager: Can't dispatch DDM chunk 4d505251: no handler defined error.

public class Project extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    EditText editText = (EditText)findViewById(;
    public void onCreate(Bundle savedInstanceState) {




    public void onClick(View v) {
        // TODO Auto-generated method stub


asked Sep 7, 2015 by rajesh
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.