title: How to make a class that contains all my assets/objects to work with many fragments
body: <p>I want to make a class which contains all the static objects/assets that I use in many different classes and fragments(classes).
  So basically I want to be able to say in a fragment class: Style.example3 when I'm setting a font for a particular TextView. </p>
  
  <p>But I keep getting errors like the path or file is not found in the Style class. I have also tried with extending the Style class with Application and use the context or getAplicationContext.getAssets, without any succses.</p>
  
  <p>Right now I'm creating each asset or font everytime in every fragmentclass they are used in, which is not so good.</p>
  
  <pre><code>public class Style {
  
  
  //-----------------------FONTS------------------------
  
  public Typeface example1 = Typeface.createFromAsset(getAssets(), "fonts/FreeSerif.ttf");
  public Typeface example2 = Typeface.createFromAsset(getAssets(), "fonts/Arimo-Regular.ttf");
  public Typeface example3 = Typeface.createFromFile("fonts/FreeSerif.ttf");
  public Typeface example4 = Typeface.createFromFile("fonts/FreeSerif.ttf");
  
  //------------------------Color backgrounds HEX------------------------
  
  
  public static String darkgray =  "#373737";
  public static String lightgray = "#e6e6e6";
  public static String oldpaper =  "#EAE1D8";
  public static String lightpink = "#feaec9";
  public static String darkpink =  "#ff0f68";
  public static String redpink =   "#E849A1";
  public static String yellow =    "#F7E84E";
  public static String orange =    "#FFB732";
  public static String skyblue =   "#48B1E3";
  public static String green =     "#5dd95d";
  public static String softblack = "#3d3d3d";
  
  //------------------------------------------------------------------------
  }
  </code></pre>