shekhar pande
shekhar pande

Reputation: 1228

What is difference between getDecorView() and peekDecorView() in android

what is difference between getDecorView() and peekDecorView(), what they return

Upvotes: 1

Views: 3151

Answers (1)

user6011162
user6011162

Reputation:

getDecoreView :

Retrieve the top-level window decor view (containing the standard window frame/decorations and the client's content inside of that), which can be added as a window to the window manager.

Return : the top-level window decor view. 

peekDecorView() :

Retrieve the current decor view, but only if it has already been created; otherwise returns null.

Return :  the top-level window decor or null.

Upvotes: 2

Related Questions