package Ġcom . j enn ifer . andy . simple ey es . ui . feed Ċ Ċ import Ġandroid . net . Uri Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroid . widget . Relative Layout Ċ import Ġandroidx . recyclerview . widget . Grid LayoutManager Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . alibaba . android . ar outer . launcher . AR outer Ċ import Ġcom . ch ad . library . adapter . base . Base Quick Adapter Ċ import Ġcom . j enn ifer . andy . simple ey es . R Ċ import Ġcom . j enn ifer . andy . simple ey es . entity . And y Info Ċ import Ġcom . j enn ifer . andy . simple ey es . ui . base . Base Activity Ċ import Ġcom . j enn ifer . andy . simple ey es . ui . base . adapter . Base Data Adapter Ċ import Ġcom . j enn ifer . andy . simple ey es . ui . base . adapter . Base Data Adapter . Companion . RECT ANGLE _ CARD _ TYPE Ċ import Ġcom . j enn ifer . andy . simple ey es . ui . feed . presenter . All Category Presenter Ċ import Ġcom . j enn ifer . andy . simple ey es . ui . feed . view . All Category View Ċ import Ġcom . j enn ifer . andy . simple ey es . utils . bind View Ċ import Ġcom . j enn ifer . andy . simple ey es . widget . Grid Item Decoration Ċ import Ġcom . j enn ifer . andy . simple ey es . widget . state . Multiple State View ĊĊ Ċ /** Ċ Ġ* ĠAuthor : Ġ Ġand y . x wt Ċ Ġ* ĠDate : ĠĠĠĠ 2 0 1 8 / 7 / 1 6 Ġ 1 4 : 1 7 Ċ Ġ* ĠDescription : Ġ åħ¨ éĥ¨åĪĨ ç±» Ċ Ġ*/ Ċ Ċ class ĠAll Category Activity Ġ: ĠBase Activity < All Category View , ĠAll Category Presenter >(), ĠAll Category View Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġm ToolBar : ĠRelative Layout Ġby Ġbind View ( R . id . tool _ bar ) ĊĠĠĠ Ġprivate Ġval Ġm RecyclerView : ĠRecyclerView Ġby Ġbind View ( R . id . rv _ recycler ) ĊĠĠĠ Ġprivate Ġval Ġm State View : ĠMultiple State View Ġby Ġbind View ( R . id . multiple _ state _ view ) ĊĊĊĠĠĠ Ġoverride Ġfun Ġinit View ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġinit ToolBar ( m ToolBar , ĠR . string . all _ category ) ĊĠĠĠĠĠĠĠ Ġm Presenter . load All Categories Info () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġload All Categories Success ( andy Info : ĠAnd y Info ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠBase Data Adapter ( andy Info . item List ) ĊĠĠĠĠĠĠĠ Ġadapter . set Span Size Lookup Ġ{ Ġ_, Ġposition Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( adapter . getItem ViewType ( position ) Ġ== ĠRE CT ANGLE _ CARD _ TYPE ) Ġ 2 Ġelse Ġ 1 ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ// æł¹æį® action Url è·³è½¬ åĪ° çĽ¸åºĶ çķĮéĿ¢ ĊĠĠĠĠĠĠĠ Ġadapter . on ItemClickListener Ġ= ĠBase Quick Adapter . On ItemClickListener Ġ{ Ġ_, Ġ_, Ġposition Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠA Router . getInstance () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build ( Uri . parse ( adapter . data [ position ]. data . action Url )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. navigation () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġm RecyclerView . layout Manager Ġ= ĠGrid LayoutManager ( mContext , Ġ 2 ) ĊĠĠĠĠĠĠĠ Ġm RecyclerView . addItem Decoration ( Grid Item Decoration ( 2 , Ġ 4 , Ġtrue )) ĊĠĠĠĠĠĠĠ Ġm RecyclerView . adapter Ġ= Ġadapter ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġoverride Ġfun Ġshow Net Error ( on ClickListener : ĠView . OnClickListener ) Ġ{ ĊĠĠĠĠĠĠĠ Ġm State View . show Net Error ( on ClickListener ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġshow Content () Ġ{ ĊĠĠĠĠĠĠĠ Ġm State View . show Content () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget ContentView Layout Id () Ġ= ĠR . layout . activity _ all _ category Ċ }