package Ġcom . l igh train . android . adapter Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġcom . l igh train . android . R Ċ import Ġcom . l igh train . android . ui . activity . Search Activity Ċ import Ġcom . l igh train . android . util . Start Activity Util Ċ import Ġkotlinx . android . synt hetic . main . activity _ search .* Ċ import Ġkotlinx . android . synt hetic . main . view _ search _ history . view .* Ċ Ċ class ĠSearch History Adapter ( private Ġvar Ġcontext : ĠContext , private Ġvar Ġlist : List < String >) Ġ: RecyclerView . Adapter < Search History Adapter . Search History Holder > (){ ĊĠĠĠ Ġclass ĠSearch History Holder ( item View : ĠView ) Ġ: ĠRecyclerView . ViewHolder ( item View ) ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠSearch History Holder Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġview = LayoutInflater . from ( context ). inflate ( R . layout . view _ search _ history , null ) ĊĠĠĠĠĠĠĠ Ġreturn ĠSearch History Holder ( view ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġlist . size ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠSearch History Holder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . item View . search History List Title . text = list [ position ] ĊĠĠĠĠĠĠĠ Ġholder . item View . search History List Title . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// è·³è½¬ åĪ° æĲľç´¢ è¯¦æĥħ çķĮéĿ¢ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠStart Activity Util . to Search Info Activity ( context , list [ position ], list [ position ]) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSearch Activity . app ?. finish () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }