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


Java AndroidThreeTen类代码示例

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


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

示例1: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override public void onCreate() {
  super.onCreate();
  if (LeakCanary.isInAnalyzerProcess(this) || ProcessPhoenix.isPhoenixProcess(this)) {
    return;
  }
  LeakCanary.install(this);
  AndroidThreeTen.init(this);

  component = DaggerInitializer.init(this);
  component.inject(this);

  appInitializer.init(this);

  lumberYard.cleanUp();
  Timber.plant(lumberYard.tree());

  registerActivityLifecycleCallbacks(activityHierarchyServer);
}
 
开发者ID:rogues-dev,项目名称:superglue,代码行数:19,代码来源:SuperGlueApp.java

示例2: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    AndroidThreeTen.init(this);
    start_date = LocalDate.now();
    end_date = LocalDate.now();
    seed = DEFAULT_SEED;
    setContentView(R.layout.activity_main);

    // Load an ad into the AdMob banner view.
    AdView adView = (AdView) findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().setRequestAgent("android_studio:ad_template").build();
    adView.loadAd(adRequest);

    potd_list_view = (ListView) findViewById(R.id.potd_list);

    generate_potd_list();
}
 
开发者ID:borfast,项目名称:arrispwgen-android,代码行数:19,代码来源:MainActivity.java

示例3: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override public void onCreate() {
  super.onCreate();
  Fabric.with(this, new Crashlytics());

  DeployGate.install(this);

  AndroidThreeTen.init(this);

  Timber.plant(BuildConfig.DEBUG ? new Timber.DebugTree() : new Timber.Tree() {
    @Override protected void log(int priority, String tag, String message, Throwable t) {
      if (priority == Log.ASSERT || priority == Log.DEBUG || priority == Log.VERBOSE) {
        return;
      }
      Log.println(priority, tag, message + Log.getStackTraceString(t));
    }
  });

  mDaggerGraph = DaggerGithubComponent.builder()
      .githubModule(new GithubModule(this))
      .build();
}
 
开发者ID:donglua,项目名称:GitHubClient,代码行数:22,代码来源:GithubApp.java

示例4: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());
    LeakCanary.install(this);
    AndroidThreeTen.init(this);
    Stetho.initializeWithDefaults(this);
    installTimber();
    this.registerApplicationComponent();
    this.registerApiKeyComponent();
    this.registerNetworkComponent();
    this.registerDashboardComponent();
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/Lato-Regular.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build()
    );
}
 
开发者ID:omgitsjoao,项目名称:wakatime-android-client,代码行数:19,代码来源:WakatimeApplication.java

示例5: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());
    FirebaseApp.initializeApp(this);
    AndroidThreeTen.init(this); //java 8 time api backport

    appComponent = DaggerAppComponent.create();
    injector = new ComponentInjector<>(AppComponent.class, appComponent);

    //register notification channels
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        NotificationUtil.createNotificationChannels(this);
    }

    //remove shortcuts on app restart
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
        ShortcutUtil.removeAllShortcuts(this);
    }


}
 
开发者ID:ZinoKader,项目名称:SpotiQ,代码行数:23,代码来源:SpotiqApplication.java

示例6: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    if (LeakCanary.isInAnalyzerProcess(this)) {
        // This process is dedicated to LeakCanary for heap analysis.
        // You should not init your app in this process.
        return;
    }

    // https://github.com/square/leakcanary/issues/322
    // https://medium.com/@amitshekhar/android-memory-leaks-inputmethodmanager-solved-a6f2fe1d1348#.i060weodr
    LeakCanary.install(this);
    initializeStetho(this);
    initLogger();
    AndroidThreeTen.init(this);
}
 
开发者ID:TomeOkin,项目名称:LsPush,代码行数:18,代码来源:LsPushApplication.java

示例7: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override public void onCreate() {
    super.onCreate();
    mInstance = this;

    if (BuildConfig.USE_CRASHLYTICS) {
        Fabric.with(this, new Crashlytics());
    }

    if (BuildConfig.DEBUG) {
        Stetho.initializeWithDefaults(this);
    }

    mComponent = DaggerLocativeComponent.builder()
            .appModule(new AppModule(this))
            .networkingModule(new NetworkingModule())
            .persistencyModule(new PersistencyModule(this))
            .build();
    AndroidThreeTen.init(this);
}
 
开发者ID:LocativeHQ,项目名称:Locative-Android,代码行数:20,代码来源:LocativeApplication.java

