当前位置: 首页>>代码示例>>Java>>正文


Java EventBusUtils类代码示例

本文整理汇总了Java中com.jusenr.toolslibrary.utils.EventBusUtils的典型用法代码示例。如果您正苦于以下问题:Java EventBusUtils类的具体用法?Java EventBusUtils怎么用?Java EventBusUtils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EventBusUtils类属于com.jusenr.toolslibrary.utils包,在下文中一共展示了EventBusUtils类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Nullable
    @Override
    public final View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        mApplication = (PTApplication) getActivity().getApplication();
        mActivity = getActivity();
        View view = LayoutInflater.from(getActivity()).inflate(getLayoutId(), null);
        unbinder = ButterKnife.bind(this, view);
        mLoadingView = new LoadingView(getActivity(), getLoadingMessage());

//        mPTLoading = new PTLoading.Builder(getActivity())
//                .setCanceledOnTouchOutside(false)
//                .setIcon(R.drawable.button_loading_icon)
//                .setMsg(getString(R.string.loading_data))
//                .build();
//        mPTToast = new PTToast.Builder(getActivity())
//                .setShowTime(1300)
//                .build();

        if (useEventBus())
            EventBusUtils.register(this);
        return view;
    }
 
开发者ID:Jusenr,项目名称:androidgithub,代码行数:23,代码来源:PTCompatFragment.java

示例2: onDestroy

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();
    if (mActivityManager != null) mActivityManager.removeActivity(this);
    if (unbinder != null) unbinder.unbind();
    if (subscriptions != null) subscriptions.clear();
    if (disposable != null) disposable.clear();
    if (useEventBus()) EventBusUtils.unregister(this);
}
 
开发者ID:Jusenr,项目名称:RX_Demo,代码行数:10,代码来源:BaseActivity.java

示例3: onCreate

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
    protected final void onCreate(@Nullable Bundle savedInstanceState) {
        // define the IconicsLayoutInflater
        // this is compatible with calligraphy and other libs which wrap the baseContext
        LayoutInflaterCompat.setFactory(getLayoutInflater(), new IconicsLayoutInflater(getDelegate()));
        super.onCreate(savedInstanceState);

        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.setHomeButtonEnabled(true);
            actionBar.setDisplayHomeAsUpEnabled(true);
        }

        mActivity = this;
        mApplication = (PTApplication) getApplication();
        mBundle = getIntent().getExtras() != null ? getIntent().getExtras() : new Bundle();
        unbinder = ButterKnife.bind(this);
        mLoadingView = new LoadingView(this, getLoadingMessage());
//        loadState = (ILoadState) findViewById(R.id.load_state_view);
//        mPTLoading = new PTLoading.Builder(this)
//                .setCanceledOnTouchOutside(false)
//                .setIcon(R.drawable.button_loading_icon)
//                .setMsg(getString(R.string.loading_data))
//                .build();
//        mPTToast = new PTToast.Builder(this)
//                .setShowTime(1300)
//                .build();
        if (useEventBus())
            EventBusUtils.register(this);
        onViewCreated(savedInstanceState);
    }
 
开发者ID:Jusenr,项目名称:androidgithub,代码行数:32,代码来源:PTActivity.java

示例4: onDestroy

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();
    unbinder.unbind();
    if (useEventBus())
        EventBusUtils.unregister(this);
}
 
开发者ID:Jusenr,项目名称:androidgithub,代码行数:8,代码来源:PTActivity.java

示例5: onViewCreated

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
    public final void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        mApplication = (PTApplication) getActivity().getApplication();
        mActivity = getActivity();
        unbinder = ButterKnife.bind(this, view);
        mLoadingView = new LoadingView(getActivity(), getLoadingMessage());
//        loadState = (ILoadState) view.findViewById(R.id.load_state_view);
        if (useEventBus())
            EventBusUtils.register(this);
        onViewCreateFinish(view, savedInstanceState);
    }
 
开发者ID:Jusenr,项目名称:androidgithub,代码行数:13,代码来源:PTFragment.java

示例6: onDestroyView

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
public void onDestroyView() {
    super.onDestroyView();
    unbinder.unbind();
    if (useEventBus())
        EventBusUtils.unregister(this);

}
 
开发者ID:Jusenr,项目名称:androidgithub,代码行数:9,代码来源:PTFragment.java

