package Ġdev . spi keys an ju . expense tracker . view . settings ĊĊ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . lifecycle . lifecycle Scope Ċ import Ġdagger . h ilt . android . Android EntryPoint Ċ import Ġdev . spi keys an ju . expense tracker . databinding . Fragment Settings Binding Ċ import Ġdev . spi keys an ju . expense tracker . view . base . Base Fragment Ċ import Ġkotlinx . coroutines . flow . first Ċ Ċ @ Android EntryPoint Ċ class ĠSettings Fragment Ġ: ĠBase Fragment < Fragment Settings Binding , ĠSettings ViewModel >() Ġ{ ĊĠĠĠ Ġoverride Ġval ĠviewModel : ĠSettings ViewModel Ġby Ġview Models () ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠSet Ġthe Ġitem Ġstate ĊĠĠĠĠĠĠĠ Ġlifecycle Scope . launch When Started Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . bio metric . isChecked Ġ= ĠviewModel . bio Metric Preference . first () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġinit Views () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġinit Views () Ġ= Ġwith ( binding ) Ġ{ ĊĠĠĠĠĠĠĠ Ġbio metric . setOn Checked ChangeListener Ġ{ Ġ_, Ġbio metric Enabled Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel . set Bio Metric Lock ( bio metric Enabled ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget View Binding ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?) Ġ= ĊĠĠĠĠĠĠĠ ĠFragment Settings Binding . inflate ( in flater , Ġcontainer , Ġfalse ) Ċ } Ċ