如何在React Native Android中实现“教练标记”?

7

我需要在我的React Native应用程序中实现教练标记或展示。 在搜索后,我没有找到任何可以帮助的代码或库。

有人能建议我如何在React Native中实现教练标记吗?

示例:

enter image description here

我不想使用透明度覆盖屏幕截图类型的图像。因为当应用程序在横向模式下运行时,这会导致问题。而且对于这种方法,我需要将所有 DPI 图像保存在各自的文件夹中。

我需要一个适当且通用的解决方案。请帮忙。


嗨,你找到解决方案了吗?我在我的应用程序中也遇到了麻烦,我找不到任何真正有用的东西..谢谢 :) - user3521011
我认为这个链接可以帮助你!https://github.com/TranLuongTuanAnh/react-native-coachmasks - Tuan Anh
1个回答

7
这个问题有已经准备好的解决方案。
你可以尝试:React Native Joyride(npm install --save react-native-joyride)。
你可以在这里找到完整的可工作的解决方案: https://github.com/okgrow/react-native-co-pilot
代码就像这样简单:
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>
    );
  }
}

谢谢你,汤姆!我感觉自己像个傻瓜,没有早点发现这个问题,但迟做总比不做好! - Pat Needham

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接