You have to manually do so using saved instance state. It is not about just saving Hello. This is a very common use case. Suppose the user types in something, and then rotates the phone. If due to any reason, the text goes away, the user has to type everything. So you have to save the text somewhere.
https://developer.android.com/guide/topics/resources/runtime-changes.html
So what you have to do is:
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
//Here savedStateValue is a global string
savedStateValue = //Get the Text From Edit Text here;
outState.putString("savedStateKEY", savedStateValue);
}
and in onCreate, do something like this:
if (savedInstanceState != null) {
//Restore the Text to EditText
editText.setText(savedInstanceState.getString("savedStateKEY"));
}
EDIT
The second part is why is it happening. It because, you are removing the "Hello" text and on screen orientation change, it is restoring the data from the Bundle that was passed from initial state. In that bundle, there is no "Hello" because you have removed it manually.
So if you are using
android:saveEnabled="false"
Then you are making android not to save any state in the EditText.