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


Java Paper.init方法代码示例

本文整理汇总了Java中io.paperdb.Paper.init方法的典型用法代码示例。如果您正苦于以下问题:Java Paper.init方法的具体用法?Java Paper.init怎么用?Java Paper.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.paperdb.Paper的用法示例。


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

示例1: onCreate

import io.paperdb.Paper; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    CustomActivityOnCrash.install(this);
    EventBus.getDefault().register(this);
    EasyImage.configuration(this)
            .saveInRootPicturesDirectory()
            .setImagesFolderName(getString(R.string.app_name));
    Nammu.init(this);
    Paper.init(this);
    Typekit.getInstance()
            .addNormal(Typekit.createFromAsset(this, "fonts/LatoLatin-Regular.ttf"))
            .addBold(Typekit.createFromAsset(this, "fonts/LatoLatin-Bold.ttf"))
            .addItalic(Typekit.createFromAsset(this, "fonts/LatoLatin-Italic.ttf"))
            .addBoldItalic(Typekit.createFromAsset(this, "fonts/LatoLatin-BoldItalic.ttf"))
            .addCustom1(Typekit.createFromAsset(this, "fonts/Geomanist-Regular.otf"))
            .addCustom2(Typekit.createFromAsset(this, "fonts/Handlee-Regular.ttf"));

    initFabric();
    initParse();
}
 
开发者ID:adrielcafe,项目名称:NMSAlphabetAndroidApp,代码行数:22,代码来源:App.java

示例2: onCreate

import io.paperdb.Paper; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Paper.init(this);

    CrashHandler.getInstance().init(this);
    ImageUtil.init(this);
    NetworkUtil.init(this);
    ConfigUtil.init(this);
    TextToast.init(this);

    //Facebook分享初始化
    FacebookSdk.sdkInitialize(getApplicationContext());
    //友盟意见反馈初始化
    FeedbackPush.getInstance(this).init(false);
}
 
开发者ID:Uphie,项目名称:ONE-Unofficial,代码行数:17,代码来源:App.java

示例3: testReadWrite500Contacts

import io.paperdb.Paper; //导入方法依赖的package包/类
@Test
public void testReadWrite500Contacts() throws Exception {
    final List<Person> contacts = TestDataGenerator.genPersonList(500);
    Paper.init(getTargetContext());
    Paper.book().destroy();
    long paperTime = runTest(new PaperReadWriteContactsTest(), contacts, REPEAT_COUNT);

    Hawk.init(getTargetContext());
    Hawk.clear();
    long hawkTime = runTest(new HawkReadWriteContactsTest(), contacts, REPEAT_COUNT);

    final List<PersonArg> contactsArg = TestDataGenerator.genPersonArgList(500);
    Paper.init(getTargetContext());
    Paper.book().destroy();
    long paperArg = runTest(new PaperReadWriteContactsArgTest(), contactsArg, REPEAT_COUNT);

    printResults("Read/write 500 contacts", paperTime, hawkTime, paperArg);
}
 
开发者ID:pilgr,项目名称:Paper,代码行数:19,代码来源:Benchmark.java

示例4: onCreate

import io.paperdb.Paper; //导入方法依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_manga_item);

        Paper.init(this);
        findViewById(R.id.manga_item_pager).setVisibility(View.GONE);
        initToolBar();

        String mangaId = getIntent().getStringExtra("mangaId");
        manga = Paper.book(UserLibraryHelper.USER_LIBRARY_DB).read(mangaId);
//        if (manga != null && manga.chaptersList != null) {
//            initViewPager();
//            initMarqueeTitle();
//        }
        fetchMangaDetailFromMangaEden(mangaId);
    }
 
开发者ID:ckmah,项目名称:DangoReader,代码行数:18,代码来源:MangaItemActivity.java

示例5: DatabaseController

import io.paperdb.Paper; //导入方法依赖的package包/类
public DatabaseController(Context context, EventBus eventBus) {
    this.mEventBus = eventBus;
    //mEventBus.register(this);

    Paper.init(context);
    Paper.addSerializer(Bundle.class, new BundleSerializer());
    Paper.addSerializer(Media.class, new MediaSerializer());

    mBundleDao = new BundleDaoImpl();
    mMediaDao = new MediaDaoImpl();
}
 
开发者ID:resourcepool,项目名称:dashboard,代码行数:12,代码来源:DatabaseController.java

示例6: onCreate

import io.paperdb.Paper; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    if (!BuildConfig.DEBUG) {
        Fabric.with(this, new Crashlytics());
    }

    appComponent = DaggerAppComponent.builder()
            .appModule(new AppModule(this))
            .build();

    vkAccessTokenTracker.startTracking();
    VKSdk.initialize(this);

    Paper.init(this);

    Dexter.initialize(this);

    DrawerImageLoader.init(new AbstractDrawerImageLoader() {
        @Override
        public void set(ImageView imageView, Uri uri, Drawable placeholder, String tag) {
            Glide.with(imageView.getContext())
                    .load(uri)
                    .into(imageView);
        }
    });
}
 
开发者ID:Mavamaarten,项目名称:vk_music_android,代码行数:28,代码来源:VkApplication.java

示例7: testWrite500Contacts

