增加和用户选择减小Android应用程序的字体大小 [英] Increasing and Decreasing the font sizes of the android application by user selection
问题描述
其实我想由用户选择我的应用程序指定自定义文本大小。下面是验证这个想法/主题图
Actually i want to specify the custom text size in my application by user selection. Below is a figure that demonstrate the idea/theme
所以,对于我有一个想法,以实现这一目标。
So, for that i have an idea to achieve this.
,我将在视图中创建具有用户输入选项增大/减小的字体尺寸,其一个对话框。更改字体大小后,我VLL应用相同的应用程序。 (+)及( - )符号将努力改变字体大小以及搜索栏了。
I will create a dialog in the view which having the user input options to increase/ decrease the font size. after changing the font size, i vll apply the same to the application. (+) & (-) signs will work to change the font size as well as seek bar too.
下面我的问题是有没有在构建Android类/库中的任何特定的字体样式/大小更改/任何其他想法是可用?
Here my question is is there any specific font style/ size changes in build android class / library / any other idea is available?
任何帮助将AP preciate。意味着当我将拿出一些东西,我试试。三江源
any help will be appreciate. mean while i will come with something which i try. Thankyou
推荐答案
您可以检查
btnTextDeSave.setOnClickListener(onClickEven);
btnTextInSave.setOnClickListener(onClickEven);
public OnClickListener onClickEven = new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
break;
case R.id.btTextDeSave:
txtDescriptionSave.setTextSize(TypedValue.COMPLEX_UNIT_PX, (txtDescriptionSave.getTextSize() - 2f));
break;
case R.id.btTextInSave:
txtDescriptionSave.setTextSize(TypedValue.COMPLEX_UNIT_PX, (txtDescriptionSave.getTextSize() + 2f));
break;
default:
break;
}
}
};
这篇关于增加和用户选择减小Android应用程序的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!