本文整理匯總了Java中org.greenrobot.eventbus.ThreadMode.MAIN屬性的典型用法代碼示例。如果您正苦於以下問題:Java ThreadMode.MAIN屬性的具體用法?Java ThreadMode.MAIN怎麽用?Java ThreadMode.MAIN使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.greenrobot.eventbus.ThreadMode
的用法示例。
在下文中一共展示了ThreadMode.MAIN屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onMergedEvent
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMergedEvent(EventMergeFinish mergeService) {
ProgressBarHelper.getInstance(true).dismiss();
try {
mViewDrawableOverlay.setVisibility(View.GONE);
ViewAnimator.animate(mGifImageView).fadeIn().accelerate().duration(600).start();
mGifImageView.setVisibility(View.VISIBLE);
GifDrawable gifFromBytes = new GifDrawable(mergeService.getGifPath());
gifFromBytes.setLoopCount(0xFFFF);
mGifImageView.setImageDrawable(gifFromBytes);
mStickerTextDownLoadDialog.dismiss();
} catch (IOException e) {
e.printStackTrace();
}
String mergePath = mergeService.getGifPath();
EventBus.getDefault().post(new EventStartNewThread(true, mergePath));
}
示例2: onEventMainThread
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEventMainThread(ViewEvent event) {
ViewEvent.EvenType type = event.getType();
Bundle args = event.getArgs();
if (!isInformation) {
switch (type) {
case sqlTabItemClick:
if (!isInformation) {
mClickPosition = (int) args.get(ViewEvent.Keys.SQL_TAB_ITEM_CLICK);
if (!isEdit) {
isEdit = true;
mToolbar.getMenu().clear();
mToolbar.inflateMenu(R.menu.sql_add_column_menu);
mToolBarButton.setVisibility(View.GONE);
}
}
break;
}
}
}
示例3: onSyncCompleteEvent
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSyncCompleteEvent(SyncCompleteEvent syncCompleteEvent) {
syncMode = -1;
showDialog = false;
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
}
}
示例4: initCategoryList
@Subscribe(threadMode = ThreadMode.MAIN)
public void initCategoryList(SelectionEvent event) {
if (getUserVisibleHint()) {
mRecyclerView.setRefreshing(true);
sort = event.sort;
onRefresh();
}
}
示例5: initCategoryList
@Subscribe(threadMode = ThreadMode.MAIN)
public void initCategoryList(SubEvent event) {
minor = event.minor;
String type = event.type;
if (this.type.equals(type)) {
onRefresh();
}
}
示例6: initCategoryList
@Subscribe(threadMode = ThreadMode.MAIN)
public void initCategoryList(SelectionEvent event) {
mRecyclerView.setRefreshing(true);
sort = event.sort;
distillate = event.distillate;
onRefresh();
}
示例7: onVersionUpdateEvent
@Subscribe(threadMode = ThreadMode.MAIN)
public void onVersionUpdateEvent(EventVersionUpdate versionUpdate) {
if (!isAutoUpdateShow && mAutoUpdateDialog != null) {
mAutoUpdateDialog = new AutoUpdateDialog(this);
mAutoUpdateDialog.setNewVersionData(versionUpdate.getVersionResult());
mAutoUpdateDialog.show();
}
}
示例8: onMessageEvent
@Subscribe(threadMode = ThreadMode.MAIN)
@SuppressWarnings("unused")
public void onMessageEvent(ChainsResultEvent event) {
if (event.isGame(game)) {
this.chainsData = event.getResult();
notifyDataSetChanged();
}
}
示例9: onFileInfo
@Subscribe(threadMode = ThreadMode.MAIN)
public void onFileInfo(FileInfo fileInfo) {
if (fileInfo.isFile()) {
showFile(fileInfo);
} else {
showDirectory(fileInfo, OPERATION_CLICK_ITEM);
}
}
示例10: onGrblErrorEvent
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGrblErrorEvent(GrblErrorEvent event){
stopFileStreaming();
}
示例11: onRefreshLocalVideoListEvent
@Subscribe(threadMode = ThreadMode.MAIN)
public void onRefreshLocalVideoListEvent(RefreshLocalVideoListEvent refreshLocalVideoListEvent){
((LocalVideoListAdapter)listView.getAdapter()).notifyDataSetChanged();
}
示例12: onGameModified
@SuppressWarnings("unused")
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGameModified(SpinnerEvent event) {
dashPagerPresenter.spinnerClicked(event.getPosition());
}
示例13: onRecordUpdate
@Subscribe(threadMode = ThreadMode.MAIN)
public void onRecordUpdate(RecordUpdateEvent e) {
if (e.getType() == 0) {
setMicButtonState(e.getState());
}
}
示例14: onBtnUpdateEvent
/**
* 刷新錄音話筒圖標狀態
**/
@Subscribe(threadMode = ThreadMode.MAIN)
public void onBtnUpdateEvent(RecordUpdateEvent e) {
mAreVoiceInput.setVoiceButton(e.getState());
// vic.setHeadSetMode(AssistantApplication.isHeadSet);
}
示例15: onMessageEvent
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(EventBusConstants.StartAllService start) {
L.d("startAllService");
startAllService();
}