Android(安卓)- Toast字体修改
16lz
2021-01-26
Toast字体修改
本文地址:http://blog.csdn.net/caroline_wendy
调整Toast字体大小为25:
LinearLayout linearLayout = (LinearLayout) toast.getView();TextView messageTextView = (TextView) linearLayout.getChildAt(0);messageTextView.setTextSize(25);
获得Toast的LinearLayout,找到TextView,进行大小的设置。 这样弹出的Toast的大小就可以适配,同样也可以提供新的Toast的Layout。
更多相关文章
- Android(安卓)内存溢出问题分析
- android 获取文件大小
- Flutter Android/iOS包大小分析
- Android中getWidth和getMeasuredWidth的区别
- 关于微信浏览器调整字体大小,H5页面适配问题
- android UI适配
- Android屏幕密度与UI大小显示
- (Android)View.getHeight或getWidth为0时的一些解决方案
- Android里的SparseArray