package Ġcom . example . come one inst ein . ui . fragment čĊč Ċ import Ġandroid . content . Intent č Ċ import Ġandroid . os . Bundle č Ċ import Ġandroid . view . LayoutInflater č Ċ import Ġandroid . view . View č Ċ import Ġandroid . view . ViewGroup č Ċ import Ġandroidx . fragment . app . Fragment č Ċ import Ġandroidx . recyclerview . widget . Linear LayoutManager č Ċ import Ġcom . example . come one inst ein . My Application č Ċ import Ġcom . example . come one inst ein . R č Ċ import Ġcom . example . come one inst ein . adapter . Comm end Method Adapter č Ċ import Ġcom . example . come one inst ein . bean . Comm end Method Item Bean č Ċ import Ġcom . example . come one inst ein . bean . Item Bean č Ċ import Ġcom . example . come one inst ein . ui . activity . Method Item Activity č Ċ import Ġcom . example . come one inst ein . ui . activity . Rank List Activity č Ċ import Ġkotlinx . android . synt hetic . main . fragment _ markdown comm end .* č Ċ import Ġkotlinx . android . synt hetic . main . fragment _ method comm end .* čĊč Ċ class ĠMarkdown Comm end Fragment Ġ: ĠFragment () Ġ{ čĊĠĠĠ Ġprivate Ġvar Ġlist Ġ: ĠArrayList < Item Bean > Ġ= Ġarray ListOf ( čĊĠĠĠĠĠĠĠ ĠItem Bean (" åĲįç§° "," åıĳå¸ĥ æĹ¶éĹ´ "," æ¬¡æķ° "," http :// a 1 . q pic . cn / p sc ? / 8 3 5 d 6 0 2 2 - 3 dfa - 4 3 1 0 - 9 2 a 2 - fb 0 0 3 0 7 0 ba ac / 0 5 Rl Wl 8 gs TO H * Z 1 7 Mt CB z LC yg Y p 1 gn xD tp Y 3 1 ue cl Z . g 3 h * 6 QM 5 8 M Un fi HP 2 D q Vi H 4 j Eg EL J 8 5 . y Sm KS cs 6 E * w !! / b & ek = 1 & kp = 1 & pt = 0 & bo = O AS g BT g Eo A UR AD c ! & tl = 1 & tm = 1 6 3 0 7 3 8 8 0 0 & s ce = 0 - 1 2 - 1 2 & rf = viewer _ 3 1 1 "," 0 "), čĊĠĠĠĠĠĠĠ ĠItem Bean (" åĲįç§° "," åıĳå¸ĥ æĹ¶éĹ´ "," æ¬¡æķ° "," http :// a 1 . q pic . cn / p sc ? / 8 3 5 d 6 0 2 2 - 3 dfa - 4 3 1 0 - 9 2 a 2 - fb 0 0 3 0 7 0 ba ac / 0 5 Rl Wl 8 gs TO H * Z 1 7 Mt CB z LC yg Y p 1 gn xD tp Y 3 1 ue cl Z . g 3 h * 6 QM 5 8 M Un fi HP 2 D q Vi H 4 j Eg EL J 8 5 . y Sm KS cs 6 E * w !! / b & ek = 1 & kp = 1 & pt = 0 & bo = O AS g BT g Eo A UR AD c ! & tl = 1 & tm = 1 6 3 0 7 3 8 8 0 0 & s ce = 0 - 1 2 - 1 2 & rf = viewer _ 3 1 1 "," 0 "), čĊĠĠĠĠĠĠĠ ĠItem Bean (" åĲįç§° "," åıĳå¸ĥ æĹ¶éĹ´ "," æ¬¡æķ° "," http :// a 1 . q pic . cn / p sc ? / 8 3 5 d 6 0 2 2 - 3 dfa - 4 3 1 0 - 9 2 a 2 - fb 0 0 3 0 7 0 ba ac / 0 5 Rl Wl 8 gs TO H * Z 1 7 Mt CB z LC yg Y p 1 gn xD tp Y 3 1 ue cl Z . g 3 h * 6 QM 5 8 M Un fi HP 2 D q Vi H 4 j Eg EL J 8 5 . y Sm KS cs 6 E * w !! / b & ek = 1 & kp = 1 & pt = 0 & bo = O AS g BT g Eo A UR AD c ! & tl = 1 & tm = 1 6 3 0 7 3 8 8 0 0 & s ce = 0 - 1 2 - 1 2 & rf = viewer _ 3 1 1 "," 0 "), čĊĠĠĠĠĠĠĠ ĠItem Bean (" åĲįç§° "," åıĳå¸ĥ æĹ¶éĹ´ "," æ¬¡æķ° "," http :// a 1 . q pic . cn / p sc ? / 8 3 5 d 6 0 2 2 - 3 dfa - 4 3 1 0 - 9 2 a 2 - fb 0 0 3 0 7 0 ba ac / 0 5 Rl Wl 8 gs TO H * Z 1 7 Mt CB z LC yg Y p 1 gn xD tp Y 3 1 ue cl Z . g 3 h * 6 QM 5 8 M Un fi HP 2 D q Vi H 4 j Eg EL J 8 5 . y Sm KS cs 6 E * w !! / b & ek = 1 & kp = 1 & pt = 0 & bo = O AS g BT g Eo A UR AD c ! & tl = 1 & tm = 1 6 3 0 7 3 8 8 0 0 & s ce = 0 - 1 2 - 1 2 & rf = viewer _ 3 1 1 "," 0 "), čĊĠĠĠĠĠĠĠ ĠItem Bean (" åĲįç§° "," åıĳå¸ĥ æĹ¶éĹ´ "," æ¬¡æķ° "," http :// a 1 . q pic . cn / p sc ? / 8 3 5 d 6 0 2 2 - 3 dfa - 4 3 1 0 - 9 2 a 2 - fb 0 0 3 0 7 0 ba ac / 0 5 Rl Wl 8 gs TO H * Z 1 7 Mt CB z LC yg Y p 1 gn xD tp Y 3 1 ue cl Z . g 3 h * 6 QM 5 8 M Un fi HP 2 D q Vi H 4 j Eg EL J 8 5 . y Sm KS cs 6 E * w !! / b & ek = 1 & kp = 1 & pt = 0 & bo = O AS g BT g Eo A UR AD c ! & tl = 1 & tm = 1 6 3 0 7 3 8 8 0 0 & s ce = 0 - 1 2 - 1 2 & rf = viewer _ 3 1 1 "," 0 "), čĊĠĠĠĠĠĠĠ ĠItem Bean (" åĲįç§° "," åıĳå¸ĥ æĹ¶éĹ´ "," æ¬¡æķ° "," http :// a 1 . q pic . cn / p sc ? / 8 3 5 d 6 0 2 2 - 3 dfa - 4 3 1 0 - 9 2 a 2 - fb 0 0 3 0 7 0 ba ac / 0 5 Rl Wl 8 gs TO H * Z 1 7 Mt CB z LC yg Y p 1 gn xD tp Y 3 1 ue cl Z . g 3 h * 6 QM 5 8 M Un fi HP 2 D q Vi H 4 j Eg EL J 8 5 . y Sm KS cs 6 E * w !! / b & ek = 1 & kp = 1 & pt = 0 & bo = O AS g BT g Eo A UR AD c ! & tl = 1 & tm = 1 6 3 0 7 3 8 8 0 0 & s ce = 0 - 1 2 - 1 2 & rf = viewer _ 3 1 1 "," 0 "), čĊĠĠĠĠĠĠĠ ĠItem Bean (" åĲįç§° "," åıĳå¸ĥ æĹ¶éĹ´ "," æ¬¡æķ° "," http :// a 1 . q pic . cn / p sc ? / 8 3 5 d 6 0 2 2 - 3 dfa - 4 3 1 0 - 9 2 a 2 - fb 0 0 3 0 7 0 ba ac / 0 5 Rl Wl 8 gs TO H * Z 1 7 Mt CB z LC yg Y p 1 gn xD tp Y 3 1 ue cl Z . g 3 h * 6 QM 5 8 M Un fi HP 2 D q Vi H 4 j Eg EL J 8 5 . y Sm KS cs 6 E * w !! / b & ek = 1 & kp = 1 & pt = 0 & bo = O AS g BT g Eo A UR AD c ! & tl = 1 & tm = 1 6 3 0 7 3 8 8 0 0 & s ce = 0 - 1 2 - 1 2 & rf = viewer _ 3 1 1 "," 0 ") čĊĠĠĠ Ġ) čĊčĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ čĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( čĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , čĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, čĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? čĊĠĠĠ Ġ): ĠView ? Ġ{ čĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ markdown comm end , Ġcontainer , Ġfalse ) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġoverride Ġfun Ġon Activity Created ( savedInstanceState : ĠBundle ?) Ġ{ čĊĠĠĠĠĠĠĠ Ġsuper . on Activity Created ( savedInstanceState ) čĊĠĠĠĠĠĠĠ Ġinit Rv () čĊčĊĠĠĠĠĠĠĠ Ġne at _ popular _ title . setOnClickListener Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġintent Ġ= ĠIntent ( My Application . context , ĠRank List Activity :: class . java ) čĊĠĠĠĠĠĠĠĠĠĠĠ Ġintent . putExtra (" list _ title ", ne at _ popular _ title . text ) čĊĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( intent ) čĊĠĠĠĠĠĠĠ Ġ} čĊĠĠĠĠĠĠĠ Ġcontent _ popular _ title . setOnClickListener Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġintent Ġ= ĠIntent ( My Application . context , ĠRank List Activity :: class . java ) čĊĠĠĠĠĠĠĠĠĠĠĠ Ġintent . putExtra (" list _ title ", content _ popular _ title . text ) čĊĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( intent ) čĊĠĠĠĠĠĠĠ Ġ} čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġfun Ġinit Rv (){ čĊĠĠĠĠĠĠĠ Ġne at _ popular _ rv . layout Manager Ġ= ĠLinearLayoutManager ( My Application . context , Linear LayoutManager . HORIZONTAL , false ) čĊĠĠĠĠĠĠĠ Ġval Ġne at Method Adapter Ġ= ĠCom m end Method Adapter ( list ) čĊĠĠĠĠĠĠĠ Ġne at Method Adapter . setOn ItemClickListener ( object Ġ: ĠCom m end Method Adapter . On ItemClickListener { čĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon Item Click ( view : ĠView ?, Ġposition : ĠInt ) Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġintent Ġ= ĠIntent ( My Application . context , ĠMethod Item Activity :: class . java ) čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġintent . putExtra (" item ", list [ position ]) čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( intent ) čĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} čĊĠĠĠĠĠĠĠ Ġ}) čĊĠĠĠĠĠĠĠ Ġne at _ popular _ rv . adapter Ġ= Ġne at Method Adapter čĊčĊĠĠĠĠĠĠĠ Ġcontent _ popular _ rv . layout Manager Ġ= ĠLinearLayoutManager ( My Application . context , Linear LayoutManager . HORIZONTAL , false ) čĊĠĠĠĠĠĠĠ Ġval Ġcontent Method Adapter Ġ= ĠCom m end Method Adapter ( list ) čĊĠĠĠĠĠĠĠ Ġcontent Method Adapter . setOn ItemClickListener ( object Ġ: ĠCom m end Method Adapter . On ItemClickListener { čĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon Item Click ( view : ĠView ?, Ġposition : ĠInt ) Ġ{ čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġintent Ġ= ĠIntent ( My Application . context , ĠMethod Item Activity :: class . java ) čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġintent . putExtra (" item ", list [ position ]) čĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠstartActivity ( intent ) čĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} čĊĠĠĠĠĠĠĠ Ġ}) čĊĠĠĠĠĠĠĠ Ġcontent _ popular _ rv . adapter Ġ= Ġcontent Method Adapter čĊĠĠĠ Ġ} čĊč Ċ } čĊ