EditText设置键盘操作

<EditText android:id="@+id/some_edittext" 
         
android:layout_width="wrap_content" 
         
android:layout_height="wrap_content" 
         
android:imeOptions="actionSend"> 
</EditText> 
 
 
some_edittext.setOnEditorActionListener(new OnEditorActionListener() { 
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { 
        if (actionId == EditorInfo.IME_ACTION_SEND) { 
            some_button.performClick(); 
        } 
        return true; 
    } 
}); 

你可能感兴趣的:(android)