/** Ċ * Ġ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 _ on boarding _ impl . presentation . tutorial Ċ Ċ import Ġandroid . graphics . Color Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . text . Sp ann able Ċ import Ġandroid . text . Sp ann able String Ċ import Ġandroid . text . method . Link Movement Method Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . lifecycle . Observer Ċ 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 . presentation . view . De bounce ClickListener Ċ import Ġjp . co . sor am its u . common . presentation . view . S ora Progress Dialog Ċ import Ġjp . co . sor am its u . common . util . S ora Clickable Span Ċ import Ġjp . co . sor am its u . feature _ on boarding _ api . di . On boarding Feature Api Ċ import Ġjp . co . sor am its u . feature _ on boarding _ impl . R Ċ import Ġjp . co . sor am its u . feature _ on boarding _ impl . di . On boarding Feature Component Ċ import Ġjp . co . sor am its u . feature _ on boarding _ impl . presentation . On boarding Router Ċ import Ġkotlinx . android . synt hetic . main . fragment _ tutorial . indicator Ċ import Ġkotlinx . android . synt hetic . main . fragment _ tutorial . tutorial Restore TextView Ċ import Ġkotlinx . android . synt hetic . main . fragment _ tutorial . tutorial SignUp Button Ċ import Ġkotlinx . android . synt hetic . main . fragment _ tutorial . tutorial Terms Ċ import Ġkotlinx . android . synt hetic . main . fragment _ tutorial . view Pager Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠTutorial Fragment Ġ: ĠBase Fragment < Tutorial ViewModel >() Ġ{ ĊĊĠĠĠ Ġ@ Inject Ġlateinit Ġvar Ġdebounce Click Handler : ĠDe bounce Click Handler ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġprogress Dialog : ĠS ora Progress Dialog ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ tutorial , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinject () Ġ{ ĊĠĠĠĠĠĠĠ ĠFeature Utils . get Feature < On boarding Feature Component >( context !! , ĠOn boarding Feature Api :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. tutorial Component Builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Fragment ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. with Router ( activity Ġas ĠOn boarding Router ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. inject ( this ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinit Views () Ġ{ ĊĠĠĠĠĠĠĠ Ġview Pager . adapter Ġ= ĠSlider Adapter () ĊĠĠĠĠĠĠĠ Ġindicator . setup With ViewPager ( view Pager , Ġtrue ) ĊĊĠĠĠĠĠĠĠ Ġval Ġterms Content Ġ= ĠSp ann able String ( getString ( R . string . tutorial _ terms _ and _ conditions _ 2 )) ĊĠĠĠĠĠĠĠ Ġterms Content . set Span ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠS ora Clickable Span Ġ{ ĠviewModel . show Terms Screen () Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠĠ 0 , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġterms Content . length , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSp ann able . SPAN _ EXCL USIVE _ EXCL USIVE ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġprivacy Content Ġ= ĠSp ann able String ( getString ( R . string . tutorial _ privacy _ policy )) ĊĠĠĠĠĠĠĠ Ġprivacy Content . set Span ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠS ora Clickable Span Ġ{ ĠviewModel . show Privacy Screen () Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠĠ 0 , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġprivacy Content . length , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSp ann able . SPAN _ EXCL USIVE _ EXCL USIVE ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġbottom Text Ġ= ĠgetString ( R . string . tutorial _ terms _ and _ conditions _ 1 ) Ġ+ Ġ" Ġ" ĊĠĠĠĠĠĠĠ Ġtutorial Terms . text Ġ= Ġbottom Text ĊĠĠĠĠĠĠĠ Ġtutorial Terms . append ( terms Content ) ĊĠĠĠĠĠĠĠ Ġtutorial Terms . append (" Ġ" Ġ+ ĠgetString ( R . string . common _ and ) Ġ+ Ġ" Ġ") ĊĠĠĠĠĠĠĠ Ġtutorial Terms . append ( privacy Content ) ĊĠĠĠĠĠĠĠ Ġtutorial Terms . movement Method Ġ= ĠLink Movement Method . getInstance () ĊĠĠĠĠĠĠĠ Ġtutorial Terms . highlight Color Ġ= ĠColor . TRANSP ARENT ĊĊĠĠĠĠĠĠĠ Ġprogress Dialog Ġ= ĠS ora Progress Dialog ( activity !! ) ĊĊĠĠĠĠĠĠĠ Ġtutorial SignUp Button . setOnClickListener ( De bounce ClickListener ( de bounce Click Handler ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel . on SignUp Clicked () ĊĠĠĠĠĠĠĠ Ġ}) ĊĊĠĠĠĠĠĠĠ Ġtutorial Restore TextView . setOnClickListener ( De bounce ClickListener ( de bounce Click Handler ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel . on Recovery Clicked () ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġsubscribe ( viewModel : ĠTutorial ViewModel ) Ġ{ ĊĠĠĠĠĠĠĠ Ġobserve ( viewModel . get Progress Visibility (), ĠObserver Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( it ) Ġprogress Dialog . show () Ġelse Ġprogress Dialog . dismiss () ĊĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠ Ġ} Ċ }