인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

ᄋᄋ's profile image
ᄋᄋ

asked

[Beginner] Creating an Android Community App (Android Kotlin)

어댑터 Context

Resolved

Written on

·

423

0

ContentsListActivity에서 어댑터에 context를 넣어줄 때는 baseContext를 쓰고, BookmarkFragment.kt 에서 어댑터에 context를 넣어줄 때는 requireContext()로 다르게 쓰신 이유가 있으실까요?

androidkotlinfirebase

Answer 1

0

bokchi님의 프로필 이미지
bokchi
Instructor

Activity와 Fragment에서 context를 가져와서 사용하는 방식입니다.

https://valuenetwork.tistory.com/121

https://minchanyoun.tistory.com/58

위의 링크를 참고해보시겠어요?

ᄋᄋ님의 프로필 이미지
ᄋᄋ
Questioner

감사합니다! 지식이 부족했네요ㅠㅠ

ᄋᄋ's profile image
ᄋᄋ

asked

Ask a question