title: Is it possible to create a Class that defines object to be called in my Activity?
body: <p>Let's just say I want to create a class that holds all my fonts taken from the assets folder, is it possible?</p>
  
  <p>It's not letting me access the <code>getAssets()</code> without importing <code>android.app.activity</code>.</p>
  
  <p><strong>Utility Class</strong></p>
  
  <pre><code>import android.graphics.Typeface;
  
  public class TypeFontAssets //possibly missing an extends?
  {
      public static Typeface cs = Typeface.createFromAssets(getAssets(), "fonts/ComicSans.ttf");
      public static Typeface bh = Typeface.createFromAssets(getAssets(), "fonts/BradleyHand.ttf");
      public static Typeface co = Typeface.createFromAssets(getAssets(), "fonts/Courier.ttf");
  }
  </code></pre>
  
  <p><strong>Main Activity</strong></p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          //this class for ALL the fonts
          TypeFaceAssets tfa = new TypeFaceAssets();
  
          TextView userName = (TextView)findViewById(R.id.userNameView);
  
          //trying to get comic sans from the tfa object
          userName.setTypeface(tfa.cs);
      }
  }
  </code></pre>