他们怎么做到的?在对话框的主屏幕 [英] How do they do it? Dialogs over home screen

查看:91
本文介绍了他们怎么做到的?在对话框的主屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个Android应用程序,我想放置一个对话框或视图在主屏幕,以便用户可以在不跳进我的全部应用程序中输入文本。我似乎无法得到这个工作。如果我present一个对话框(即使是在一个透明的活动),我的应用程序启动。

I'm writing an Android application and I would like to place a dialog or view over the home screen so that a user can enter text without jumping into my full application. I can't seem to get this to work. If I present a dialog (even in a transparent activity), my application launches.

如果你不知道我在说什么,看看Facebook的部件。我想复制一个类似的行为上的点击什么是您的想法?框。

If you don't know what I'm talking about, take a look at the Facebook widget. I want to replicate a similar behavior to the clicking on the "What's on your mind?" box.

感谢提前任何帮助!

-Brian

推荐答案

我的问题是,应用程序总是启动到显示该对话框。

My problem was that the application always launched to display the dialog.

要解决这个问题,我在清单设置活动劳克模式 singleInstance 。现在,它显示在主屏幕上的对话框!

To solve this, I set the activity lauch mode to singleInstance in the manifest. Now it shows the dialog over the home screen!

这篇关于他们怎么做到的?在对话框的主屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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