add setupOptionsBtn
This commit is contained in:
parent
f047a655c8
commit
b14190c190
1 changed files with 7 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue