Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.Typeface;

import java.util.HashMap;

public class Main {
    private static HashMap<String, Typeface> fonts;

    public static HashMap<String, Typeface> getFontsMap() {
        if (fonts == null) {
            try {
                throw new Exception(
                        "You should call createFonts method in your application class before using library");
            } catch (Exception e) {
                e.printStackTrace();
            }
            return null;
        } else {
            return fonts;
        }
    }
}