示例8: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override public void onCreate() {
  super.onCreate();

  AndroidThreeTen.init(this);

  DaggerApp_Component.builder()
      .application(this)
      .debug(BuildConfig.DEBUG)
      .bsuirUrl("https://students.bsuir.by/api/v1/")
      .build()
      .inject(this);

  Timber.plant(mTree);

  if (!BuildConfig.DEBUG) {
    Fabric.with(this, new Crashlytics());
  }

  mNightModePreference.asObservable()
      .map(Integer::valueOf)
      .onErrorReturn(throwable -> AppCompatDelegate.MODE_NIGHT_NO)
      .subscribe(AppCompatDelegate::setDefaultNightMode);
}
 
开发者ID:drymarev,项目名称:rxbsuir,代码行数:24,代码来源:App.java

示例9: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    s_this = this;

    try {
        updatePrefs();
    } catch (TembaException e) {
        resetPrefs();
    }

    m_realmConfig = new RealmConfiguration.Builder(this).build();

    // Testing: nuke our db on every start until the schema is ironed out
    // Realm.deleteRealm(config);

    // set our default database config
    Realm.setDefaultConfiguration(m_realmConfig);

    AndroidThreeTen.init(this);
}
 
开发者ID:rapidpro,项目名称:surveyor,代码行数:22,代码来源:Surveyor.java

示例10: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    AndroidThreeTen.init(this);
    LeakCanary.install(this);

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

    buildComponentAndInject();

    registerActivityLifecycleCallbacks(activityHierarchyServer);
}
 
开发者ID:LiveTyping,项目名称:u2020-mvp,代码行数:18,代码来源:U2020App.java

示例11: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override public void onCreate() {
  super.onCreate();
  if (LeakCanary.isInAnalyzerProcess(this)) {
    return;
  }
  AndroidThreeTen.init(this);
  LeakCanary.install(this);

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

  objectGraph = ObjectGraph.create(Modules.list(this));
  objectGraph.inject(this);

  lumberYard.cleanUp();
  Timber.plant(lumberYard.tree());
}
 
开发者ID:JakeWharton,项目名称:u2020,代码行数:22,代码来源:U2020App.java

示例12: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    AndroidThreeTen.init(this);//ThreeTenABP的使用初始化
    install();//用于第一次安装,建立设置表
    instance = this;
    //读入设置
    _task_manager = new TaskManager();
    _habit_manager = new HabitManager();
    _time_left_manager = new TimeLeftManager();
    taskRepo = new TaskRepo(this);
    habitRepo = new HabitRepo(this);
    timeLeftRepo = new TimeLeftRepo(this);
    mysetting = new Setting();

    _task_manager.addAll(taskRepo.getTaskList());
    _time_left_manager.addAll(timeLeftRepo.getTimeLeftList());
    _habit_manager.addAll(habitRepo.getHabitList());
    _task_manager.order();
    _habit_manager.order();
    _time_left_manager.order();
    mysetting.readSetting(this);
    //Log.d("ringtone",mysetting.Ringtone);
    //Log.d("CallTime",mysetting.callTime.toString());
    if (!isServiceRunning(this, "io.github.celestialphineas.imer.MyService"))
    {
        //开启第一次service,设置闹钟
        Intent i = new Intent(this, MyService.class);
        i.putExtra("source", "Application");
        this.startService(i);
    }

}
 
开发者ID:AndroidNewbies,项目名称:Sanxing,代码行数:34,代码来源:MyApplication.java

示例13: buildObjectGraphAndInject

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
private void buildObjectGraphAndInject() {
  applicationComponent = DaggerApplicationComponent.builder()
      .applicationModule(new ApplicationModule(this))
      .build();

  AndroidThreeTen.init(this);

  if (BuildConfig.DEBUG) {
    Stetho.initializeWithDefaults(this);
    Timber.plant(new Timber.DebugTree());
  }
}
 
开发者ID:philipphager,项目名称:disclosure-android-app,代码行数:13,代码来源:DisclosureApp.java

示例14: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    CalligraphyConfig.initDefault(
            new CalligraphyConfig.Builder().setDefaultFontPath("minyna.ttf").setFontAttrId(R.attr.fontPath)
                    .build());
    AndroidThreeTen.init(this);
    FirebaseApp.initializeApp(this);
    FirebaseMessaging.getInstance().subscribeToTopic("Power_Notifications");
}
 
开发者ID:riggaroo,项目名称:android-things-electricity-monitor,代码行数:11,代码来源:ElectricityApplication.java

示例15: onCreate

import com.jakewharton.threetenabp.AndroidThreeTen; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    AndroidThreeTen.init(this);
    initGraph();
    initLogger();
}
 
开发者ID:Nilhcem,项目名称:droidconde-2016,代码行数:8,代码来源:DroidconApp.java


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