Back to project page mobile-android.
The source code is released under:
MIT License
If you think the Android project mobile-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.manyconf.conference; /*w ww . j av a 2 s .c om*/ import android.content.res.AssetManager; import android.graphics.Typeface; import android.util.Log; public class Theme { private final static String mod = "conf.theme"; private static Theme instance = null; public Typeface regularFont; public Typeface boldFont; private Theme() { // Exists only to defeat instantiation. load(); } public static Theme current() { if(instance == null) { instance = new Theme(); } return instance; } private void load() { // TODO some code here to read stuff from a configuration file // Set fonts, see also: http://stackoverflow.com/questions/5634245 AssetManager assets = ConferenceApplication.context.getAssets(); Log.d(mod, String.format("Assets folder: %s", assets.toString())); this.regularFont = Typeface.createFromAsset(assets, "fonts/Raleway-Regular.otf"); this.boldFont = Typeface.createFromAsset(assets, "fonts/Raleway-Bold.otf"); } }