I need to save user input to shared preferences and also show it from shared preferences in a listview. How can I do this?

Right now my code adds to listview, but does not save it.

```
ListView listView;
Button AddWebsiteBtn;
EditText WebsiteName;
String[] ListOfWebsites = new String[]{};
SharedPreferences preferences;
SharedPreferences.Editor editor;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_add);
    listView = (ListView) findViewById(R.id.list_of_websites);
    AddWebsiteBtn = (Button) findViewById(R.id.btn_submit);
    WebsiteName = (EditText) findViewById(R.id.website_name);

    //using this part to add it to listview, maybe will need to remove it when shared preferences will work
    final List< String > ListElementsArrayList = new ArrayList< String >
            (Arrays.asList(ListOfWebsites));

    final ArrayAdapter < String > adapter = new ArrayAdapter< String >
            (AddActivity.this, android.R.layout.simple_list_item_1,
                    ListElementsArrayList);

    listView.setAdapter(adapter);

    AddWebsiteBtn.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {

            ListElementsArrayList.add(WebsiteName.getText().toString());
            adapter.notifyDataSetChanged();
        }
    });
}

```