Code example for EditText

Methods: setHint

0
			TextView textView = new TextView(this);
			textView.setText(getDialogText());
			textView.setTextAppearance(this, android.R.style.TextAppearance_Medium);
			textView.setPadding(textView.getPaddingLeft() + padding, textView.getPaddingTop(), textView.getPaddingRight() + padding, textView.getPaddingBottom() + padding);
			layout.addView(textView, LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
			textEdit = new EditText(this);
			textEdit.setHint(getDialogMessageHint());
			layout.addView(textEdit, LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
			dialog.setView(layout);
		} 
		final EditText text = textEdit;
		dialog.setPositiveButton(getDialogPositiveButtonText(), new DialogInterface.OnClickListener() {
			 
			@Override 
			public void onClick(DialogInterface dialog, int which) {
				Intent i = getIntent();
				i.setClass(ExceptionReportActivity.this, ExceptionReportService.class);
				if (text != null && !TextUtils.isEmpty(text.getText())) {
					i.putExtra(ExceptionReportService.EXTRA_EXTRA_MESSAGE, text.getText().toString());
				} 
				i.putExtra(ExceptionReportService.EXTRA_MANUAL_REPORT, true);