Android 防止设置大字体导致布局混乱
2015-12-16 10:12
405 查看
在Application的onCreate()方法里添加如下代码即可:
Resources res = getResources();
Configuration mConfiguration = new Configuration();
mConfiguration.setToDefaults();
res.updateConfiguration(mConfiguration,res.getDisplayMetrics() );
Resources res = getResources();
Configuration mConfiguration = new Configuration();
mConfiguration.setToDefaults();
res.updateConfiguration(mConfiguration,res.getDisplayMetrics() );
相关文章推荐
- Android动画Property Animation入门
- Android通过startService播放背景音乐
- android 输入法弹出关闭与禁用
- Android植物大战僵尸小游戏
- Android通过startService实现文件批量下载
- android TextView中间删除线显示
- Android 强引用、软引用、弱引用、虚引用
- Android中bindService基本使用方法概述
- android上开源的酷炫的交互动画和视觉效果
- Android实战 - 音心播发器 (MusicService ,Notification, MainActivity 总结)
- Android蓝牙开发
- 每日一问之Android系统中的各种FLAG
- android NDK开发编译时出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- Android中startService基本使用方法概述
- 【转载整理】Android对话框
- android笔记--保存和恢复activity的状态数据
- Android应用图标尺寸规范
- Android传感器编程带实例
- Android源码之陌陌项目源码
- android开发之synchronized的用法