I am currently developing an app with Samsung Galaxy Tab 2 as my device.
My Code in the XML is:
You Can Try This
yourEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if(hasFocus){
yourEditText.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
}
}
});
Import LayoutParams of your Parent Layout. Your answer will also work well.