package Ġcom . my ether wallet . me w connect . feature . register . fragment Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . View Ċ import Ġandroid . view . View . VISIBLE Ċ import Ġcom . my ether wallet . me w connect . R Ċ import Ġcom . my ether wallet . me w connect . core . di . Application Component Ċ import Ġcom . my ether wallet . me w connect . core . ext enst ion . getString Ċ import Ġcom . my ether wallet . me w connect . core . ext enst ion . viewModel Ċ import Ġcom . my ether wallet . me w connect . core . ui . fragment . Base ViewModel Fragment Ċ import Ġcom . my ether wallet . me w connect . core . utils . Display Size Helper Ċ import Ġcom . my ether wallet . me w connect . feature . main . fragment . Wallet Fragment Ċ import Ġcom . my ether wallet . me w connect . feature . register . view model . Generating ViewModel Ċ import Ġkotlinx . android . synt hetic . main . fragment _ generating .* Ċ Ċ private Ġconst Ġval ĠEX TRA _ PASSWORD Ġ= Ġ" password " Ċ private Ġconst Ġval ĠEX TRA _ M NE MON IC Ġ= Ġ" mn emonic " Ċ Ċ class ĠGenerating Fragment Ġ: ĠBase ViewModel Fragment () Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġnew Instance ( password : ĠString , Ġmnemonic : ĠString ?): ĠGenerating Fragment Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġfragment Ġ= ĠGenerating Fragment () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġarguments Ġ= ĠBundle () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġarguments . putString ( EXTRA _ PASSWORD , Ġpassword ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmnemonic ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġarguments . putString ( EXTRA _ M NE MON IC , Ġmnemonic ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfragment . arguments Ġ= Ġarguments ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġfragment ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar ĠviewModel : ĠGenerating ViewModel ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġstrings Ġ= Ġresources . getString Array ( R . array . generating _ animation _ strings ) ĊĠĠĠĠĠĠĠ Ġgenerating _ content . listener Ġ= Ġ{ Ġif Ġ( generating _ start _ using Ġ!= Ġnull ) Ġgenerating _ start _ using . visibility Ġ= ĠVIS IBLE Ġ} ĊĠĠĠĠĠĠĠ Ġgenerating _ content . add Strings ( strings ) ĊĠĠĠĠĠĠĠ Ġgenerating _ start _ using . setOnClickListener Ġ{ Ġreplace Fragment ( Wallet Fragment . newInstance ()) Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel Ġ= ĠviewModel ( viewModel Factory ) ĊĠĠĠĠĠĠĠ ĠviewModel . create Wallet s ( getString ( EXTRA _ PASSWORD ) !! , ĠgetString ( EXTRA _ M NE MON IC ), ĠDisplay Size Helper . width ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġlayout Id () Ġ= ĠR . layout . fragment _ generating ĊĊĠĠĠ Ġoverride Ġfun Ġinject ( app Component : ĠApplication Component ) Ġ{ ĊĠĠĠĠĠĠĠ Ġapp Component . inject ( this ) ĊĠĠĠ Ġ} Ċ } Ċ