browniefed / map_animated_scrollview

83 stars 37 forks source link

example does not work on android #2

Open marcmo opened 6 years ago

marcmo commented 6 years ago

3 issues that I found on Android:

tested with react-native-maps 0.19.0 and 0.20.0

browniefed commented 6 years ago

Yep some of these are just due to react-native not supporting various features for scrollviews on Android. Would have to utilize another system for snapping on Android.

Markers is likely due to react-native-maps issues. Will take a look later about possibilities.

nitinsh99 commented 6 years ago

@browniefed Thanks for great post. I am also unable to make marker ring animation work on android? Would you or @marcmo know the root cause or work around this?

This is where I am : untitled

constemi commented 6 years ago

@nitinsh99 @marcmo I was able to get the ring back by moving 'position': absolute from styles.ring to styles.marker.

No behavior on animation though. The initial opacity on the focused marker can be seen by setting the native driver to false. However, this introduced another issue where it would remove border radius on the focused marker. No movement on the animation unfortunately even though the events are firing.

@browniefed any recommendation on applying the interpolation to something that would show up?

updated snack https://snack.expo.io/BktIbVazm

android_animate

rootober commented 6 years ago

Same issue @constemi listed above

MishraUdit commented 6 years ago

hey, @browniefed is there any alternative to animate the marker for the Android as it is working on the iOS device in your tutorial.

ZeroCool00 commented 4 years ago

Any success yet ?

azanbinzahid commented 4 years ago

I fixed the marker animation on android by moving position: 'absolute' from ring to marker in styles as suggested by @constemi . Additionally changed the scale outputRange to [1,2,1] and set height and width to 50 each in markerWrapper.

  markerWrap: {
    alignItems: 'center',
    justifyContent: 'center',
    height: 50,
    width: 50,
  },
  marker: {
    position: 'absolute', // <-- moved from ring
    width: 8,
    height: 8,
    borderRadius: 4,
    backgroundColor: 'rgba(130,4,150, 0.9)',
  },
  ring: {
    width: 24,
    height: 24,
    borderRadius: 12,
    backgroundColor: 'rgba(130,4,150, 0.3)',
    borderWidth: 1,
    borderColor: 'rgba(130,4,150, 0.5)',
  },