如何在android中以编程方式在设备默认字体样式列表中添加不同的字体样式? [英] How to add different font styles to device default font style list in android programmatically?

查看:123
本文介绍了如何在android中以编程方式在设备默认字体样式列表中添加不同的字体样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

某些设备(如Samsung,htc,LG ......)可以选择更改设备字体样式并下载新字体。所以我打算开发一个包含不同字体样式的应用程序。当用户下载应用程序时,我的字体样式添加了系统字体样式列表,然后用户可以从列表中选择字体样式。



我使用下面的代码来选择列表中的字体样式





Some devices like (Samsung,htc,LG...) having an option to change device font style and download the new fonts. So I am planning to develop an application that contains different font styles. when user download the application, my font styles are added system font style list, then user can select the font style from the list.

I am using following code to select the font style from the list


settings.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        startActivityForResult(new Intent(android.provider.Settings.ACTION_DISPLAY_SETTINGS), 0);
    }
});







但我的问题是当用户在设置中单击字体样式时如何显示我的自定义字体样式以及系统字体列表。 />


请给我一个想法我该怎么办?




But my problem was how to show my custom font styles along with the system font list when user click font styles in settings.

Please give me an idea how can i do that?

推荐答案

参见https://www.google.com/search?q=list%20fonts%20android [ ^ ]。


这篇关于如何在android中以编程方式在设备默认字体样式列表中添加不同的字体样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