I want to create a custom dialog box like below
I have tried the foll
Create alert Dialog layout something like this
and Add below code on your Activity class
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LayoutInflater inflate = LayoutInflater.from(this);
alertView = inflate.inflate(R.layout.your_alert_layout, null);
Button btn= (Button) alertView.findViewById(R.id.btn);
showDialog();
}
public void showDialog(){
Dialog alertDialog = new Dialog(RecognizeConceptsActivity.this);
alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
alertDialog.setContentView(alertView);
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
alertDialog.show();
}