コード例 #1
0
  // <!--kate's code about search button -->
  @Click(R.id.main_search)
  void main_search() {
    open_search();
    if (main_search_text.getText().toString() == "") {
    } else if (search.get_keyword() != main_search_text.getText().toString()) {
      search.set_keyword(main_search_text.getText().toString());
      new Thread(Search).start();
    } else {
    }
    mActionbarRefresh.setImageResource(R.drawable.refresh);

    mActionbarRefreshProgress.setVisibility(View.VISIBLE);
    mActionbarRefresh.setVisibility(View.GONE);
  }
コード例 #2
0
 @Click(R.id.actionbar_refresh_container)
 void refreshClicked() {
   search.set_keyword("");
   if (HNFeedTaskMainFeed.isRunning(getApplicationContext()))
     HNFeedTaskMainFeed.stopCurrent(getApplicationContext());
   else startFeedLoading();
 }
コード例 #3
0
        public void handleMessage(Message msg) {
          switch (msg.what) {
            case 0:
              showFeed(search.get_Feed());
              if (mCurrentHTMLContent.equals("display")) {

                new Thread(getURLContent_Thread).start();
              }
              break;
            default:
              break;
          }
          mActionbarRefresh.setVisibility(View.VISIBLE);
          mActionbarRefreshProgress.setVisibility(View.GONE);
        }
コード例 #4
0
 public void run() {
   search.Search();
   SearchThreadHandler.sendEmptyMessage(0);
 }