Android实现按回车确认键显示其它输入框的EditText
代码说明:
Android实现按回车确认键显示其它输入框的EditText,在正常状态下,其它部分的EditText是灰色的,当按下回车键后,高亮显示进入输入状态,相关代码可参考如下代码: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); editTexts[0] = (EditText) findViewById(R.id.edittext1); editTexts[1] = (EditText) findViewById(R.id.edittext2); editTexts[2] = (EditText) findViewById(R.id.edittext3); for (int i = 0; i < editTexts.length; i++) editTexts[i].setOnKeyListener(this); buttons[0] = (Button) findViewById(R.id.button1); buttons[1] = (Button) findViewById(R.id.button2); buttons[2] = (Button) findViewById(R.id.button3); }
下载说明:请别用迅雷下载,失败请重下,重下不扣分!