Every version of android has his own dialog border, older android used some ugly border for dialogs. since we write an application different version of android we must create a formal look for dialogs in app.
this sample show you, how to remove dialogs border:

Activity


Dialog dialog = new Dialog(this,R.style.ThemeDialogCustom);
    dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);

    //you can move the dialog, so that is not centered
    // dialog.getWindow().getAttributes().y = 50; //50 should be based on density

    dialog.setContentView(yourLinearLayout);
    dialog.setCancelable(true);
    //dialog.setOnCancelListener(cancelListener);
    dialog.show();

add this to styles.xml


<style name="ThemeDialogCustom">
    <item name="android:windowFrame">@null</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
    <item name="android:colorBackgroundCacheHint">@null</item>
   </style>