2013-07-31 61 views

回答

0
editText.setOnClickListener(new OnClickListener(){ 

    @Override 
    public void onClick(View arg0) 
    { 
     //start your activity here 
    } 

}); 
4

對於這一點,你必須overrideEditTextonFocusChangeListener這樣

EditText edittxt = (EditText) findViewById(R.id.youredittext); 
    edittxt.setOnFocusChangeListener(new OnFocusChangeListener() 
    { 
     @Override 
     public void onFocusChange(View v, boolean hasFocus) 
     { 
      if (hasFocus == true) 
      { 
       Intent intent = new Intent(this, DisplayMessageActivity.class); 
       startActivity(intent); 
      } 
     } 
    });