private void onSetBackGround() { // 获取当前的layout mRootView = ((ViewGroup)findViewById(android.R.id.content)).getChildAt(0); if (mRootView != null) { debugout("mRootView != 0","进来了"); // mRootView 设置背景照片 mRootView.setBackground(getResources().getDrawable(R.drawable.show)); debugout(" mRootView 设置背景照片 ---->>>> ","成功"); } else { debugout(" mRootView 设置背景照片 ---->>>> ","失败,没有获取到View"); } }
动态设置ListActivity的背景
最新推荐文章于 2019-06-25 11:13:12 发布