View cv = getWindow().getDecorView();
cv.setBackgroundColor(getResources().getColor(R.color.white));
cv.setTextColor(getResources().getColor(R.color.white));
本文介绍了一种在Android应用中设置视图背景颜色和文字颜色的方法。通过获取窗口装饰视图并利用资源文件中的颜色值来实现。这种方法适用于需要统一调整应用界面颜色场景。
View cv = getWindow().getDecorView();
cv.setBackgroundColor(getResources().getColor(R.color.white));
cv.setTextColor(getResources().getColor(R.color.white));
3412

被折叠的 条评论
为什么被折叠?