I have created a customized dialog
and applied the layout xml
to it. But the layout
is always applied to the body of the dialog
and never to the title section. All what I can do is to set the title of the dilaog
programmatically using setTitle
and add an icon using setFeatureDrawableResource
. Please let me know how to customize the title section of a customized dialog
?
Side Question: today when I accessed my stackoverflow account I found that, there are more than 200 points are deducted? any Idea why?
Java_Code:
reportDialog = new Dialog(MeetingPointFix.this);
reportDialog.requestWindowFeature(Window.FEATURE_LEFT_ICON);
reportDialog.setCancelable(false);
LayoutInflater reportAlertDialogLayoutInflater = LayoutInflater.from(getApplicationContext());
View reportAlertDialogInflatedView = reportAlertDialogLayoutInflater.inflate(R.layout.meetingpointfix_report_dialog, null);
reportDialog.setContentView(reportAlertDialogInflatedView);
int [] viewsRefsIds = {R.id.reportLocNameValue, R.id.reportLocLatValue, R.id.reportLocLngValue, R.id.reportTimeValue,
R.id.reportDateValue, R.id.reportImgTitleValue, R.id.reportImgPathValue
};
reportDialog.setTitle(REPORT_ALERT_DIALOG_TITLE);
reportDialog.setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.reporticon01);
TextView reportDialogMSG = (TextView) reportDialog.findViewById(R.id.reportDialogMessageValue);
Button reportOkBtn = (Button) reportDialog.findViewById(R.id.reportOkBtnID);
Button reportNavigateBtn = (Button) reportDialog.findViewById(R.id.reportNavigateBtnID);