prscX / react-native-app-tour

React Native: Native App Tour Library
Apache License 2.0
640 stars 119 forks source link

transparentTarget not working #47

Closed witalobenicio closed 6 years ago

witalobenicio commented 6 years ago

I'm using transparentTarget to show my view above the circle and isn't working.

witalobenicio commented 6 years ago

@prscX I've tested now in iOS and works just like expected, but in Android version isn't working.

iOS:

captura de tela 2018-09-26 as 10 26 51

Android: screenshot_20180926-102745

witalobenicio commented 6 years ago

@prscX I don't know if it helps but when I've used in a native android app, the version of lib that I used was 1.6.0

witalobenicio commented 6 years ago

@prscX any updates?

prscX commented 6 years ago

Thanks @witalobenicio for raising the issue.

Have you specified transparentTarget = false? Unlike iOS it is not supported on Android. By default transparentTarget on Android is true. On Android, it will show background content with transparent circle.

Please let me know incase it still does not works.

Thanks </ Pranav >

witalobenicio commented 6 years ago

@prscX Yes...if specified transparentTarget = false on Android. I've seen that the default value on Android is true, and I've set to false. The problem is that the view is been draw below the target view (as shown in the screenshot). I used the android lib before in a native project, and works like expected (view above targetview).

prscX commented 6 years ago

@witalobenicio: Previous I also wanted to achieve the same iOS behavior on Android, but I was not able to achieve the same. I thought it was not supported by native library. Since you have specified that it works, I will give it a another try.

Will keep you posted.

Thanks </ Pranav >

witalobenicio commented 6 years ago

@prscX Thank's man. I know in native library works (you can see an example of this working at: https://play.google.com/store/apps/details?id=br.com.isilist.android).

I hope we can use the same feature with your lib. 😄

witalobenicio commented 6 years ago

Hi @prscX any updates?

prscX commented 6 years ago

Hi @witalobenicio: I have done a detailed analysis and figured out the root cause of the issues.

Basically KeepSafe/TapTargetView provides multiple API in order to show a tour on a specific target.

We are using TapTarget.forBounds API in order to render Tour view for a specific view. Since the views from created and rendered by React, we can't use TapTarget.forView API, we have to use TapTarget.forBounds API only.

This can't be fixed in the library as of now. I would recommend to use transparent target only.

Thanks </ Pranav >

witalobenicio commented 6 years ago

@prscX Thanks for the explanation. I'll try to use with transparent target...for my purpose I don't think it will fit, but I'll give a try. I'll try to dig up the native lib and try to find an alternative too. If I can found it I'll let you know.

witalobenicio commented 6 years ago

@prscX this PR #49 will enable transparentTarget = false and fix possible crashes due to views that are not rendered anymore after added to apptourtargets.

danieljgp2 commented 5 years ago

@witalobenicio im having some problems on android as you can see here https://github.com/prscX/react-native-app-tour/issues/78

it seems to be related with your issue, how can i access to your fork to test it on my app ?