當前位置: 首頁>>代碼示例>>Java>>正文


Java ThreadMode.MAIN屬性代碼示例

本文整理匯總了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));
}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:17,代碼來源:VoiceMainActivity.java

示例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;
        }
    }

}
 
開發者ID:WeiMei-Tian,項目名稱:editor-sql,代碼行數:25,代碼來源:SqlCreateTableActivity.java

示例3: onSyncCompleteEvent

@Subscribe(threadMode = ThreadMode.MAIN)
public void onSyncCompleteEvent(SyncCompleteEvent syncCompleteEvent) {
    syncMode = -1;
    showDialog = false;
    if (progressDialog != null && progressDialog.isShowing()) {
        progressDialog.dismiss();
    }
}
 
開發者ID:darsh2,項目名稱:CouponsTracker,代碼行數:8,代碼來源:SettingsFragment.java

示例4: initCategoryList

@Subscribe(threadMode = ThreadMode.MAIN)
public void initCategoryList(SelectionEvent event) {
    if (getUserVisibleHint()) {
        mRecyclerView.setRefreshing(true);
        sort = event.sort;
        onRefresh();
    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:8,代碼來源:BookDetailDiscussionFragment.java

示例5: initCategoryList

@Subscribe(threadMode = ThreadMode.MAIN)
public void initCategoryList(SubEvent event) {
    minor = event.minor;
    String type = event.type;
    if (this.type.equals(type)) {
        onRefresh();
    }
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:8,代碼來源:SubCategoryFragment.java

示例6: initCategoryList

@Subscribe(threadMode = ThreadMode.MAIN)
public void initCategoryList(SelectionEvent event) {
    mRecyclerView.setRefreshing(true);
    sort = event.sort;
    distillate = event.distillate;
    onRefresh();
}
 
開發者ID:ynztlxdeai,項目名稱:TextReader,代碼行數:7,代碼來源:BookHelpFragment.java

示例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();
    }
}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:8,代碼來源:VoiceMainActivity.java

示例8: onMessageEvent

@Subscribe(threadMode = ThreadMode.MAIN)
@SuppressWarnings("unused")
public void onMessageEvent(ChainsResultEvent event) {
    if (event.isGame(game)) {
        this.chainsData = event.getResult();
        notifyDataSetChanged();
    }
}
 
開發者ID:tran-khoa,項目名稱:ANNO1404-Warenrechner-App,代碼行數:8,代碼來源:ChainsAdapter.java

示例9: onFileInfo

@Subscribe(threadMode = ThreadMode.MAIN)
public void onFileInfo(FileInfo fileInfo) {
    if (fileInfo.isFile()) {
        showFile(fileInfo);
    } else {
        showDirectory(fileInfo, OPERATION_CLICK_ITEM);
    }
}
 
開發者ID:JulianAndroid,項目名稱:AppChooser,代碼行數:8,代碼來源:FileInfosActivity.java

示例10: onGrblErrorEvent

@Subscribe(threadMode = ThreadMode.MAIN)
public void onGrblErrorEvent(GrblErrorEvent event){
    stopFileStreaming();
}
 
開發者ID:zeevy,項目名稱:grblcontroller,代碼行數:4,代碼來源:FileSenderTabFragment.java

示例11: onRefreshLocalVideoListEvent

@Subscribe(threadMode = ThreadMode.MAIN)
public void onRefreshLocalVideoListEvent(RefreshLocalVideoListEvent refreshLocalVideoListEvent){
    ((LocalVideoListAdapter)listView.getAdapter()).notifyDataSetChanged();
}
 
開發者ID:xm0625,項目名稱:VBrowser-Android,代碼行數:4,代碼來源:FileListActivity.java

示例12: onGameModified

@SuppressWarnings("unused")
@Subscribe(threadMode = ThreadMode.MAIN)
public void onGameModified(SpinnerEvent event) {
    dashPagerPresenter.spinnerClicked(event.getPosition());
}
 
開發者ID:riteshakya037,項目名稱:Android-Scrapper,代碼行數:5,代碼來源:DashPagerFragment.java

示例13: onRecordUpdate

@Subscribe(threadMode = ThreadMode.MAIN)
public void onRecordUpdate(RecordUpdateEvent e) {
    if (e.getType() == 0) {
        setMicButtonState(e.getState());
    }
}
 
開發者ID:LingjuAI,項目名稱:AssistantBySDK,代碼行數:6,代碼來源:VoiceInputFragment.java

示例14: onBtnUpdateEvent

/**
 * 刷新錄音話筒圖標狀態
 **/
@Subscribe(threadMode = ThreadMode.MAIN)
public void onBtnUpdateEvent(RecordUpdateEvent e) {
    mAreVoiceInput.setVoiceButton(e.getState());
    //        vic.setHeadSetMode(AssistantApplication.isHeadSet);
}
 
開發者ID:LingjuAI,項目名稱:AssistantBySDK,代碼行數:8,代碼來源:RemindEditActivity.java

示例15: onMessageEvent

@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(EventBusConstants.StartAllService start) {
    L.d("startAllService");
    startAllService();
}
 
開發者ID:kaixuanluo,項目名稱:pc-android-controller-android,代碼行數:5,代碼來源:MainService.java


注:本文中的org.greenrobot.eventbus.ThreadMode.MAIN屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。