/** Ċ * ĠCopyright ĠS or am its u ĠCo ., ĠLtd . ĠAll ĠRights ĠReserved . Ċ * ĠSPDX - License - Identifier : ĠGPL - 3 . 0 Ċ */ Ċ Ċ package Ġjp . co . sor am its u . feature _ main _ impl . presentation . language Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġby . kir ich 1 4 0 9 . view binding delegate . view Binding Ċ import Ġjp . co . sor am its u . common . base . Base Fragment Ċ import Ġjp . co . sor am its u . common . di . api . Feature Utils Ċ import Ġjp . co . sor am its u . common . presentation . De bounce Click Handler Ċ import Ġjp . co . sor am its u . common . res our ses . ResourceManager Ċ import Ġjp . co . sor am its u . feature _ main _ api . di . Main Feature Api Ċ import Ġjp . co . sor am its u . feature _ main _ impl . R Ċ import Ġjp . co . sor am its u . feature _ main _ impl . databinding . Fragment Select Language Binding Ċ import Ġjp . co . sor am its u . feature _ main _ impl . di . Main Feature Component Ċ import Ġjp . co . sor am its u . feature _ main _ impl . presentation . MainActivity Ċ import Ġjp . co . sor am its u . feature _ wallet _ api . domain . interfaces . Bottom Bar Controller Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠSelect Language Fragment Ġ: ĊĠĠĠ ĠBase Fragment < Select Language ViewModel >( R . layout . fragment _ select _ language ) Ġ{ ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġdebounce Click Handler : ĠDe bounce Click Handler ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar Ġresource Manager : ĠResourceManager ĊĠĠĠ Ġprivate Ġval Ġbinding Ġby Ġview Binding ( Fragment Select Language Binding :: bind ) ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ Ġ( activity Ġas ĠBottom Bar Controller ). hide Bottom Bar () ĊĊĠĠĠĠĠĠĠ Ġwith ( binding . toolbar ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Home Button Listener Ġ{ ĠviewModel . on Back Pressed () Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġshow Home Button () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġbinding . language RecyclerView . adapter Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSelect Language Adapter ( de bounce Click Handler ) Ġ{ ĠviewModel . language Selected ( it ) Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . languages LiveData . observe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ( binding . language RecyclerView . adapter Ġas ĠSelect Language Adapter ). submit List ( it ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . language Changed LiveData . observe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ( activity Ġas ĠMainActivity ). restart After Language Change () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinject () Ġ{ ĊĠĠĠĠĠĠĠ ĠFeature Utils . get Feature < Main Feature Component >( require Context (), ĠMain Feature Api :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. select Language Component Builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Fragment ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. inject ( this ) ĊĠĠĠ Ġ} Ċ } Ċ