Advertisement
AnatolyZadvernyak

Untitled

Dec 13th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
  2.  
  3. (activity as? AppCompatActivity)?.setSupportActionBar(toolbar)
  4.  
  5.  
  6. arguments?.getLong(ARG_REGION)?.let { idRegion ->
  7. viewModel.getQueryIdRegion(idRegion)
  8. }
  9.  
  10. viewModel.nameSearchRegion.observe(this, Observer { region ->
  11. (activity as AppCompatActivity).supportActionBar?.apply {
  12. title = region.nameRegion
  13. //setDisplayHomeAsUpEnabled(true)
  14. //setDisplayShowHomeEnabled(true)
  15. viewModel.clearSearch()
  16. }
  17. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement