o.semen
03/30/2018, 1:05 PMtoolbarLayout
is toolbar I’m looking for but it is a View
as included might be any view… but how can I get it as Toolbar
without casting ?leosan
03/30/2018, 1:13 PMsetSupportActionBar(toolbarWidget)
but your layout is not a android.support.v7.widget.Toolbar
is that correct?o.semen
03/30/2018, 1:23 PMandroid.support.v7.widget.Toolbar
but it is in separate layout xml file and than included in main layout file.
<include>
tag and Toolbar
has different ids. I can get my Toolbar by id of <include>
tag but it is available as a View
. So I’m looking for a way to get my Toolbar
, probably by it’s id (specified in separate layout file)leosan
03/30/2018, 1:28 PMleosan
03/30/2018, 1:29 PMleosan
03/30/2018, 1:29 PMimport kotlinx.android.synthetic.main.activity_home.*
import kotlinx.android.synthetic.main.content_home.*
import kotlinx.android.synthetic.main.toolbar.*
leosan
03/30/2018, 1:30 PMtoolbar.view.*
leosan
03/30/2018, 1:30 PMtoolbar.*