コード例 #1
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, "");
  }
コード例 #2
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, "");
  }