Ejemplo n.º 1
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   final ActiveListings currentActiveListings = mActiveListingsAdapter.getActiveListings();
   if (currentActiveListings != null) {
     outState.putParcelable(STATE_ACTIVE_LISTINGS, currentActiveListings);
   }
 }
Ejemplo n.º 2
0
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    mPlayServicesHelper.handleActivityResult(requestCode, resultCode, data);

    if (requestCode == ListingAdapter.REQUEST_CODE_PLUS_ONE_BUTTON) {
      mActiveListingsAdapter.notifyDataSetChanged();
    }
  }
Ejemplo n.º 3
0
  @Override
  protected void onCreate(Bundle inState) {
    super.onCreate(inState);
    setContentView(R.layout.activity_main);
    loadViews();

    mPlayServicesHelper = new GooglePlayServicesHelper(this, mActiveListingsAdapter);

    showLoading();

    if (inState != null && inState.containsKey(STATE_ACTIVE_LISTINGS)) {
      mActiveListingsAdapter.success(
          (ActiveListings) inState.getParcelable(STATE_ACTIVE_LISTINGS), null);
    }
  }