package Ġmo e . pine . emoji . activity Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . support . v 7 . app . AppCompatActivity Ċ import Ġandroid . view . MenuItem Ċ import Ġkotlinx . android . synt hetic . main . activity _ setting .* Ċ import Ġmo e . pine . emoji . R Ċ import Ġmo e . pine . emoji . adapter . setting . Setting Fragment Pager Adapter Ċ import Ġmo e . pine . emoji . components . common . ActionBar Back Button Component Ċ import Ġmo e . pine . emoji . components . common . Support ActionBar Component Ċ Ċ /** Ċ Ġ* ĠActivity Ġfor ĠSetting Ċ Ġ* ĠCreated Ġby Ġp ine Ġon ĠApr Ġ 2 1 , Ġ 2 0 1 7 . Ċ Ġ*/ Ċ class ĠSetting Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġval ĠIS _ FOCUS _ KEY Ġ= Ġ" is Focus " ĊĊĠĠĠĠĠĠĠ Ġfun Ġcreate Intent ( context : ĠContext , Ġfocus : ĠBoolean Ġ= Ġfalse ): ĠIntent Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠIntent ( context , ĠSetting Activity :: class . java ). also Ġ{ Ġintent Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġintent . putExtra ( IS _ FOCUS _ KEY , Ġfocus ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġaction Bar Ġby Ġlazy Ġ{ ĠSupport ActionBar Component ( this ) Ġ} ĊĠĠĠ Ġprivate Ġval Ġback Button Ġby Ġlazy Ġ{ ĠAction Bar Back Button Component ( this ) Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġthis . set ContentView ( R . layout . activity _ setting ) ĊĠĠĠĠĠĠĠ Ġthis . action Bar . onCreate () ĊĊĠĠĠĠĠĠĠ Ġval Ġis Focus Ġ= Ġthis . intent . extras . getBoolean ( IS _ FOCUS _ KEY , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠSetting Fragment Pager Adapter ( this . support FragmentManager , Ġthis , Ġis Focus ) ĊĠĠĠĠĠĠĠ Ġthis . view _ pager . adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġthis . view _ pager . off screen Page Limit Ġ= Ġ 2 ĊĠĠĠĠĠĠĠ Ġthis . tab _ layout . setup With ViewPager ( this . view _ pager ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Options ItemSelected ( item : ĠMenuItem ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġthis . back Button . on Options ItemSelected ( item ) Ġor Ġsuper . on Options ItemSelected ( item ) ĊĠĠĠ Ġ} Ċ }