package Ġcom . rh . he ji . ui . base Ċ Ċ import Ġandroidx . swiper ef resh layout . widget . Swipe Refresh Layout Ċ import Ġcom . rh . he ji . R Ċ Ċ /** Ċ Ġ* Date : Ġ 2 0 2 1 / 7 / 1 4 Ċ Ġ* Author : Ġ éĶ ħ å¾Ĺ éĵ ģ Ċ Ġ* # Ċ Ġ*/ Ċ Ċ /** Ċ Ġ* ĠåĪĿå§ĭåĮĸ ä¸ĭ æĭī åĪ·æĸ° ç©ºéĹ´ Ċ Ġ* Ġ Ġåľ¨ ä¸ĭ æĭī æĹ¶ è°ĥçĶ¨ block () å¹¶ åľ¨ block å®ĮæĪĲ åĲİ show Refresh ing Ċ Ġ*/ Ċ fun ĠBase Fragment . swipe Refresh Layout ( swipe Refresh Layout : ĠSw ipe Refresh Layout , Ġblock : Ġ() Ġ-> ĠUnit ) Ġ{ ĊĠĠĠ Ġswipe Refresh Layout . set Progress View Offset ( true , Ġ 0 , Ġ 2 0 0 )// è®¾ç½® ç¼© æĶ¾ ï¼Į èµ· å§ĭ ä½įç½® ï¼Į æľĢç»Ī ä½įç½® ĊĠĠĠ Ġswipe Refresh Layout . setColor Scheme Resources ( R . color . color Primary ) ĊĠĠĠ Ġswipe Refresh Layout . setOn Refresh Listener Ġ{ ĊĠĠĠĠĠĠĠ Ġshow Refresh ing ( swipe Refresh Layout ) ĊĠĠĠĠĠĠĠ Ġblock () ĊĠĠĠ Ġ} Ċ Ċ } Ċ Ċ fun ĠBase Fragment . hide Refresh ing ( swipe Refresh Layout : ĠSw ipe Refresh Layout ) Ġ{ ĊĠĠĠ Ġswipe Refresh Layout . is Refresh ing Ġ= Ġfalse Ċ } Ċ Ċ fun ĠBase Fragment . show Refresh ing ( swipe Refresh Layout : ĠSw ipe Refresh Layout ) Ġ{ ĊĠĠĠ Ġswipe Refresh Layout . is Refresh ing Ġ= Ġtrue Ċ }