Code example for ActionBarActivity

Methods: onResume

0
        super.onPause(); 
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
        if (categories != null) {
            createAdapter(); 
        } else { 
            loadCategories(); 
        } 
    } 
 
    private void createAdapter() { 
        if (categories != null) {
            listAdapter = new ArrayAdapter<String>(this,
                    android.R.layout.simple_list_item_1, categories);
            txtvStatus.setText(R.string.no_items_label);
            listView.setAdapter(listAdapter);
        } 
    }