Wednesday, 26 August 2015

android, Focus on the first edittext


On my android page,  I got couple of input boxes (edittext).

when it is displaying. the last input boxes always get the focus.


to fix that:


EditText firsteditText=(EditText)findViewById(R.id.first);
EditText secondeditText=(EditText)findViewById(R.id.second);
EditText thirdeditText=(EditText)findViewById(R.id.third);
EditText fourtheditText=(EditText)findViewById(R.id.fourth);

     firsteditText.requestFocus();








No comments:

Post a comment