From 26b65fe83114e19e30945a62f73af6aa5caaedae Mon Sep 17 00:00:00 2001 From: Daniil Borisovskii Date: Thu, 15 Aug 2019 12:05:12 +0300 Subject: [PATCH] Small naming refactoring --- .../tabbarnavigation/BaseNavigationActivity.kt | 4 ++-- .../tabbarnavigation/BaseNavigationFragment.kt | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationActivity.kt b/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationActivity.kt index 93022bf..3043a32 100644 --- a/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationActivity.kt +++ b/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationActivity.kt @@ -10,12 +10,12 @@ abstract class BaseNavigationActivity : TouchinActivity() { ViewControllerNavigation( this, supportFragmentManager, - getContainerViewId(), + getFragmentContainerViewId(), getTransition() ) } - abstract fun getContainerViewId(): Int + abstract fun getFragmentContainerViewId(): Int open fun getTransition() = FragmentTransaction.TRANSIT_NONE diff --git a/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationFragment.kt b/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationFragment.kt index 389605e..2bf4cab 100644 --- a/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationFragment.kt +++ b/tabbar-navigation/src/main/java/ru/touchin/roboswag/components/tabbarnavigation/BaseNavigationFragment.kt @@ -16,11 +16,11 @@ abstract class BaseNavigationFragment : Fragment() { private val backPressedListener = OnBackPressedListener { bottomNavigationController.onBackPressed() } - abstract fun getRootViewLayoutId(): Int + abstract fun getRootLayoutId(): Int - abstract fun getNavigationContainerId(): Int + abstract fun getNavigationContainerViewId(): Int - abstract fun getContentContainerId(): Int + abstract fun getContentContainerViewId(): Int abstract fun getContentContainerLayoutId(): Int @@ -38,7 +38,7 @@ abstract class BaseNavigationFragment : Fragment() { context = requireContext(), fragmentManager = childFragmentManager, viewControllers = getNavigationViewControllers(), - contentContainerViewId = getContentContainerId(), + contentContainerViewId = getContentContainerViewId(), contentContainerLayoutId = getContentContainerLayoutId(), topLevelViewControllerId = getTopLevelViewControllerId(), wrapWithNavigationContainer = wrapWithNavigationContainer(), @@ -50,9 +50,9 @@ abstract class BaseNavigationFragment : Fragment() { } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - val fragmentView = inflater.inflate(getRootViewLayoutId(), container, false) + val fragmentView = inflater.inflate(getRootLayoutId(), container, false) - bottomNavigationController.attach(fragmentView.findViewById(getNavigationContainerId())) + bottomNavigationController.attach(fragmentView.findViewById(getNavigationContainerViewId())) (activity as BaseNavigationActivity).addOnBackPressedListener(backPressedListener)