How to create a floating help layout?

早过忘川 提交于 2019-12-24 00:46:22

问题


I've got a {N} page and conditionally I'd like to create a floating bubble text label pointing to certain features on the page. e.g. "Press START button to blah".

Any help on how this could be done.

Preferably w/o modifying the xml page files.


回答1:


I released a plugin that can do what you are requesting simply install it tns plugin add nativescript-tooltip then you can use it as follows

TypeScript

import * as frame from "ui/frame";
import {ToolTip} from "nativescript-tooltip";
new ToolTip(frame.topmost().getViewById("someView"),{text:"Some Text"});

JavaScript

const frame = require("ui/frame");
const ToolTip = require("nativescript-tooltip").ToolTip;
new ToolTip(frame.topmost().getViewById("someView"),{text:"Some Text"});

Plugin Repo



来源:https://stackoverflow.com/questions/41745381/how-to-create-a-floating-help-layout

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