add setupOptionsBtn

This commit is contained in:
Chumva 2018-08-10 12:33:23 +03:00
parent f047a655c8
commit b14190c190

View file

@ -112,13 +112,11 @@ class MyLocationTabFragment : Fragment(), TelegramListener, ChatLiveMessagesList
}
optionsBtn = mainView.findViewById<ImageView>(R.id.options).apply {
setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_other_menu))
setOnClickListener { (activity as MainActivity).showOptionsPopupMenu(this) }
setupOptionsBtn(this)
}
mainView.findViewById<ImageView>(R.id.options_title).apply {
setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_other_menu))
setOnClickListener { (activity as MainActivity).showOptionsPopupMenu(this) }
setupOptionsBtn(this)
}
imageContainer = mainView.findViewById<FrameLayout>(R.id.image_container)
@ -317,6 +315,11 @@ class MyLocationTabFragment : Fragment(), TelegramListener, ChatLiveMessagesList
}
}
private fun setupOptionsBtn(imageView: ImageView) {
imageView.setImageDrawable(app.uiUtils.getThemedIcon(R.drawable.ic_action_other_menu))
imageView.setOnClickListener { (activity as MainActivity).showOptionsPopupMenu(imageView) }
}
private fun updateTitleTextColor() {
val color = if (appBarCollapsed) R.color.app_bar_title_light else R.color.ctrl_active_light
context?.also {