title: How to set a custom font from the assets folder to the title of an Actionbar in Android?
body: <p>I am trying to set a custom font <code>Dosis-Medium.otf</code> which is placed in the <code>asssets</code> folder under a <code>subfolder font</code>. I am trying to use the following code but it gives me an error </p>
  
  <p><code>The constructor TypefaceSpan(Profile, String) is undefined</code>. Please guide me step by step where I am going wrong.</p>
  
  <p>My code snippet is as follows:</p>
  
  <pre><code>   SpannableString s = new SpannableString("My Title");
     s.setSpan(new TypefaceSpan(this, "Dosis-Medium.otf"), 0, s.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
     ActionBar actionBar = getActionBar();
     actionBar.setTitle(s);
  </code></pre>