@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); reviewAdapter = new ReviewDataAdapter(this); reviewAdapter.open(); // Get all reviews in descending order List<Review> reviews = reviewAdapter.getAllDesc(); ReviewArrayAdapter reviewArrayAdapter = new ReviewArrayAdapter(this, reviews); setListAdapter(reviewArrayAdapter); }
@Override protected void onPause() { reviewAdapter.close(); super.onPause(); }
@Override protected void onResume() { reviewAdapter.open(); super.onResume(); }