Onclick on view pager in android does not work in my code

前端 未结 3 1032
谎友^
谎友^ 2021-02-14 06:08

i have implemented view pager in my code and i have put on-click listener on view pager but my on-click listener does not working i\'ll post my code

viewpager.s         


        
3条回答
  •  梦毁少年i
    2021-02-14 07:10

    Use clicklistener inside the item of ViewPager. This is not working because Child of ViewPager is intercepting event of parent(i.e ViewPager). E.G if you are adding ImageView inside ViewPager using PagerAdapter then use click of ImageView to make it simple

提交回复
热议问题