import io.paperdb.Paper; //导入方法依赖的package包/类
@Test
public void testWrite500Contacts() throws Exception {
    final List<Person> contacts = TestDataGenerator.genPersonList(500);
    Paper.init(getTargetContext());
    Paper.book().destroy();
    long paperTime = runTest(new PaperWriteContactsTest(), contacts, REPEAT_COUNT);

    Hawk.init(getTargetContext());
    Hawk.clear();
    long hawkTime = runTest(new HawkWriteContactsTest(), contacts, REPEAT_COUNT);

    printResults("Write 500 contacts", paperTime, hawkTime);
}
 
开发者ID:pilgr,项目名称:Paper,代码行数:14,代码来源:Benchmark.java

示例8: testRead500Contacts

import io.paperdb.Paper; //导入方法依赖的package包/类
@Test
public void testRead500Contacts() throws Exception {
    final List<Person> contacts = TestDataGenerator.genPersonList(500);
    Paper.init(getTargetContext());
    Paper.book().destroy();
    runTest(new PaperWriteContactsTest(), contacts, REPEAT_COUNT); //Prepare
    long paperTime = runTest(new PaperReadContactsTest(), contacts, REPEAT_COUNT);

    Hawk.init(getTargetContext());
    Hawk.clear();
    runTest(new HawkWriteContactsTest(), contacts, REPEAT_COUNT); //Prepare
    long hawkTime = runTest(new HawkReadContactsTest(), contacts, REPEAT_COUNT);

    printResults("Read 500 contacts", paperTime, hawkTime);
}
 
开发者ID:pilgr,项目名称:Paper,代码行数:16,代码来源:Benchmark.java

示例9: testPutGetNormalAfterReinit

import io.paperdb.Paper; //导入方法依赖的package包/类
@Test
public void testPutGetNormalAfterReinit() {
    Paper.put("city", "Lund");
    String val = Paper.get("city", "default");
    Paper.init(getTargetContext());// Reinit Paper instance
    assertThat(val).isEqualTo("Lund");
}
 
开发者ID:pilgr,项目名称:Paper,代码行数:8,代码来源:PaperDeprecatedAPITest.java

示例10: onCreate

import io.paperdb.Paper; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_manga_browse);
    Paper.init(this);
    initToolbar();
    initTabLayout();
}
 
开发者ID:ckmah,项目名称:DangoReader,代码行数:9,代码来源:BrowseMangaActivity.java

示例11: onCreate

import io.paperdb.Paper; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    Utils.init(getApplicationContext(), (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0);

    Paper.init(this);
}
 
开发者ID:martinbonnin,项目名称:treedo,代码行数:9,代码来源:TreeDoApplication.java

示例12: startBootupRestoration

import io.paperdb.Paper; //导入方法依赖的package包/类
private void startBootupRestoration() {
    Paper.init(this);

    final DeviceConfig configuration = DeviceConfig.get();
    if (configuration.dcFirstStart) {
        Timber.i("First start not completed, exiting");
        return;
    }

    //========================================================================================================================
    // No Root, No Friends, That's Life ...
    //========================================================================================================================
    if (!RootCheck.isRooted()) {
        Timber.e("No Root, No Friends, That's Life ...");
        return;
    }

    // patch sepolicy
    Utils.patchSEPolicy(this);

    final BootupConfig bootupConfig = BootupConfig.get();
    final int delay = bootupConfig.automatedRestorationDelay;
    if (delay > 0) {
        Timber.v("Delaying bootup restoration by %s seconds", delay);
    }
    new Handler().postDelayed(new BootupRunnable(getApplicationContext(), bootupConfig), delay);
}
 
开发者ID:amartinz,项目名称:DeviceControl,代码行数:28,代码来源:BootupService.java

示例13: onCreate

import io.paperdb.Paper; //导入方法依赖的package包/类
@Override public void onCreate() {
    super.onCreate();
    if (App.sInstance != null) {
        return;
    }
    App.sInstance = this;

    final UniversalDebug universalDebug = new UniversalDebug(this)
            .withDebug(BuildConfig.DEBUG)
            .withTimber(true)
            .withDebugTree(buildDebugTree())
            .withProductionTree(buildProductionTree());

    if (!enableDebug) {
        final FabricConfig fabricConfig = new FabricConfig(universalDebug)
                .withAnswers()
                .withCrashlytics();
        universalDebug.withExtension(fabricConfig);
    }

    universalDebug.install();
    ShellManager.enableDebug(App.enableDebug);

    Paper.init(this);
    setupThemeMode();

    AsyncTask.execute(new Runnable() {
        @Override public void run() {
            setupEverythingAsync();
        }
    });
}
 
开发者ID:amartinz,项目名称:DeviceControl,代码行数:33,代码来源:App.java

示例14: PaperDataSaver

import io.paperdb.Paper; //导入方法依赖的package包/类
public PaperDataSaver(Context context){
    Paper.init(context);
}
 
开发者ID:florent37,项目名称:Android-NoSql,代码行数:4,代码来源:PaperDataSaver.java

示例15: PaperDiskCache

import io.paperdb.Paper; //导入方法依赖的package包/类
public PaperDiskCache(@NonNull Context context, @NonNull Class<T> clazz, @NonNull SizePolicy sizePolicy) {
    Paper.init(context);
    this.cacheBook = Paper.book(clazz.getName());
    this.cacheDirectory = new File(context.getFilesDir() + File.separator + clazz.getName());
    this.sizePolicy = sizePolicy;
}
 
开发者ID:arunkumar9t2,项目名称:PaperDiskCache,代码行数:7,代码来源:PaperDiskCache.java


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