Saving text into a list from Azure
<p>I have made an application where the user enters text into a textbox  which gets sent up to azure once a button is clicked. Once the user clicks the button they are taking to a separate java activity where the text from the textbox is added to a listbox. However once I close the app or change screen the text is not saved into the listbox permanently even though it is saved in the Azure. Can anyone help me to add the text from azure to my listbox permanently. The listbox is on my ListDeadlines activity.</p>

<p>My Code is as fallows</p>

<p>AddDeadline Activity</p>

<pre><code> private MobileServiceClient mClient;
private EditText title;
public EditText editText;
public EditText editDate;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_add_deadline);

    try {
        mClient = new MobileServiceClient(
                "https://craigsapp.azure-mobile.net/",
                "BTkcgnFQvevAdmmRteHCmhHPzdGydq84",
                this
        );
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    editText = (EditText)findViewById(R.id.editText2);
    editDate = (EditText)findViewById(R.id.editText3);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
   final ListDeadlines lst= new ListDeadlines();

    lst.txtInput=(EditText)findViewById(R.id.txtinput);

    ImageView btAdd=(ImageView)findViewById(R.id.btnAdd);

    btAdd.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            title= (EditText) findViewById(R.id.txtinput);

            Item item = new Item();
            item.Text = title.getText().toString();
            Intent returnIntent = getIntent();
            returnIntent.putExtra("result", item.Text = title.getText().toString());
            setResult(RESULT_OK, returnIntent);
            mClient.getTable(Item.class).insert(item, new TableOperationCallback&lt;Item&gt;() {
                public void onCompleted(Item entity, Exception exception, ServiceFilterResponse response) {
                    if (exception == null) {
                        // Insert succeeded
                    } else {
                        // Insert failed
                    }
                }
            });
            finish();
        }
    });
</code></pre>

<p>ListDeadline Activity </p>

<pre><code>public ArrayList&lt;String&gt; arrayList;
public ArrayAdapter&lt;String&gt; adapter;
public ArrayAdapter&lt;String&gt; newad;
public EditText txtInput;
public EditText txtDate;
public int ADD_DEADLINE_REQUEST=0;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_list_deadlines);
    final ListView listView = (ListView)findViewById(R.id.listv);
    String[] items= {""};
    arrayList=new ArrayList&lt;&gt;(Arrays.asList(items));
    adapter=new ArrayAdapter&lt;String&gt;(this,R.layout.list_item,R.id.txtitem,arrayList);
    listView.setAdapter(adapter);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);



}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    Item newitem = new Item();
    if (requestCode == ADD_DEADLINE_REQUEST){
        if (resultCode == RESULT_OK) {
            String item = data.getStringExtra("result");
            arrayList.add(item);
            adapter.notifyDataSetChanged();
            Toast toast = Toast.makeText(getApplicationContext(),
                    "Deadline has been added", Toast.LENGTH_SHORT);
            toast.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL, 100, 0);
            toast.show();
        }
    }
}
</code></pre>