Search in sources :

Example 1 with HogsBugsAdapter

use of edu.berkeley.cs.amplab.carat.android.lists.HogsBugsAdapter in project carat by amplab.

the class BugsOrHogsFragment method refresh.

public void refresh() {
    if (getActivity() == null)
        Log.e("BugsOrHogsFragment", "unable to get activity");
    CaratApplication app = (CaratApplication) getActivity().getApplication();
    final ListView lv = (ListView) getActivity().findViewById(android.R.id.list);
    if (isBugs) {
        if (CaratApplication.storage.getBugReport().length == 0)
            return;
        else
            lv.setAdapter(new HogsBugsAdapter(app, CaratApplication.storage.getBugReport()));
    } else
        lv.setAdapter(new HogsBugsAdapter(app, CaratApplication.storage.getHogReport()));
}
Also used : ListView(android.widget.ListView) HogsBugsAdapter(edu.berkeley.cs.amplab.carat.android.lists.HogsBugsAdapter) CaratApplication(edu.berkeley.cs.amplab.carat.android.CaratApplication)

Aggregations

ListView (android.widget.ListView)1 CaratApplication (edu.berkeley.cs.amplab.carat.android.CaratApplication)1 HogsBugsAdapter (edu.berkeley.cs.amplab.carat.android.lists.HogsBugsAdapter)1