// <!--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); }
@Click(R.id.actionbar_refresh_container) void refreshClicked() { search.set_keyword(""); if (HNFeedTaskMainFeed.isRunning(getApplicationContext())) HNFeedTaskMainFeed.stopCurrent(getApplicationContext()); else startFeedLoading(); }
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); }
public void run() { search.Search(); SearchThreadHandler.sendEmptyMessage(0); }