Exemplo n.º 1
0
 @Override
 protected void onResume() {
   user = GeekApplication.getUser();
   if (user != null) {
     userId = user.getId();
     token = user.getToken();
   }
   getAddressList();
   super.onResume();
 }
  @Override
  protected void onResume() {
    super.onResume();
    user = GeekApplication.getUser();
    if (user != null) {
      userId = user.getId();
      token = user.getToken();
      getCarts();

    } else {
      userId = "";
      token = "";
      mListView.setVisibility(View.GONE);
      mBottomLayout.setVisibility(View.GONE);
      mEmptyLayout.setVisibility(View.VISIBLE);
    }
    getGuessLike();
  }
Exemplo n.º 3
0
  private void deleteAddress(final Address address) {
    loadingDialog.show();
    APIControl.getInstance()
        .deleteAddress(
            this,
            address.getId(),
            user.getId(),
            user.getToken(),
            new DataResponseListener<CommonData>() {

              @Override
              public void onResponse(CommonData o) {
                loadingDialog.dismiss();
                if (o.getStatus() == 200) {
                  getAddressList();
                } else {

                }
              }
            },
            errorListener(""));
  }