android Toast文字加大
2015-08-05 05:37
567 查看
看到有人说用自定义的View,太麻烦了
private Toast mToast; private void showTip(final String str) { runOnUiThread(new Runnable() { @Override public void run() { if (mToast == null) { mToast = Toast.makeText(getApplicationContext(), "", Toast.LENGTH_LONG); LinearLayout layout = (LinearLayout) mToast.getView(); TextView tv = (TextView) layout.getChildAt(0); tv.setTextSize(25); } //mToast.cancel(); mToast.setGravity(Gravity.CENTER, 0, 0); mToast.setText(str); mToast.show(); } }); }
相关文章推荐
- 【Android开源项目分析】自定义圆形头像CircleImageView的使用和源码分析
- Android QQ空间说说回复功能简介
- [Android基础]Activity的生命周期
- Android:自定义dialog
- Android开源:数据库ORM框架GreenDao学习心得及使用总结
- Android-ViewPagerIndicator框架使用——TitlePageIndicator
- Android4.0 G-Sensor工作流程
- Android-Gsensor屏幕旋转
- Android.mk文件分析
- 为什么在AndroidManifest.xml中Activity的theme用不了Theme.Light.NoTitleBar?
- Android复习笔记(12) -handler的使用
- Android-升级数据库的最佳写法
- Android 提升ListView的运行效率
- Fedora22和Ubuntu 配置android SDK的32位库
- 【扣丁学堂】2015版Android系列视频拍摄感悟
- android常用布局
- android四大组件
- android常见布局补充
- android 之 SurfaceView使用(桌面弹球)
- Android各个发行版本对应使用的SQLite版本