package Ġcom . brand ongo get ap . sticky headers . demo . view pager Ċ Ċ 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 . RecyclerView Ċ import Ġcom . brand ongo get ap . sticky headers . demo . Item Generator Ċ import Ġcom . brand ongo get ap . sticky headers . demo . R Ċ import Ġcom . brand ongo get ap . sticky headers . demo . Recycler Adapter Ċ import Ġcom . brand ongo get ap . sticky headers . demo . Top Sn apped Sticky LayoutManager Ċ Ċ class ĠTab Fragment Ġ: ĠFragment () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ tab , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġview . findViewById < RecyclerView >( R . id . recycler _ view ). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadapter Ġ= ĠRe cycler Adapter (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠsetData ( Item Generator . demo List ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlayout Manager Ġ= ĠTop Sn apped Sticky LayoutManager ( context , Ġadapter Ġas ĠRe cycler Adapter ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }