小的弹出有关说明,像四方的人 [英] Small Popup for Instructions, like foursquare ones

查看:139
本文介绍了小的弹出有关说明,像四方的人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在看到新的foursquare应用程序的最后一个屏幕截图和他们的气球状的卡通指示,我想创造一些这些在我的应用程序。

After seeing the last screenshots of new foursquare application and their balloon like cartoon instructions, I'd like to create some of these in my application.

我发现iPhone类似的问题 小的弹出说明......如何?

I found a similar question for iPhone Small popup for instructions... How?

下面是Foursquare的应用程序,另一张截图:

Here is another screenshot of foursquare app:

我想知道我怎么能做到这一点与Android。

I'd like to know how I could achieve that with Android.

在此先感谢您的帮助。

更新:这是我能得到这么远,但增加了一些按键与一个自定义绘制背景,用的FrameLayout分层他们:

UPDATE: This is what I could get so far but adding some buttons with a custom drawn background and layering them with a FrameLayout:

但我仍然无法得到三角形的效果。也许有一些东西我可以用我的自定义背景的形状呢?

But I still couldn't get the triangle effect. Maybe there is something I can do with my custom background shape?

UPDATE2

检查你的建议后,我决定去与亚伦Ç的想法,并增加了图像,上面有一个箭头。这是我目前的结果是:

After checking your suggestions, I decided to go with Aaron C idea and added an image with an arrow on it. This is my current result:

感谢您Snailer,QuickAction API项目似乎很promissing。实现更多的功能在我的应用程序时,我会检查出来。

Thank you Snailer, QuickAction API project seems very much promissing. I'll check it out when implementing more features in my app.

现在,我只需要得到合适的颜色或者也许我可以让它这样。它看上去不错了。

Now, I just need to get the right color or maybe I could just let it this way. It seems nice too.

和,所以,总结一下我做的:

And, so, to summarize what I did:

  1. 在得到我最初的XML布局FrameView内。
  2. 由于我使用的是frameview,一切,我在这里放会越积越一个比其他。这就是我可以添加东西的布局。

  1. Got my initial xml layout inside a FrameView.
  2. As I'm using a frameview, everything I put in here will be piled one over the other. That's how I could add things to the layout.

在那的FrameLayout,我把2 relativelayouts蒙山与三角形和一个按钮来创建两个上弹出窗口的图像。在底部我只放一个按钮。

In that framelayout, I put 2 relativelayouts whith an image with the triangle and a button to create the two upper popups. In the bottom I put a button only.

就是这样。我希望它可以帮助别人。

That's it. I hope it helps somebody.

再次感谢您对您的帮助!

Thank you very much again for all your help!

推荐答案

这听起来像一个整洁的事情来实现。有可能是一个内置Android变化对 AlertDialog ,可实现这一点,但如果不是在这里是如何,我会去实现它:

That sounds like a neat thing to implement. There might be a built-in Android variation on AlertDialog that achieves this, but if not here is how I would go about implementing it:

创建一个新的活动,其背景为黑色具有非常高的(低?)阿尔法颜色值。这将允许你通过它看到在堆栈中的previous活动。然后,在任何坐标你喜欢用一个相对布局与填充值增加您的警报。

Create a new Activity whose background is black with a very high (low?) alpha color value. This will allow you to see through it to the previous Activity in the stack. Then, add your alert at whatever coordinates you like using a relative layout with padding values.

您可能还希望如果用户触摸气球(或者任何地方的屏幕),更增添一份监听器退出活动。

You might also want to add a touch listener that exits the Activity if the user touches the balloon (or maybe anywhere in the screen).

,你可以通过这个信息到使用活动的推出意图与 putExtra()方法,新的活动。

If you want to be fancy with coordinate placement of the balloon, you can pass this information into the new Activity using the Activity's launch Intent with the putExtra() methods.

这篇关于小的弹出有关说明,像四方的人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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