显示在第一次运行覆盖提示 [英] Display overlay tooltip on the first run

查看:188
本文介绍了显示在第一次运行覆盖提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在首次(或在一些重大更新)运行,一些谷歌应用程序或核Android系统本身有时会显示一个简短提示如何使用新功能的透明覆盖。一个例子可能是图像波纹管。

When run for the first time (or after some major update), some Google apps or the core Android system itself sometimes display a transparent overlay with a short tooltip how to use the new features. An example might be the image bellow.

有没有在Android框架API的一些用于创建这些或者是所有的定制?如何将一个实现它在后一种情况?而在去年,但并非最不重要,做这些提示有某种官方/技术名称由哪一个可以参考他们(谷歌搜索会有关问题的一些信息时非常有用)?谢谢你。

Is there some API in the Android framework for creating these or is it all custom made? How would one implement it in latter case? And last, but not least, do these tooltips have some kind of an official/technical name by which one can refer to them (might be useful when Googling for some info about the subject)? Thanks.

修改

我已经获得这说明更多的precisely我的意思的屏幕截图。除了手指的图形,这提示功能全天候应用程序的图标高亮圆。这不是一个简单的半透明的交叠而点击后消失:时钟图标可点击或在这一刻pssed甚至长期$ P $,但直到toolip消失其它图标(外循环)不可访问。是这一切的行为习惯专门为此做,或者做一些在建的工厂存在吗?

I've acquired a screenshot which illustrates more precisely what I mean. Apart from the "pointing hand" graphic, this tooltip features a highlighting circle around the icon of the Clock app. This is not simply a translucent overlay which disappears after click: The Clock icon can be clicked or even long-pressed at this moment, but other icons (outside the circle) are not accessible until the toolip disappears. Is all this behaviour custom made specifically for this purpose, or does some in-built facility exist?

推荐答案

这仅仅是一个半透明的对话框。

It is just a translucent Dialog.

插入的themes.xml以下code在res文件夹

insert the below code in themes.xml in res folder

 <style name="Theme.TranparentDialog" parent="@android:style/Theme.NoTitleBar">
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:colorForeground">@color/transparent</item>
        <item name="android:windowIsFloating">false</item>
        <item name="android:backgroundDimEnabled">false</item>
        <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
        <item name="android:windowBackground">@color/transparent</item>
    </style>

在创建屏幕上对话框,获得一个半透明的效果/

create the dialog over screen to get a translucent effect/

Dialog dialog= new Dialog(context,  R.style.Theme_TutorialDialog);

dialog.show();

dialog.show();

这篇关于显示在第一次运行覆盖提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