我試圖在我的佈局中將monospace
字體設置爲列表視圖,但似乎棒棒糖忽略了字體集。棒棒糖下的其他api版本可以很好地顯示我想要的結果。在棒棒糖上忽略字體等寬字體
ps: 我不想設置一個全局字體,我只想爲我的listview的api> 21的等寬字體texttypeface。 任何幫助將是appreciated.Thanks
編輯
<ListView
android:layout_gravity="start"
android:id="@+id/List"
android:tag="toggle"
android:background="#99111111"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollingCache="false"
android:typeface="monospace "
android:dividerHeight="0.0dip" />
「ListView」沒有字體,因爲「ListView」沒有文字。 「ListView」內的行內部的小部件可能有文本。請發佈此問題的[最簡單,完整且可驗證的示例](http://stackoverflow.com/help/mcve)。 – CommonsWare
已編輯我的帖子,添加更多信息。 – CodeZero
在所有版本的Android上都應該忽略該屬性,因爲['ListView'不支持'typeface'](http://developer.android.com/reference/android/widget/ListView.html)。您需要在行中的小部件上設置字體。 – CommonsWare