Code example for DialogFragment

Methods: onSaveInstanceState

0
		return input;
	} 
 
	@Override 
	public void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		outState.putCharSequence("content", input.getText());
	} 
 
	@Override 
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		input = new EditText(getActivity());
		String message = getArguments().getString("title");
		CharSequence content;
		if (savedInstanceState == null) {
			content = getArguments().getCharSequence("content");
		} else { 
			content = savedInstanceState.getCharSequence("content");
		} 
		input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI);
Experience pair programming with AI  Get Codota for Java