title: Saving Listview item permanently in the android application
body: <p>I have created an android application in which the value i give in edittext will be displayed on listview,  but when i click back to another activity and return back to the listview activity the listview items will be disappeared.  Please tell me how to save listview items permanently in the activity.</p>
  
  <p>Below is my code.</p>
  
  <pre><code>   public class Edit extends Activity {
  </code></pre>
  
  <p>ArrayList listitems=new ArrayList();
  ArrayAdapter adapter;</p>
  
  <pre><code>    /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_edit);
      getActionBar().setDisplayHomeAsUpEnabled(true);
      getActionBar().setDisplayShowHomeEnabled(false);
      final EditText et=(EditText)findViewById(R.id.editText1);
      Button bt=(Button)findViewById(R.id.button1);
      ListView lv=(ListView)findViewById(R.id.listView1);
      adapter=new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1,listitems);
      lv.setAdapter(adapter);
  
      bt.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              listitems.add(et.getText().toString());
              adapter.notifyDataSetChanged();
  </code></pre>