您的位置:首页 > 其它

425_缩小TextView字体到两行

2016-12-01 23:00 197 查看
缩小TextView字体到两行

        runnable = new Runnable() {

            @Override

            public void run() {

                int lineCount = tv.getLineCount();

                if (lineCount > 2) {

                    float textSize = tv.getTextSize();

                    textSize--;

                    tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);

                    tv.post(runnable);

                }

            }

        };

        

        tv.post(runnable);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: