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,11 +111,12 @@ class MyLocationTabFragment : Fragment(), TelegramListener, ChatLiveMessagesList
setImageResource(R.drawable.img_my_location_user) setImageResource(R.drawable.img_my_location_user)
} }
optionsBtn = mainView.findViewById<ImageView>(R.id.options) with(activity as MainActivity) {
(activity as MainActivity).setupOptionsBtn(optionsBtn) optionsBtn = mainView.findViewById<ImageView>(R.id.options)
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 {
AndroidUtils.addStatusBarPadding19v(context, this) AndroidUtils.addStatusBarPadding19v(context, this)