代码动态设置TextView

//                    热门服务title显示
                    TextView t1 = new TextView(ServiceCustomActivity.this);
                    t1.setText(R.string.Hot_service);
                    t1.setTextColor(R.color.black);
                    t1.setTextSize(16);
                    t1.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
                    t1.setPadding(0, 20, 0, 20);//left, top, right,

猜你喜欢

转载自blog.csdn.net/xiyangyang8110/article/details/124880328