'Google's MapView inside a ViewPager
How to properly add mapView inside a view pager. When adding mapView in a view pager i'm getting scrolling issue. When i tried to write a custom view that extends google's mapview i tried to override the onTouchEvent function. But that is not working. Please help me on this.
> class CustomMapView: MapView {
>
> constructor(context: Context) : super(context) {
> Log.d(">>>", "just init with the context")
> }
>
> override fun onTouchEvent(event: MotionEvent?): Boolean {
> // this function is not working
> Log.d(">>>", "onTouch event called")
> setOnClickListener { view ->
> Log.d(">>>", "onTouch listener called on mapview")
> }
> return super.onTouchEvent(event)
> } }
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
