[Solved] How to pass EditText value in SharedPreferences


You called these functions in onCreate function. You should put theme in a button’s listener

button.setOnClickListener(new View.OnClickListener {
    @Override
    private void onClick(View view){
        // get text from EditText
        // put text to SharedPreferences
    }
});

When application started, there is nothing in your EditText.

0

solved How to pass EditText value in SharedPreferences