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


Java CalligraphyConfig.initDefault方法代码示例

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


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

示例1: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    mApplicationComponent = DaggerApplicationComponent.builder()
            .applicationModule(new ApplicationModule(this)).build();

    mApplicationComponent.inject(this);

    AppLogger.init();

    AndroidNetworking.initialize(getApplicationContext());
    if (BuildConfig.DEBUG) {
        AndroidNetworking.enableLogging(Level.BODY);
    }

    CalligraphyConfig.initDefault(mCalligraphyConfig);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:19,代码来源:MvpApp.java

示例2: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    Log.d("DEBUG", "Creating TypeMaps");
    typeMaps = new TypeMaps();
    super.onCreate();
    CalligraphyConfig.initDefault
        ("Gotham-Light.ttf", R.attr.fontPath);
    LineNumberReader lnr = new LineNumberReader
        (new InputStreamReader
         (getResources().openRawResource(R.raw.keys)));

    registerClasses();

    String parseClientKey;

    try {
        parseAppId = lnr.readLine();
        parseClientKey = lnr.readLine();

        Parse.initialize(this, parseAppId, parseClientKey);
        Log.d("DEBUG", "Successfully initialized");
    }
    catch (IOException ioe) {
        Log.e("DEBUG", "Failed to read keys", ioe);
    }
}
 
开发者ID:samv,项目名称:AshaNetApp,代码行数:27,代码来源:AshaNetApp.java

示例3: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    createAppComponent();

    DaggerAndroidInjector.initialize(this);

    AppLogger.init();

    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
        Stetho.initializeWithDefaults(this);
    }

    if (!LeakCanary.isInAnalyzerProcess(this)) {
        LeakCanary.install(this);
    }

    CalligraphyConfig.initDefault(mCalligraphyConfig);
}
 
开发者ID:n1rocket,项目名称:eggs-android,代码行数:22,代码来源:MvpApp.java

示例4: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    //Fabric initialization for Crashlytics
    Fabric.with(this, new Crashlytics());

    //create component
    mAppComponent = DaggerAppComponent.builder()
            .utilsModule(new UtilsModule(this)).build();

    //configure timber for logging
    if (BuildConfig.DEBUG) {
        Timber.plant(new Timber.DebugTree());
    }

    //calligraphy for fonts
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/Roboto-Regular.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build());
}
 
开发者ID:SoftprodigyIndia,项目名称:AndroidAppBoilerplate,代码行数:23,代码来源:SampleApplication.java

示例5: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    DaggerAppComponent.builder()
            .application(this)
            .build()
            .inject(this);

    AppLogger.init();

    AndroidNetworking.initialize(getApplicationContext());
    if (BuildConfig.DEBUG) {
        AndroidNetworking.enableLogging(HttpLoggingInterceptor.Level.BODY);
    }

    CalligraphyConfig.initDefault(mCalligraphyConfig);
}
 
开发者ID:MindorksOpenSource,项目名称:android-mvvm-architecture,代码行数:19,代码来源:MvvmApp.java

示例6: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    MultiDex.install(this);

    Logger.addLogAdapter(new AndroidLogAdapter() {
        @Override
        public boolean isLoggable(int priority, String tag) {
            return BuildConfig.DEBUG;
        }
    });

    Hawk.init(getBaseContext()).build();

    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/lato_regular.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build()
    );
}
 
开发者ID:mayuroks,项目名称:Coin-Tracker,代码行数:22,代码来源:BaseApplication.java

示例7: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    Fresco.initialize(this);//Init Fresco
    applicationComponent = DaggerApplicationComponent.builder()
            .applicationModule(new ApplicationModule(this))
            .contextModule(new ContextModule(this))
            .databaseModule(new DatabaseModule())
            .networkModule(new NetworkModule())
            .build();
    applicationComponent.inject(this);
    CalligraphyConfig.initDefault(calligraphyConfig);
    Timber.plant(new Timber.DebugTree());
    LeakCanary.install(this);

}
 
开发者ID:graviton57,项目名称:DOUSalaries,代码行数:17,代码来源:DouApp.java