示例7: onDestroyView

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
public void onDestroyView() {
    super.onDestroyView();
    unbinder.unbind();
    if (mPresenter != null) {
        mPresenter.onDestroy();
        mPresenter = null;
    }
    if (useEventBus())
        EventBusUtils.unregister(this);
}
 
开发者ID:Jusenr,项目名称:androidgithub,代码行数:12,代码来源:PTCompatFragment.java

示例8: onDestroy

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();
    if (mActivityManager != null) mActivityManager.removeActivity(this);
    if (unbinder != null) unbinder.unbind();
    if (disposable != null) disposable.clear();
    if (useEventBus()) EventBusUtils.unregister(this);
}
 
开发者ID:Jusenr,项目名称:AppFirCloud,代码行数:9,代码来源:BaseActivity.java

示例9: onCreate

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    onPreCreate();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        setTranslucentStatus(true);
    }

    if (isShowActionBar) {
        View view_main = View.inflate(this, getLayoutId(), null);
        View view_root = View.inflate(this, R.layout.layout_root_view, null);
        LinearLayout rootView = (LinearLayout) view_root.findViewById(R.id.ll_root_view);
        mToolbar = (Toolbar) view_root.findViewById(R.id.toolbar);
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
        view_main.setLayoutParams(params);
        rootView.addView(view_main, 1);
        setContentView(view_root);
        // 设置toolbar
        setSupportActionBar(mToolbar);
        getSupportActionBar();
    } else {
        setContentView(getLayoutId());
    }

    mActivity = this;
    mApplication = (TotalApplication) getApplication();
    mActivityManager = mApplication.getActivityManager();
    mActivityManager.addActivity(this);
    mBundle = getIntent().getExtras() != null ? getIntent().getExtras() : new Bundle();
    unbinder = ButterKnife.bind(this);
    mLoadingView = new LoadingView(this, getLoadingMessage());
    subscriptions = new CompositeSubscription();
    disposable = new CompositeDisposable();
    if (useEventBus()) {
        EventBusUtils.register(this);
    }
    if (mColorChooserDialog == null) {
        mColorChooserDialog = new ColorChooserDialog.Builder(this, R.string.theme)
                .customColors(R.array.colors, null)
                .doneButton(R.string.done)
                .cancelButton(R.string.cancel)
                .allowUserColorInput(false)
                .allowUserColorInputAlpha(false)
                .build();

    }
    onViewCreated(savedInstanceState);
}
 
开发者ID:Jusenr,项目名称:RX_Demo,代码行数:49,代码来源:BaseActivity.java

示例10: onCreate

import com.jusenr.toolslibrary.utils.EventBusUtils; //导入依赖的package包/类
@Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
//            setTranslucentStatus(true);
//        }

        if (isShowActionBar) {
            View view_main = View.inflate(this, getLayoutId(), null);
            View view_root = View.inflate(this, R.layout.layout_root_view, null);
            LinearLayout rootView = (LinearLayout) view_root.findViewById(R.id.ll_root_view);
            mToolbar = (Toolbar) view_root.findViewById(R.id.toolbar);
            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
            view_main.setLayoutParams(params);
            rootView.addView(view_main, 1);
            setContentView(view_root);
            // 设置toolbar
            setSupportActionBar(mToolbar);
            getSupportActionBar();
        } else {
            setContentView(getLayoutId());
        }

        mActivity = this;
        //init API TOKEN
        String apiToken = PreferenceUtils.getValue("FIR_IM_API_TOKEN", BaseApi.API_TOKEN);
        NativeLib.getInstance().setSubNumber(4);
        mApiToken = NativeLib.getInstance().base64Decrypt(apiToken);

        mApplication = (TotalApplication) getApplication();
        mActivityManager = mApplication.getActivityManager();
        mActivityManager.addActivity(this);
        mBundle = getIntent().getExtras() != null ? getIntent().getExtras() : new Bundle();
        unbinder = ButterKnife.bind(this);
        mLoadingView = new LoadingView(this, getLoadingMessage());
        disposable = new CompositeDisposable();
        if (useEventBus()) {
            EventBusUtils.register(this);
        }
        onViewCreated(savedInstanceState);
    }
 
开发者ID:Jusenr,项目名称:AppFirCloud,代码行数:42,代码来源:BaseActivity.java


注:本文中的com.jusenr.toolslibrary.utils.EventBusUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。