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

Inflearn Community Q&A

닉네임무얼하지's profile image
닉네임무얼하지

asked

[For beginners] Learn Android Kotlin by creating 8 apps

Trot singer music list app introduction and layout settings

왜 img를 눌러도 제대로 작동을 안할까요?

Written on

·

324

0

강의명 : 트로트 가수 음악 목록 앱 소개 및 레이아웃 설정

 

이 이전강의에서 nav예제떄도 안되길래 스스로찾다 해결을 못해서 다음강에서 또 할테니 보고하면 되겠지 하는데 또 안되서 질문합니다.

img1 :영탁

img2:영웅

img3:가인 입니다

 

초기 영탁페이지에서 영웅과 가인누르면 각각페이지가 넘어가게까지 해놨는데,

 

영웅을 누르면 가인이 뜨고 가인은 눌러도 반응도 안합니다.

androidkotlinfirebase

Answer 1

0

bokchi님의 프로필 이미지
bokchi
Instructor

코드를 깃허브나 구글 드라이브에 올리신 후 링크를 공유해주시면 살펴보겠습니다😀

bokchi님의 프로필 이미지
bokchi
Instructor

val img3=view.findViewById<ImageView>(R.id.img3)
img2.setOnClickListener(){
    it.findNavController().navigate(R.id.action_singer1_to_singer3)
}

이 부분에 img3을 사용하지 않으신 것 같네요.

아래와 같이 변경해보세요.

val img3=view.findViewById<ImageView>(R.id.img3)
        img3.setOnClickListener(){
            it.findNavController().navigate(R.id.action_singer1_to_singer3)
        }
bokchi님의 프로필 이미지
bokchi
Instructor

img2 -> img3 으로 변경했습니다.

헉 이렇게일차원적인 오류를 ... 죄송합니닷 ㅠㅠ 그리고 감사합니다

닉네임무얼하지's profile image
닉네임무얼하지

asked

Ask a question