I want to create a custom dialog with the layout as shown in the picture.
The cross/cl

![anybody can try above all but u will be facing problem background color problem
i have done very simple way
the dialog must be like that
private void ChildSectionView() {
final Dialog dialog = new Dialog(NewObservationActivity.this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.custom_dialog_obs_children);
// Grab the window of the dialog, and change the width
dialog.getWindow().setBackgroundDrawable(
new ColorDrawable(android.graphics.Color.TRANSPARENT));
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
Window window = dialog.getWindow();
lp.copyFrom(window.getAttributes());
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
lp.width = size.x;
lp.height = size.y;
// This makes the dialog take up the full width
window.setAttributes(lp);
gridview = (GridView) dialog.findViewById(R.id.gridview_observation);
ImageView icon_close = (ImageView) dialog.findViewById(R.id.icon_close);
child_count = (TextView) dialog
.findViewById(R.id.text_child_count_dialog);
child_count.setText("Selected " + intList.size() + " more children");
SearchView searchview = (SearchView) dialog
.findViewById(R.id.search_children);
icon_close.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialog.dismiss();
}
});
searchview.setOnQueryTextListener(new OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String arg0) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean onQueryTextChange(String string) {
filItemAdapter("N", string);
return false;
}
});
filItemAdapter("", "");
dialog.show();
}
Note :-------
the relative layout background should be transparent and dialog background also dialog.getWindow().setBackgroundDrawable( new ColorDrawable(android.graphics.Color.TRANSPARENT));][2]