Example usage for android.content Context getAssets

List of usage examples for android.content Context getAssets

Introduction

In this page you can find the example usage for android.content Context getAssets.

Prototype

public abstract AssetManager getAssets();

Source Link

Document

Returns an AssetManager instance for the application's package.

Usage

From source file:Main.java

public static AssetManager assetManager(@NonNull final Context context) {
    return context.getAssets();
}

From source file:Main.java

public static Typeface outlineFont(Context ctx) {
    return Typeface.createFromAsset(ctx.getAssets(), "ParmaPetitOutline.ttf");
}

From source file:Main.java

public static Typeface normalFont(Context ctx) {
    return Typeface.createFromAsset(ctx.getAssets(), "ParmaPetit-Normal.ttf");
}

From source file:Main.java

public static Typeface getRobotoLight(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "fonts/robotolight.ttf");
}

From source file:Main.java

public static Typeface obtainTypeface(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "fonts/noto-light.otf");
}

From source file:Main.java

public static Typeface getRobotoLight(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "robotolight.ttf");
}

From source file:Main.java

public static Typeface getTypefaceShelf(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "fonts/see_you_at_the_movies.ttf");
}

From source file:Main.java

public static Typeface getLatoLightFont(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "lato_light.ttf");
}

From source file:Main.java

public static Typeface getFontRoboto(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "Roboto-Regular.ttf");
}

From source file:Main.java

/**
 *
 * @param context//  ww w . j  av  a 2s.  c  o  m
 * @return The custom Typeface for RobotoSlab-Light.ttf
 */
public static Typeface robotoThin(Context context) {
    return Typeface.createFromAsset(context.getAssets(), "fonts/RobotoSlab-Light.ttf");
}