替代方法:ContextCompat.getDrawable(Context context, R.drawable.xxx) 转载于:https://www.cnblogs.com/aWay01/p/6012942.html