Java Code Examples for org.greenrobot.eventbus.ThreadMode#POSTING
The following examples show how to use
org.greenrobot.eventbus.ThreadMode#POSTING .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java From android-auto-call-recorder with MIT License | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) protected void onLoadingDone(OnLoadingDone event) { mHandlerToWait.postDelayed(new Runnable() { @Override public void run() { mProgressBar.setVisibility(View.GONE); // mSwipeContainer.setRefreshing(false); } }, 2000); }
Example 2
Source File: RecordsActivity.java From android-auto-call-recorder with MIT License | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) protected void onLoadingDone(OnLoadingDone event) { mHandlerToWait.postDelayed(new Runnable() { @Override public void run() { mProgressBar.setVisibility(View.GONE); // mSwipeContainer.setRefreshing(false); } }, 2000); }
Example 3
Source File: CodeRulesActivity.java From SmsCode with GNU General Public License v3.0 | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) public void onStartRuleEdit(Event.StartRuleEditEvent event) { RuleEditFragment ruleEditFragment = RuleEditFragment.newInstance(event.type, event.codeRule); mFragmentManager.beginTransaction() .replace(R.id.code_rules_main_content, ruleEditFragment, TAG_RULE_EDIT) .addToBackStack(TAG_RULE_EDIT) .commit(); if (event.type == RuleEditFragment.EDIT_TYPE_CREATE) { refreshActionBar(getString(R.string.create_rule)); } else { refreshActionBar(getString(R.string.edit_rule)); } }
Example 4
Source File: CodeRulesActivity.java From XposedSmsCode with GNU General Public License v3.0 | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) public void onStartRuleEdit(Event.StartRuleEditEvent event) { RuleEditFragment ruleEditFragment = RuleEditFragment.newInstance(event.type, event.codeRule); mFragmentManager.beginTransaction() .replace(R.id.code_rules_main_content, ruleEditFragment, TAG_RULE_EDIT) .addToBackStack(TAG_RULE_EDIT) .commit(); if (event.type == RuleEditFragment.EDIT_TYPE_CREATE) { refreshActionBar(getString(R.string.create_rule)); } else { refreshActionBar(getString(R.string.edit_rule)); } }
Example 5
Source File: BaiduTTSPlayerCallBack.java From AssistantBySDK with Apache License 2.0 | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) public void onCallEvent(CallTaskEvent e) { if (e.getState() == CallTaskEvent.STATE_START) { inCallTask.set(true); } else if (e.getState() == CallTaskEvent.STATE_END) { inCallTask.set(false); } }
Example 6
Source File: MainActivity.java From AssistantBySDK with Apache License 2.0 | 5 votes |
/** * 初始化导航引擎 **/ @Subscribe(threadMode = ThreadMode.POSTING) public void onInitNaviEvent(InitNaviManagerEvent e) { Log.i(TAG, "NaviShowPointsEvent"); if (naviSuperManager == null) naviSuperManager = new BaiduNaviSuperManager(this, new BaiduNaviManager.NaviInitListener() { @Override public void onAuthResult(int var1, String var2) { } @Override public void initStart() { Log.i(TAG, "initStart"); } @Override public void initSuccess() { Log.i(TAG, "initSuccess"); BaiduNaviSuperManager.destory(); naviSuperManager = null; } @Override public void initFailed() { Log.i(TAG, "initFailed"); } }, null, false); }
Example 7
Source File: DownLoadActivity.java From o2oa with GNU Affero General Public License v3.0 | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING, sticky = true) public void onStickyEvent(Message message) { mMessage = message; mFileContent = (FileContent) mMessage.getContent(); if (mFileContent!=null){ try { XLog.info(mFileContent.getFileName()); showUI(); } catch (Exception e) { XLog.error("", e); } } }
Example 8
Source File: LMSongFragment.java From DMusic with Apache License 2.0 | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) @SuppressWarnings("unused") public void onEventRefresh(RefreshEvent event) { if (event == null || getActivity() == null || getActivity().isFinishing()) { return; } isNeedReLoad = true; }
Example 9
Source File: SongFragment.java From DMusic with Apache License 2.0 | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) @SuppressWarnings("unused") public void onEventRefresh(RefreshEvent event) { if (event == null || getActivity() == null || getActivity().isFinishing() || event.type == type || event.event != RefreshEvent.SYNC_COLLECTIONG) { return; } isNeedReLoad = true; }
Example 10
Source File: SongFragment.java From DMusic with Apache License 2.0 | 5 votes |
@Subscribe(threadMode = ThreadMode.POSTING) @SuppressWarnings("unused") public void onEventSortType(SortTypeEvent event) { if (event == null || getActivity() == null || getActivity().isFinishing() || event.type != type) { return; } orderType = event.orderType; }
Example 11
Source File: PushChallengeRequest.java From mollyim-android with GNU General Public License v3.0 | 4 votes |
@Subscribe(threadMode = ThreadMode.POSTING) public void onChallengeEvent(@NonNull PushChallengeEvent pushChallengeEvent) { challenge.set(pushChallengeEvent.challenge); latch.countDown(); }
Example 12
Source File: RecordsFragment.java From android-auto-call-recorder with MIT License | 4 votes |
@Subscribe(threadMode = ThreadMode.POSTING) public void onQueryChangedEvent(OnQueryChangedEvent event) { refreshCursorLoader(event.args); }
Example 13
Source File: RecordsFragment.java From android-auto-call-recorder with MIT License | 4 votes |
@Subscribe(threadMode = ThreadMode.POSTING) public void onTabSelected(OnTabSelected event) { hasFocus = event.position == position; }
Example 14
Source File: RecordsFragment.java From android-auto-call-recorder with MIT License | 4 votes |
@Subscribe(threadMode = ThreadMode.POSTING) public void onTabUnselected(OnTabSelected event) { hasFocus = event.position == position; }
Example 15
Source File: MainActivity.java From android-auto-call-recorder with MIT License | 4 votes |
@Subscribe(threadMode = ThreadMode.POSTING) protected void onLoadingBegin(OnLoadingBegin event) { if (!mProgressBar.isShown()) { mProgressBar.setVisibility(View.VISIBLE); } }
Example 16
Source File: RecordsActivity.java From android-auto-call-recorder with MIT License | 4 votes |
@Subscribe(threadMode = ThreadMode.POSTING) protected void onLoadingBegin(OnLoadingBegin event) { if (!mProgressBar.isShown()) { mProgressBar.setVisibility(View.VISIBLE); } }