예제 #1
0
  @Override
  public void initLogic() {

    if (!SbbsMeAPI.isLogin()) {
      lvPullDown.setEnabled(false);
      lvPullDown.getListView().setEnabled(false);
      tvLoading.setText(R.string.not_login);
      tvLoading.setVisibility(View.VISIBLE);
      tvNodata.setText(R.string.no_data_cannot_refresh);
      tvNodata.setVisibility(View.VISIBLE);
    } else if (listMessage.size() == 0) {
      tvLoading.setVisibility(View.VISIBLE);
      loader.startLoading();
    }
    lvPullDown.notifyDidLoad();
    SbbsMeAPI.writeLogT(getActivity(), SbbsMeLogs.LOG_RECENT, "");
  }
예제 #2
0
  @Override
  public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    SbbsMeMessage message = listMessage.get(position);
    if (message.actionType == 0) {

      startActivity(
          new Intent(getActivity(), ArticleActivity.class)
              .putExtra("articleId", message.postId)
              .putExtra("item", (Serializable) null));

    } else {
      startActivity(
          new Intent(getActivity(), UserDetailActivity.class).putExtra("user", message.userId));
    }
    SbbsMeAPI.writeLogT(getActivity(), SbbsMeLogs.LOG_RECENT_CLICK, "");
  }
예제 #3
0
 @Override
 protected void onDestroy() {
   SbbsMeAPI.logout();
   Global.releaseAll();
   super.onDestroy();
 }