To fix the issue you can do Pop up or custom Alert dialog may solve your problem. But simple solution is take another layout in xml of the activity. In that layout add those edittexts and buttons. Set its visibility to false. And when you want to show then, make layout's visibility to true.
hop of those help? Create drawable xml for your button and edittext and set them as background... Take a LinearLayout with orientation horizontal and weightsum == 1 and put both in it button_border.xml