Code example for DialogFragment

Methods: onSaveInstanceState

0
	} 
	 
	 
	@Override 
	public void onSaveInstanceState(Bundle bundle) {
		super.onSaveInstanceState(bundle);
		bundle.putString("message", mMessage);
	} 
 
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		 
		final String[] members = getActivity().getResources().getStringArray(R.array.friends);
		final SparseBooleanArray selectedMembers = new SparseBooleanArray();
		 
		AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
		builder.setTitle("Add Members");
		builder.setIcon(R.drawable.add_group);
		builder.setMultiChoiceItems(R.array.friends, null, new OnMultiChoiceClickListener() {
			@Override 
			public void onClick(DialogInterface dialog, int which, boolean isChecked) {
				selectedMembers.put(which, isChecked);