示例8: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    instance = this;

    applicationComponent = DaggerApplicationComponent.builder()
            .networkModule(new NetworkModule())
            .presentersModule(new PresentersModule())
            .sourceModule(new SourceModule(this))
            .gatewaysModule(new GatewaysModule())
            .managerModule(new ManagerModule(this))
            .utilsModule(new UtilsModule(this))
            .build();

    JodaTimeAndroid.init(this);
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath(getString(R.string.font_ubuntu))
            .setFontAttrId(R.attr.fontPath)
            .build()
    );
}
 
开发者ID:ehsunshine,项目名称:memory-game,代码行数:22,代码来源:MatchMatchApplication.java

示例9: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/Roboto-Regular.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build()
    );

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

    applicationGraph = ObjectGraph.create(getModules().toArray());
    applicationGraph.inject(this);
}
 
开发者ID:hardsky,项目名称:lucky-calories,代码行数:21,代码来源:LuckyCaloriesApp.java

示例10: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的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

示例11: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                    .setDefaultFontPath("fonts/JosefinSans-Regular.ttf")
                    .setFontAttrId(R.attr.fontPath)
                    .build()
    );
    setContentView(R.layout.developers);
    toolbar = (Toolbar) findViewById(R.id.app_bar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    activityName = (TextView) findViewById(R.id.activity_name);


    setSupportActionBar(toolbar);
    //getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    //Typeface tf2 = Typeface.createFromAsset(getAssets(),
    //      "Arsenal-Bold.otf");

    //activityName.setTypeface(tf2);
    activityName.setText("Developers");


}
 
开发者ID:Aparoksha,项目名称:App_2016,代码行数:26,代码来源:Developers.java

示例12: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    pluggedComponents = new HashMap<>();
    crashReporters = new HashMap<>();

    registerCrashReporter(FirebaseCrashReporter.class.getCanonicalName(),
            new FirebaseCrashReporter());

    initDB();

    analyticsSender = startAnalyticsTrackers();

    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setFontAttrId(R.attr.fontPath)
            .build()
    );
}
 
开发者ID:gsanguinetti,项目名称:Stedroids,代码行数:19,代码来源:AbstractApplication.java

示例13: show

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
public ExtraWebViewCreator show() {
    viewOption.setBookMarkIcon(_bookMarkIcon);
    viewOption.setVoteIcon(_voteIcon);
    viewOption.setColor(_color);
    viewOption.setDefaultFontPath(_defaultFontPath);
    viewOption.setThemeName(_themeName);
    if (_defaultFontPath != null) {
        CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                .setDefaultFontPath(viewOption.getDefaultFontPath())
                .setFontAttrId(R.attr.fontPath)
                .build()
        );
    }
    Intent intent = new Intent(context, ItemActivity.class);
    intent.putExtra(ItemActivity.EXTRA_ITEM, dataModel);
    intent.putExtra(ItemActivity.EXTRA_VIEW_OPTION, viewOption);
    context.startActivity(intent);
    return this;
}
 
开发者ID:bkhezry,项目名称:ExtraWebView,代码行数:20,代码来源:ExtraWebViewCreator.java

示例14: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate() {

    super.onCreate();
    if(instance == null) {
        instance = this;
    }

    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                    .setDefaultFontPath("fonts/FZLanTingHeiS-L-GB-Regular.TTF")
                    .setFontAttrId(R.attr.fontPath)
                    .build()
    );

    //存储application刚启动状态
    ProjectSettingInfoPreUtil psip = ProjectSettingInfoPreUtil.getInstance();
    psip.addSpApplicationIsFirstStart(true);

    mLocalStorageUtil = new LocalStorageUtil();
    mLocalStorageUtil.initLocalDir(this);

    initImageLoader(getApplicationContext());

    startXiaoMiPush();
}
 
开发者ID:x251089003,项目名称:EveryXDay,代码行数:26,代码来源:EveryXDayApplication.java

示例15: onCreate

import uk.co.chrisjenx.calligraphy.CalligraphyConfig; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    //change the font
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
            .setDefaultFontPath("fonts/Roboto-Light.ttf")
            .setFontAttrId(R.attr.fontPath)
            .build()
    );

    setContentView(R.layout.main);

    mCameraView = (VariableJavaCameraView) findViewById(R.id.camera_view);

    handler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            Toast.makeText(context, (String) msg.obj, Toast.LENGTH_LONG).show();
        }
    };

    objectDetectionClient = new ObjectDetectionClient(handler);
}
 
开发者ID:kazuto1011,项目名称:ros-tms-perception,代码行数:26,代码来源:FasterRcnnClient.java


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