package com.graphicalinfo.fim;

import android.app.Application;
import android.content.Context;
import android.graphics.Typeface;

import com.graphicalinfo.fim.utils.FontCache;
import com.graphicalinfo.fim.utils.LocaleUtil;

import java.lang.reflect.Field;

/**
 * Created by ayoob on 05/07/17.
 */

public class App extends Application {

    private static App instance;





    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        LocaleUtil.initLocale(this);
        initFonts();
    }

    private void initFonts() {
        try {
            final Typeface JosefinSlab = FontCache.getTypeface(this,"Josefin_Slab/JosefinSlab-Bold.ttf");

            final Field defaultFontTypefaceField = Typeface.class.getDeclaredField("SERIF");
            defaultFontTypefaceField.setAccessible(true);
            defaultFontTypefaceField.set(null, JosefinSlab);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    public static App getInstance() {
        return instance;
    }

    public static Context getContext() {
        return instance.getApplicationContext();
    }
}

@@ -977,16 +977,19 @@
     %7D%0A%0A%0A
+// 
     publ
@@ -1014,24 +1014,27 @@
 nstance() %7B%0A
+// 
         retu
@@ -1046,23 +1046,29 @@
 stance;%0A
+// 
     %7D%0A%0A
+// 
     publ
@@ -1100,24 +1100,26 @@
 ext() %7B%0A
+//
         
 return i
@@ -1102,32 +1102,33 @@
 t() %7B%0A//        
+ 
 return instance.
@@ -1148,20 +1148,23 @@
 nContext();%0A
+// 
     %7D%0A%7D%0A

Update App.java