// Path: app/src/main/java/com/lgvalle/beaufitulphotos/fivehundredpxs/Api500pxModule.java
// public class Api500pxModule {
// 	private static final String END_POINT = "https://api.500px.com/v1";
// 	private static Api500pxService service;
// 
// 	public static void init(Context ctx) {
// 		RestClient client = RestClientFactory.defaultClient(ctx);
// 		service = RestServiceFactory.getService(END_POINT, Api500pxService.class, client);
// 	}
// 
// 	/**
// 	 * Hide constructor
// 	 */
// 	private Api500pxModule() {}
// 
// 	/**
// 	 * Expose rest client
// 	 */
// 	public static Api500pxService getService() {
// 		return service;
// 	}
// 
// }
// 
// Path: app/src/main/java/com/lgvalle/beaufitulphotos/utils/TypefaceUtil.java
// public class TypefaceUtil {
// 
// 	/**
// 	 * Using reflection to override default typeface
// 	 * NOTICE: DO NOT FORGET TO SET TYPEFACE FOR APP THEME AS DEFAULT TYPEFACE WHICH WILL BE OVERRIDDEN
// 	 *
// 	 * @param context                    to work with assets
// 	 * @param defaultFontNameToOverride  for example "monospace"
// 	 * @param customFontFileNameInAssets file name of the font from assets
// 	 */
// 	public static void overrideFont(Context context, String defaultFontNameToOverride, String customFontFileNameInAssets) {
// 		try {
// 			final Typeface customFontTypeface = Typeface.createFromAsset(context.getAssets(), customFontFileNameInAssets);
// 
// 			final Field defaultFontTypefaceField = Typeface.class.getDeclaredField(defaultFontNameToOverride);
// 			defaultFontTypefaceField.setAccessible(true);
// 			defaultFontTypefaceField.set(null, customFontTypeface);
// 		} catch (Exception e) {
// 			Log.e("TypefaceUtil", "Can not set custom font " + customFontFileNameInAssets + " instead of " + defaultFontNameToOverride);
// 		}
// 	}
// }


import android.app.Application;
import com.lgvalle.beaufitulphotos.fivehundredpxs.Api500pxModule;
import com.lgvalle.beaufitulphotos.utils.TypefaceUtil;
package com.lgvalle.beaufitulphotos;


/**
 * Created by lgvalle on 21/07/14.
 */
public class BeautifulPhotosApplication extends Application {
	@Override
	public void onCreate() {
		super.onCreate();
		// Init service module
		Api500pxModule.init(this);
		// Replace font typeface in all application
// Path: app/src/main/java/com/lgvalle/beaufitulphotos/fivehundredpxs/Api500pxModule.java
// public class Api500pxModule {
// 	private static final String END_POINT = "https://api.500px.com/v1";
// 	private static Api500pxService service;
// 
// 	public static void init(Context ctx) {
// 		RestClient client = RestClientFactory.defaultClient(ctx);
// 		service = RestServiceFactory.getService(END_POINT, Api500pxService.class, client);
// 	}
// 
// 	/**
// 	 * Hide constructor
// 	 */
// 	private Api500pxModule() {}
// 
// 	/**
// 	 * Expose rest client
// 	 */
// 	public static Api500pxService getService() {
// 		return service;
// 	}
// 
// }
// 
// Path: app/src/main/java/com/lgvalle/beaufitulphotos/utils/TypefaceUtil.java
// public class TypefaceUtil {
// 
// 	/**
// 	 * Using reflection to override default typeface
// 	 * NOTICE: DO NOT FORGET TO SET TYPEFACE FOR APP THEME AS DEFAULT TYPEFACE WHICH WILL BE OVERRIDDEN
// 	 *
// 	 * @param context                    to work with assets
// 	 * @param defaultFontNameToOverride  for example "monospace"
// 	 * @param customFontFileNameInAssets file name of the font from assets
// 	 */
// 	public static void overrideFont(Context context, String defaultFontNameToOverride, String customFontFileNameInAssets) {
// 		try {
// 			final Typeface customFontTypeface = Typeface.createFromAsset(context.getAssets(), customFontFileNameInAssets);
// 
// 			final Field defaultFontTypefaceField = Typeface.class.getDeclaredField(defaultFontNameToOverride);
// 			defaultFontTypefaceField.setAccessible(true);
// 			defaultFontTypefaceField.set(null, customFontTypeface);
// 		} catch (Exception e) {
// 			Log.e("TypefaceUtil", "Can not set custom font " + customFontFileNameInAssets + " instead of " + defaultFontNameToOverride);
// 		}
// 	}
// }


// Path: app/src/main/java/com/lgvalle/beaufitulphotos/BeautifulPhotosApplication.java
import android.app.Application;
import com.lgvalle.beaufitulphotos.fivehundredpxs.Api500pxModule;
import com.lgvalle.beaufitulphotos.utils.TypefaceUtil;

package com.lgvalle.beaufitulphotos;


/**
 * Created by lgvalle on 21/07/14.
 */
public class BeautifulPhotosApplication extends Application {
	@Override
	public void onCreate() {
		super.onCreate();
		// Init service module
		Api500pxModule.init(this);
		// Replace font typeface in all application
		TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/RobotoCondensed-Regular.ttf");