Fix FAB not showing up when navigation backwards

This commit is contained in:
Davide Depau 2018-08-30 19:41:12 +02:00
parent 6a25f7aade
commit 7871128c60

View file

@ -78,7 +78,7 @@ class ImageLocationFragment : WizardFragment() {
else -> null else -> null
}*/ }*/
fab?.show() activity?.fab?.show()
pick_file_btn?.isEnabled = StateKeeper.imageLocation == ImageLocation.LOCAL pick_file_btn?.isEnabled = StateKeeper.imageLocation == ImageLocation.LOCAL
// img_url_textview?.isEnabled = StateKeeper.imageLocation == ImageLocation.REMOTE // img_url_textview?.isEnabled = StateKeeper.imageLocation == ImageLocation.REMOTE
@ -113,6 +113,8 @@ class ImageLocationFragment : WizardFragment() {
chooser.setOnSelectListener { chooser.setOnSelectListener {
StateKeeper.imageFile = Uri.fromFile(File(it)) StateKeeper.imageFile = Uri.fromFile(File(it))
loadImageChanges(activity as WizardActivity) loadImageChanges(activity as WizardActivity)
activity?.fab?.show()
} }
} }
} }
@ -205,9 +207,9 @@ class ImageLocationFragment : WizardFragment() {
} }
override fun onFragmentAdded(activity: WizardActivity) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onFragmentAdded(activity) super.onViewCreated(view, savedInstanceState)
// setStreamingCheckBoxAvailability(activity) activity?.fab?.show()
} }
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
@ -269,6 +271,8 @@ class ImageLocationFragment : WizardFragment() {
Log.d(TAG, "Uri: " + uri!!.toString()) Log.d(TAG, "Uri: " + uri!!.toString())
StateKeeper.imageFile = uri StateKeeper.imageFile = uri
loadImageChanges(activity as WizardActivity) loadImageChanges(activity as WizardActivity)
activity?.fab?.show()
} }
} }
} }