Small naming refactoring

This commit is contained in:
Daniil Borisovskii 2019-08-15 12:05:12 +03:00
parent bf604d87ef
commit 26b65fe831
2 changed files with 8 additions and 8 deletions

View File

@ -10,12 +10,12 @@ abstract class BaseNavigationActivity : TouchinActivity() {
ViewControllerNavigation<BaseNavigationActivity>(
this,
supportFragmentManager,
getContainerViewId(),
getFragmentContainerViewId(),
getTransition()
)
}
abstract fun getContainerViewId(): Int
abstract fun getFragmentContainerViewId(): Int
open fun getTransition() = FragmentTransaction.TRANSIT_NONE

View File

@ -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)