I am recently working on Android app development and had an issue with TabHost and EditText inside that TabHost.
somehow, when I was trying to insert a value in that EditText, focus was set automatically on tab and was not able to type anything.
Tried hard to google and came to know that its a bug and Good team is working on it as of today. But there is a workaround for this problem as below –
txtDescription = (EditText) V.findViewById(R.id.txtAttactmentDescription);
txtDescription.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
txtDescription.requestFocusFromTouch();
return false;
}
});
Leave a comment