开发者

Display dialogue from AppWidgetProvider

开发者 https://www.devze.com 2023-03-06 09:01 出处:网络
Let\'s say I have a basic widget with a button. When i click on this button I would like to display a input dialogue window, still on top of the home screen, where upon entering some value and clickin

Let's say I have a basic widget with a button. When i click on this button I would like to display a input dialogue window, still on top of the home screen, where upon entering some value and clicking submit I will see the home screen again.

What I do now is to start an activity with a dialo开发者_StackOverflow社区gue which is placed on top of the main activity in my application. Perhaps there is just a simple flag to hide the main activity?

Thankful for any help.


To answer my question, this is what needed to be put in the manifest for my dialog activity.

<activity android:name=".InputDialog" 
    android:launchMode="singleInstance"
    android:theme="@android:style/Theme.Dialog"
    android:excludeFromRecents="true">
</activity>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号