Android setting font in text view
<p>Hi I am trying to change the font style of a <code>TextView</code>. I know how to change it, I have done this before I am using the following code.</p>

<pre><code>public class Main_Activity extends ListActivity {
    Typeface myNewFace = Typeface.createFromAsset(getAssets(),
            "fonts/bediz__.ttf");
    private CustomListAdapter adap;

    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    adap = new CustomListAdapter(this);
    setListAdapter(adap);
}
    public static class CustomListAdapter extends BaseAdapter implements
        Filterable {
           public View getView(final int position, View convertView,
            ViewGroup parent) {
        textView.setText(prayers[position]);
        holder.textLine.setTypeface(myNewFace);
           }
}
</code></pre>

<p>Some of the code I skipped because there is no need, by the way when I access <code>myNewFace</code> in <code>getView()</code> it ask me to make it <code>static</code>, when I make it <code>static</code> like this</p>

<pre><code>static Typeface myNewFace = Typeface.createFromAsset(getAssets(),"fonts/bediz__.ttf");
</code></pre>

<p>It gives me the following error</p>

<pre><code>Cannot make a static reference to the non-static method getAssets() from the type ContextWrapper
</code></pre>

<p>I dont know what to do, I have done this work several times before but now I dont know why it is not working.</p>
