设置layout参数
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); lp.setMargins(2, 2, 2, 2); view.setLayoutParams(lp);
textview字体加粗
textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗
textView.getPaint().setFakeBoldText(true);//加粗