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


Java PostOffice类代码示例

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


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

示例1: onVideoSelected

import com.r0adkll.postoffice.PostOffice; //导入依赖的package包/类
@Override
public void onVideoSelected(Video video) {
    if(mVideoLockPreference.isSet()){

        mView.getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
        Intent service = new Intent(mView.getActivity(), KioskService.class);
        service.putExtra(KioskService.EXTRA_CONTENT_PATH, video.file);
        mView.getActivity().startService(service);

    }else{
        PostOffice.newAlertMail(mView.getActivity(),
                getString(R.string.no_security_title),
                getString(R.string.no_security_msg))
                .show(mView.getActivity().getFragmentManager());
    }
}
 
开发者ID:52inc,项目名称:android-Showcase,代码行数:17,代码来源:HomePresenterImpl.java

示例2: onCreate

import com.r0adkll.postoffice.PostOffice; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Stamp stamp = new Stamp.Builder(this)
            .setDesign(Design.MATERIAL_LIGHT)
            .setThemeColorResource(R.color.blue_500)
            .setShowKeyboardOnLaunch(true)
            .setCanceledOnTouchOutside(true)
            .setCancelable(true)
            .setIcon(R.drawable.ic_launcher)
            .build();

    PostOffice.lick(stamp);

}
 
开发者ID:r0adkll,项目名称:PostOffice,代码行数:17,代码来源:MainApplication.java

示例3: onCreate

import com.r0adkll.postoffice.PostOffice; //导入依赖的package包/类
@Override
public void onCreate() {

    if(BuildConfig.DEBUG){
        Timber.plant(new Timber.DebugTree());
        Timber.plant(new CrashlyticsTree(this));
    }else{
        Timber.plant(new CrashlyticsTree(this));
    }

    // Initialize PostOffice
    PostOffice.lick(new Stamp.Builder(this)
            .setCancelable(true)
            .setCanceledOnTouchOutside(true)
            .setDesign(Design.MATERIAL_LIGHT)
            .setThemeColorResource(R.color.accent)
            .build());

    // Intialize Ollie
    Ollie.with(this)
         .setName(DB_NAME)
         .setVersion(DB_VERSION)
         .setLogLevel(BuildConfig.DEBUG ? Ollie.LogLevel.FULL : Ollie.LogLevel.NONE)
         .init();

    // Build and Inject Dagger Object Graph
    buildObjectGraphAndInject();

}
 
开发者ID:52inc,项目名称:android-Showcase,代码行数:30,代码来源:ShowcaseApp.java

示例4: onActionItemClicked

import com.r0adkll.postoffice.PostOffice; //导入依赖的package包/类
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
    switch (item.getItemId()){
        case R.id.action_delete:
            // Get the list of selected items
            SparseArray<Video> checked = getSelectedItems();

            // Remove all from array of list, then delete the item
            for(int i=0; i<checked.size(); i++){
                mVideos.remove(checked.valueAt(i));
            }
            mAdapter.notifyDataSetChanged();

            // Delete them
            mPresenter.deleteVideos(checked);
            mode.finish();
            return true;
        case R.id.action_info:
            SparseArray<Video> items = getSelectedItems();
            if(items.size() == 1){
                Video vid = items.valueAt(0);

                // Show dialog with information about the video
                // Get Metadata on video
                File videoFile = new File(vid.file);

                PostOffice.newMail(HomeActivity.this)
                        .setDesign(Design.MATERIAL_LIGHT)
                        .setTitle(videoFile.getName())
                        .setMessage(Tools.getFormattedVideoMetadata(vid.file))
                        .show(getFragmentManager());

            }
            mode.finish();

            return true;
    }
    return false;
}
 
开发者ID:52inc,项目名称:android-Showcase,代码行数:40,代码来源:HomeActivity.java


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