在string.xml文件中添加 自己定義的字體圖標的對應的文本
<string name="icon_title_bar_back"></string>
其中&#x和後邊的;是必須要存在的。
然後再oncreate的文件中引用這樣的兩句話
//引用對應的字體文件
Typeface font = Typeface.createFromAsset( context.getAssets(), "icomoon.ttf" );
left=(Button) findViewById(R.id.titlebar_left);
left.setTypeface(font); //設置對應的字體。會自動替換爲圖標
然後要在button中設置對應的text爲 icon_title_bar_back