refactor options button setup

This commit is contained in:
Chumva 2018-08-10 13:10:57 +03:00
parent 79fe8ae039
commit 4cd1a344ba

View file

@ -111,10 +111,11 @@ class MyLocationTabFragment : Fragment(), TelegramListener, ChatLiveMessagesList
setImageResource(R.drawable.img_my_location_user) setImageResource(R.drawable.img_my_location_user)
} }
with(activity as MainActivity) {
optionsBtn = mainView.findViewById<ImageView>(R.id.options) optionsBtn = mainView.findViewById<ImageView>(R.id.options)
(activity as MainActivity).setupOptionsBtn(optionsBtn) activity.setupOptionsBtn(optionsBtn)
activity.setupOptionsBtn(mainView.findViewById<ImageView>(R.id.options_title)) activity.setupOptionsBtn(mainView.findViewById<ImageView>(R.id.options_title))
}
imageContainer = mainView.findViewById<FrameLayout>(R.id.image_container) imageContainer = mainView.findViewById<FrameLayout>(R.id.image_container)
titleContainer = mainView.findViewById<LinearLayout>(R.id.title_container).apply { titleContainer = mainView.findViewById<LinearLayout>(R.id.title_container).apply {