Code example for ScrollView

Methods: addView, setPadding

0
		AlertDialog.Builder builder = new Builder(getActivity());
		TextView textView = new TextView(getActivity().getApplicationContext());
		textView.setTextAppearance(getActivity(), android.R.style.TextAppearance_Medium);
		Bundle args = getArguments();
		textView.setText(args.getCharSequence("message"));
		ScrollView scrollView = new ScrollView(getActivity().getApplicationContext());
		scrollView.addView(textView);
		scrollView.setPadding(16, 16, 16, 16); // CHECKSTYLE IGNORE THIS LINE
		builder.setView(scrollView);
		ConfirmDialogListener listener = getListener();
		builder.setPositiveButton(android.R.string.ok, listener);
		builder.setNegativeButton(android.R.string.cancel, listener);
		builder.setTitle(R.string.confirm_dialog_title);
		return builder.create();
	} 
 
	/** 
	 * 色々初期設定 
	 * @param message 
	 *           メッセージ 
Connect your IDE to all the code out there  Get Codota for Java