Android: refresh ArrayList
<p>I have a array list variable where I am getting all data. Also I have a popupmenu. When I click on the menu the array list should refresh but its not happening</p>

<pre><code>public void DoAction(View v, Activity activity, final AlertDialog alert) {

        Context myContext = v.getContext();

        PopUpMenu popUpMenu = (PopUpMenu) v.getTag();
        String result = popUpMenu.getMenuName();
        if (result != null
                &amp;&amp; result.equalsIgnoreCase(myContext.getResources().getString(
                        R.string.showdist))) {
            showPopupSearchPref(myContext, activity);
        }


        else if (result != null
                &amp;&amp; result.equalsIgnoreCase(myContext.getResources().getString(
                        R.string.syncnow))) {

            Synchronization sync = new Synchronization(v.getContext());
            sync.initiatePushSync(Calendar.SECOND, 0);
            sync.initiatePullSync(Calendar.SECOND, 0);
            Constants.Data = ((myPreferences) myContext.getApplicationContext()).getAllAttractions(true,Constants.field, Constants.order);          
            activity.finish();
</code></pre>

<p>When I click on the <code>syncnow</code> the data in the <code>Constants.Data</code> array list should get refreshed.
Any help is appreciated</p>
