use of edu.berkeley.cs.amplab.carat.android.CaratApplication 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()));
}
use of edu.berkeley.cs.amplab.carat.android.CaratApplication in project carat by amplab.
the class SettingsSuggestionsFragment method refresh.
public void refresh() {
CaratApplication caratAppllication = (CaratApplication) CaratApplication.getMainActivity().getApplication();
final ListView lv = (ListView) rootView.findViewById(android.R.id.list);
lv.setAdapter(new SettingsSuggestionAdapter(caratAppllication, CaratApplication.storage.getSettingsReport()));
}
use of edu.berkeley.cs.amplab.carat.android.CaratApplication in project carat by amplab.
the class SuggestionsFragment method refresh.
public void refresh() {
SimpleHogBug[] hogReport, bugReport;
hogReport = CaratApplication.storage.getHogReport();
bugReport = CaratApplication.storage.getBugReport();
if (hogReport.length == 0 && bugReport.length == 0)
return;
CaratApplication caratAppllication = (CaratApplication) CaratApplication.getMainActivity().getApplication();
final ListView lv = (ListView) root.findViewById(android.R.id.list);
lv.setAdapter(new HogBugSuggestionsAdapter(caratAppllication, hogReport, bugReport));
}
Aggregations