Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Need override the onCreateView in MapFragment #10

Closed
akexorcist opened this issue Aug 22, 2021 · 0 comments
Closed

[Request] Need override the onCreateView in MapFragment #10

akexorcist opened this issue Aug 22, 2021 · 0 comments

Comments

@akexorcist
Copy link

onCreateView method in this library is final to prevent the method overriding in subclass

But in my use case, I have a reason to override this method. I have another wrapper view to handle the user gesture on the map by itself.

For example

class CustomMapFragment: MapFragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?, 
        savedInstanceState: Bundle?
    ) {
        val mapView = inflater.inflate(MapsPlatform.get().getFragmentLayoutId(), container, false)
        val wrapperView = WrapperView(requireContext())
        wrapperView.addView(mapView)
        return wrapperView
    }
}

Can you remove final in onCreateView method or is there any solution?

@akexorcist akexorcist changed the title Need override the onCreateView in MapFragment [Request] Need override the onCreateView in MapFragment Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant