/**
* 设置背景
*
* @param fragment fragment
* @param background 背景
*/
public static void setBackground(@NonNull Fragment fragment, Drawable background) {
View view = fragment.getView();
if (view != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
view.setBackground(background);
} else {
view.setBackgroundDrawable(background);
}
}
}
FragmentUtils.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:MVVMArms
作者:
评论列表
文章目录