package Ġcom . j aw nn yp oo . open me h . util Ċ Ċ import Ġandroidx . swiper ef resh layout . widget . Swipe Refresh Layout Ċ import Ġandroidx . view pager . widget . ViewPager Ċ Ċ /** Ċ Ġ* ĠSync s Ġstate Ġbetween Ġ[ Swipe Refresh Layout ], Ġdisabling Ġthe Ġswipe Ċ Ġ* Ġto Ġrefresh Ġwhen Ġthe Ġview Ġpager Ġis Ġbeing Ġpage d Ċ Ġ*/ Ċ class ĠSw ipe Refresh ViewPager Sync er ( private Ġval Ġswipe Refresh Layout : ĠSw ipe Refresh Layout ) Ġ{ ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠSync Ġthe Ġstate . ĠCall Ġthis Ġwithin ĠOn Page ChangeListener . on Page Scroll StateChanged ĊĊĠĠĠĠ Ġ* Ġ@ param Ġstate Ġthe Ġstate Ġfrom Ġthe Ġon Ġpage Ġchange Ġlistener ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun Ġsync ( state : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġswipe Refresh Layout . isEnabled Ġ= Ġstate Ġ== ĠView Pager . SCROLL _ STATE _ IDLE ĊĠĠĠ Ġ} Ċ }