package Ġcom . example . picture oft hed ay . ui . coll ap sing _ toolbar Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . widget . TextView Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġcom . example . picture oft hed ay . R Ċ import Ġcom . example . picture oft hed ay . ui . picture . BOTTOM _ SHE ET _ CONTENT Ċ import Ġcom . example . picture oft hed ay . ui . picture . BOTTOM _ SHE ET _ HEADER Ċ import Ġcom . example . picture oft hed ay . ui . settings . SETTINGS _ SHARED _ PREFER ENCES Ċ import Ġcom . example . picture oft hed ay . ui . settings . THEME _ RES _ ID Ċ import Ġcom . google . android . material . app bar . Col lap sing Toolbar Layout Ċ import Ġcom . google . android . material . floating action button . Floating ActionButton Ċ import Ġcom . google . android . material . sn ackbar . Snackbar Ċ Ċ class ĠCol lap sing Toolbar Activity Ġ: ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ Ġset Theme ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget SharedPreferences ( SETTINGS _ SHARED _ PREFER ENCES , ĠMODE _ PRIVATE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. getInt ( THEME _ RES _ ID , ĠR . style . Default Theme ) ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( R . layout . coll ap sing _ toolbar _ activity ) ĊĠĠĠĠĠĠĠ Ġset Support ActionBar ( findViewById ( R . id . toolbar )) ĊĠĠĠĠĠĠĠ ĠfindViewById < Col lap sing Toolbar Layout >( R . id . toolbar _ layout ). title Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġintent . getString Extra ( BOTTOM _ SHE ET _ HEADER ) ĊĠĠĠĠĠĠĠ ĠfindViewById < TextView >( R . id . coll ap sing _ toolbar _ content _ text view ). text Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġintent . getString Extra ( BOTTOM _ SHE ET _ CONTENT ) ĊĠĠĠĠĠĠĠ ĠfindViewById < Floating ActionButton >( R . id . fab ). setOnClickListener Ġ{ Ġview Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSn ackbar . make ( view , Ġ" Replace Ġwith Ġyour Ġown Ġaction ", ĠSn ackbar . LENGTH _ LONG ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setAction (" Action ", Ġnull ). show () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }