Ejemplo n.º 1
0
  public void updateLoginStatus() {
    UserInfo userInfo = UserInfo.getCurLoggedinUser();
    if (null == userInfo) {
      mNameTextView.setText(R.string.app_name);
      HomeActivity app = HomeActivity.getApp();
      app.getBookGallery().clearLoggedinStatus();
      app.getSocialPanel().getFriendsView().clear();
      app.getSocialPanel().getUsersView().clear();

      mLoginBtn.setVisibility(VISIBLE);
      mLogoutBtn.setVisibility(GONE);
    } else {
      mNameTextView.setText(userInfo.getDisplayName());
      mLoginBtn.setVisibility(GONE);
      mLogoutBtn.setVisibility(VISIBLE);
    }
  }
Ejemplo n.º 2
0
 private void doAfterGetUserInfoByToken(int returnCode) {
   if (CloudAPI.isSuccessful(mContext, returnCode)) {
     HomeActivity.getApp().getBookGallery().updatePanels(UserInfo.getCurLoggedinUser());
     HomeActivity.getApp().getSocialPanel().getFriendsView().refreshList();
   }
 }