I can not deal with SharedPreferences. It is necessary that when you click on the button, it hides and in the SharedPreferences, for example, the number 1 is recorded.

Upon entering the application, the value from SharedPreferences would be read again, and if there is a value of 1, the button would not be shown.

    1 answer 1

    SharedPreferences sPref = getSharedPreferences("val", context.MODE_PRIVATE); int val = sPref.getInt("val", 0); if( val == 0 ){ button.setVisible(View.VISIBLE); } ....... //в обработчике кнопки SharedPreferences sPref = getSharedPreferences("val", MODE_PRIVATE); SharedPreferences.Editor editor = sPref.edit(); editor.putInt("val",1); editor.commit(); 

    something like this is possible typos ─ there is no way to check, but the principle is

    • Thank you for what you need! - Rammsteinik