갑자기 궁금한게 생겼는데요. 안드로이드의 액티비티에서 setContentView가 있잖아요. 그러면 액티비티가 갖고있는 뷰가 뭔지는 어떻게 받아오나요?
this.getWindow().getDecorView().findViewById(android.R.id.content)
나
this.findViewById(android.R.id.content)
this.findViewById(android.R.id.content).getRootView() 이렇게 하시면 됩니다.
this.findViewById(android.R.id.content).getRootView()
프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.
댓글 입력