Q:

how to create transparent dialog NOT in full screen

I am creating a dialog and setting the content view. However my content view is surrounded by black background color. When I try to set the theme to translucent OR set the background drawable to transparent, then the dialog becomes full screen!
Any suggestion how  I can set the dialog to be transparent and NOT in full screen?
Thank you very much 
       diag = new Dialog(mActivity);
       //diag.getWindow().setBackgroundDrawable(new ColorDrawable(0)); --> I tried that
       //diag.getWindow().setBackgroundDrawableResource(android.R.color.transparent); -->I tried that too
       diag.requestWindowFeature(Window.FEATURE_NO_TITLE);
       diag.setContentView(R.layout.scoredialog);

A:

I know it's an old question, but others might find useful: 
Dialog dialog = new Dialog(mActivity);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.show();

