ContextCompat.getDrawable(getActivity(), R.drawable.name);
ResourcesCompat.getDrawable(getResources(), R.drawable.name, null);
ResourcesCompat.getDrawable(getResources(), R.drawable.name, anotherTheme);
//textview设置drawables Drawable nav_up = getResources().getDrawable(R.mipmap.selected_sel); // 必须设置宽高 要不不显示 nav_up.setBounds(0, 0, nav_up.getMinimumWidth(), nav_up.getMinimumHeight()); holder.tvTitle.setCompoundDrawables(null, null, nav_up, null);