package Ġcom . car w ash . car w ash business . util . ext Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . support . annotation . String Res Ċ import Ġandroid . support . v 4 . app . Fragment Ċ import Ġandroid . support . v 7 . app . AppCompatActivity Ċ import Ġandroid . support . v 7 . widget . Toolbar Ċ import Ġandroid . view . input method . Input Method Manager Ċ import Ġcom . arch ie code . navigation demo . R ĊĊ Ċ fun ĠFragment . hide Soft keyboard () Ġ{ ĊĠĠĠ Ġval Ġview Ġ= Ġactivity ?. current Focus ĊĠĠĠ Ġif Ġ( view Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġimm Ġ= Ġactivity ?. getSystem Service ( Context . INPUT _ METHOD _ SERVICE ) Ġas ĠInput Method Manager ĊĠĠĠĠĠĠĠ Ġimm . hide Soft Input From Window ( view . window Token , Ġ 0 ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun ĠFragment . setup Toolbar ( toolbar : ĠToolbar , Ġ@ String Res Ġtitle : Int ) Ġ{ ĊĠĠĠ Ġtoolbar . set Navigation Icon ( R . drawable . ic _ keyboard _ back space _ white ) ĊĠĠĠ Ġ( activity Ġas ĠAppCompatActivity ). set Support ActionBar ( toolbar ) ĊĠĠĠ Ġ( activity Ġas ĠAppCompatActivity ). support ActionBar ?. title Ġ= ĠgetString ( title ) ĊĠĠĠ Ġ( activity Ġas ĠAppCompatActivity ). support ActionBar ?. set Display Home As Up Enabled ( true ) ĊĠĠĠ Ġtoolbar . set Navigation OnClickListener Ġ{ Ġ( activity Ġas ĠAppCompatActivity ). on Back Pressed () Ġ} Ċ } Ċ Ċ fun ĠFragment . setup Toolbar ( toolbar : ĠToolbar , Ġtitle : CharSequence ) Ġ{ ĊĠĠĠ Ġtoolbar . set Navigation Icon ( R . drawable . ic _ keyboard _ back space _ white ) ĊĠĠĠ Ġ( activity Ġas ĠAppCompatActivity ). set Support ActionBar ( toolbar ) ĊĠĠĠ Ġ( activity Ġas ĠAppCompatActivity ). support ActionBar ?. title Ġ= Ġtitle ĊĠĠĠ Ġ( activity Ġas ĠAppCompatActivity ). support ActionBar ?. set Display Home As Up Enabled ( true ) ĊĠĠĠ Ġtoolbar . set Navigation OnClickListener Ġ{ Ġ( activity Ġas ĠAppCompatActivity ). on Back Pressed () Ġ} Ċ } Ċ