How to implement Coach mark in react native android? [closed]

流过昼夜 提交于 2020-12-29 06:27:37

问题


Its required to implement Coach mark or showcase in my React native app. After googling i didn't get any code or library which can get help that.

Can any one suggest me How can i achieve Coach mark in react native?

Example:

I dont want to overlay screen shot type image with transparency. Because it would be create problem when app run in landscape mode. And for this approach i need to keep All DPI images in respective folders.

I need proper and generic solution. Please help.


回答1:


There is a ready solution for this.

You can try the: React Native Joyride(npm install --save react-native-joyride)

You can find a full working solution here: https://github.com/okgrow/react-native-co-pilot

is as simple as this code:

import { joyride, joyridable, JoyrideStep } from 'react-native-joyride';

const JoyrideText = joyridable(Text);

class HomeScreen {
  render() {
    return (
      <View>
        <JoyrideStep text="This is a hello world example!" order={1} name="hello">
          <JoyrideText>Hello world!</JoyrideText>
        </JoyrideStep>
      </View>
    );
  }
}


来源:https://stackoverflow.com/questions/41548056/how-to-implement-coach-mark-in-react-native-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!