早教吧 育儿知识 作业答案 考试题库 百科 知识分享

getWindow().setBackgroundDrawableResource(R.color.redbg);是什么意思?getWindow()是什么意思?细解

题目详情
getWindow().setBackgroundDrawableResource(R.color.red_bg);是什么意思?getWindow()是什么意思?细解
▼优质解答
答案和解析
你这段代码是android代码吧.
getWindow()是类android.app.Activity里的方法,你的这段代码所在的类是继承了android.app.Activity了的.以下是androidAPI的注释:
Window android.app.Activity.getWindow()
public WindowgetWindow()Added in API level
1Retrieve the current Window for the activity.
This can be used to directly access parts of the Window API that are not available through Activity/Screen.ReturnsWindow The current window,or null if the activity is not visual.
看了 getWindow().se...的网友还看了以下: