I am trying to do the same, and I think I was able to restore it. The first task was to determine which object they are using (I think this is a custom dialog). Ok, then just play around with positioning and other aspects, and I'll go there. I'm not sure about the aspect of 9 patches, but I start with a custom dialog with your layout and then configure the following options.
//create your dialog Dialog popup = new Dialog(this); //remove title bar popup.requestWindowFeature(Window.FEATURE_NO_TITLE); //set the layout resource popup.setContentView(R.layout.custom_dialog); //can be canceled popup.setCancelable(true); //touch outside of dialogue cancels popup.setCanceledOnTouchOutside(true); //set background to transparent instead of normal black popup.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); //grab the layout params WindowManager.LayoutParams lp = popup.getWindow().getAttributes(); //move the popup to desired location lp.y -= 160/lp.height; lp.x -= 70/lp.width; //remove the dim effect lp.dimAmount = 0; //set new params popup.getWindow().setAttributes(lp); //show the custom dialog popup.show();
source share