The following is required - the user sees the line "Enter your target" clicks on this line, adds text and by pressing the "ok" button on the keyboard, the entered text should be saved and shown at all subsequent openings of the application, how to implement it?

  • 2
    No alignment with TextView is required, EditText is a successor to TextView and so (implements all TextView methods and parameters). EditText has an android:hint parameter that displays an input prompt. How to save input is a lot of options and you cannot choose the right one from your question, since you didn’t write any implementation details, but perhaps you can be saved in SharedPreferences using onSaveInstanceState() and onRestoreInstanceState() . - pavlofff
  • To display the tooltip in EditText, use the android:hint property. When you enter values ​​in the field, the prompt will disappear. If you delete all the values ​​from the field, it will reappear. About the subsequent opening of the application with the saved data is worth looking towards the Preferences . - nuqss

0