Beispiel #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_msg_center);

    mToolbar = (CommonToolbar) findViewById(R.id.layout_title_bar);
    mToolbar.setToolbarTitle(R.string.msg_center_title);
    mToolbar.setOptionMenuVisible(false);

    mMessageLv = (ListView) findViewById(R.id.msg_center_lv);
    mMessageLv.setOnItemClickListener(this);

    mEmptyView = findViewById(R.id.msg_center_empty_ll);

    mFeedbackTv = (RippleView) findViewById(R.id.msg_center_feedback_tv);
    mFeedbackTv.setOnClickListener(this);

    mAdapter = new MsgCenterAdapter(mMessageLv, mEmptyView);
    mMessageLv.setAdapter(mAdapter);

    ThreadManager.executeOnNetworkThread(
        new Runnable() {
          @Override
          public void run() {
            MsgCenterFetchJob.checkCacheAndRequest(null);
          }
        });
    handlerIntent();
  }
Beispiel #2
0
 @Override
 protected void onDestroy() {
   super.onDestroy();
   ImageLoader.getInstance().clearMemoryCache();
 }