1、代码中设置drawableTop
TextView textView = new TextView(getActivity()); Drawable drawable = getResources().getDrawable(R.drawable.home_1); drawable.setBounds(0, 0, drawable.getMinimumWidth(),drawable.getMinimumHeight()); textView.setCompoundDrawables(null, drawable, null, null); textView.setCompoundDrawablePadding(10);//设置drawablepadding
时间: 2024-10-12 13:10:58