I did some work on this code tested on nuxes 5, the cross in the attached image is the image
dialog.xml
<RelativeLayout android:layout_marginTop="20dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="20dp" android:background="@drawable/rounded_border" android:paddingBottom="20dp" android:gravity="center_horizontal" > <TextView android:id="@+id/label_popup" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="40dp" android:gravity="center_horizontal" android:text="@string/label_recive_pin" android:textColor="@color/green_line" android:padding="5dp" android:textScaleX="1.3" android:textSize="18sp" /> <EditText android:id="@+id/edtpin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/label_popup" android:layout_centerHorizontal="true" android:layout_marginTop="40dp" android:background="@color/edit_green_bg" android:ems="15" android:gravity="center_horizontal" android:hint="@string/enter_email" android:inputType="textEmailAddress" android:paddingBottom="10dp" android:paddingTop="10dp" android:textColor="@color/edit_green_txt" android:textSize="15sp" > <requestFocus /> </EditText> <Button android:id="@+id/btnLogin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/edtpin" android:layout_alignRight="@+id/edtpin" android:layout_below="@+id/edtpin" android:layout_centerHorizontal="true" android:layout_marginTop="30dp" android:background="@drawable/btn_bg_darkgreen" android:onClick="onLoginButtonClick" android:text="@string/get_pin_btn_txt" android:textColor="@color/white" android:textSize="20sp" /> </RelativeLayout> <ImageView android:id="@+id/cancel_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:src="@drawable/cross_window" />
Layout rounded_border.xml
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item> <shape android:shape="rectangle" > <solid android:color="@color/white" /> <corners android:radius="12dip" /> <stroke android:width="1dip" android:color="@color/green_line" /> </shape> </item> </layer-list>
The inner dialog class in the onCreate method
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
Demonstration 
source share