So basically AlertDialog type of the window will work but i need to customize the body. So, having my layout defined in xml i'm trying the following:
Using java Syntax Highlighting
- private void onAbout() {
- final Builder winAlert;
- Dialog winDialog;
- OnClickListener okListener = new OnClickListener() {
- // @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.cancel();
- return;
- }
- };
- winAlert = new AlertDialog.Builder(this).setIcon(R.drawable.icon)
- .setTitle("My title").setPositiveButton(
- "Ok", okListener);
- winDialog = winAlert.create();
- // winAlert.setCanceledOnTouchOutside(true);
- // winDialog.setContentView(R.layout.about);
- // winDialog.addContentView(findViewById(R.layout.about),
- // new LayoutParams(LayoutParams.FILL_PARENT,
- // LayoutParams.FILL_PARENT));
- winDialog.show();
- }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
it works until i do set content view to it , and after i do it's crashes ( never mind commented code i was trying different things). When i'm trying just use the Dialog , i'm losing control over the title ( i mean i can't add / change icon ).
So what should i do here ? I mean I can go towards creating AboutWindow and extending Dialog and set content in onCreate, but it feels like an overkill


