What can be done? EditText is initially invisible, I understand that when you turn the screen it becomes again invisible.

    1 answer 1

    protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt("count", cnt); // тут сохраняем переменные Log.d(LOG_TAG, "onSaveInstanceState"); } protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); cnt = savedInstanceState.getInt("count"); ф // восстанавливаем состояние Log.d(LOG_TAG, "onRestoreInstanceState"); }