Created
October 7, 2023 11:25
-
-
Save ruthwikkk/fdc4c164e718473a3027bf5c60e2b1c1 to your computer and use it in GitHub Desktop.
Code to get root view from Activity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val decorView = window.decorView | |
val rootView = decorView.findViewById(android.R.id.content) as ViewGroup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment