package Ġcom . ok bre at he . qu asar . ui . settings Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . preference . Preference Fragment Ċ import Ġandroid . view . MenuItem Ċ import Ġcom . ok bre at he . qu asar . R Ċ import Ġcom . ok bre at he . qu asar . ui . settings . Settings Activity . Companion . bind Preference Summary To Value Ċ Ċ class ĠAp pearance Preference Fragment Ġ: ĠPreference Fragment () Ġ{ ĊĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠ Ġadd Preferences From Resource ( R . xml . pref _ appearance ) ĊĠĠĠ Ġset Has Options Menu ( true ) ĊĠĠĠ Ġbind Preference Summary To Value ( find Preference (" ui ")) ĊĠĠĠ Ġbind Preference Summary To Value ( find Preference (" theme ")) ĊĠĠĠ Ġbind Preference Summary To Value ( find Preference (" editor _ font _ size ")) ĊĠĠĠ Ġbind Preference Summary To Value ( find Preference (" preview _ font _ size ")) ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Options ItemSelected ( item : ĠMenuItem ): ĠBoolean Ġ{ ĊĠĠĠ Ġif Ġ( item . itemId Ġ== Ġandroid . R . id . home ) Ġ{ ĊĠĠĠĠĠ ĠstartActivity ( Intent ( activity , ĠSettings Activity :: class . java )) ĊĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġsuper . on Options ItemSelected ( item ) ĊĠ Ġ} Ċ } ĊĊ