This screen was captured from Gmail app for android. The popup looks pretty cool with images and all. Any ideas on how this was made?
This is done with a custom dialog, it is actually quite easy to achieve. Just create a layout for a normal Activity and pass it to the Dialog builder.
For more information, check http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog out
Related
I am trying to make similar layout to this one.
I achieved everything except that pop up window (saying "Perfect"). How to make this? Will pop up windows? Dialog or somehow else?
The screenshoted layout look like a WebView to me. Thus you could try to take all advantage of the WebView to create any html-based layout.
The pop-up could also be a custom dialog, or just a div on top the main layout or whatever. For example, check this.
There are 2 ways you can approach this.
If you want a view above another one you can use FramLayout. Tutorial here.
If you want it to be a dialog you can follow this tutorial Tutorial here
I'm developing an app that includes reviews of items and due to my design, I want to only show all the reviews in a popup window like in Google Play Store:
What should I use to create that white panel that appears over the current window and contains the necessary information? This should be simple but I'm a newbie and I can't seem to figure out what this "widget" is. Please help me if you are familiar with this so I can use this cool design pattern. Thanks.
It seems you want to display a layout as a popup in another activity.
If you want to do this using an Activity instead of a Dialog, you can do this by setting the activity's theme to android:theme="#android:style/Theme.Dialog" in the manifest - this will make the activity appear like a dialog (floating on top of whatever was underneath it).
A better way to do it would be using a DialogFragment. You can display information in the form of a popup and it will have its own lifecycle. That will be much better than displaying an activity like a dialog
Ram kiran's answer is a good one and one which I like to give also. But just so you have another option to look at you can consider PopupWindow
As stated in the docs, it is
A popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity.
I've used this and it works out nicely in some situations. It really depends on what your exact needs are as to which will work best for you.
I am new in android and I have a view which is in the attach image. I have to open this view after clicking on list item, but I am not finding any proper way to solve this please suggest me how can i open a dialog like in Image.
Check PopupWindow control in android developers, does exactly what you want. There are numerous tutorials on the web on how to customize, animate, have functionality etc. It has an onCreate method and in simple words it works just like an Activity with specific bounds. It can be attached and shown anywhere and anytime. It's actually quite useful. When you don't want to use dialogs this is the best option.
I am a little confused about the best way to show pause screen on my android game. will it be better to be a pauseMenuActivity or is it enough with just pauseDialog? this pause dialog will just show score, money, back button, option button , and quit button. if it is better to show dialog, I don't know how to show those buttons and background image.. anyone can help me? thank you
I would recommend going for a Dialog (or some other custom overlay). From my experience, inter-Activities transitions aren't always very quick and they can feel kind of sluggish in the context of a game. In my opinion, when I am on a pause screen and want to start playing again, it should be instantaneous.
Plus, an Activity is kind of overkill if you just want to show 4 buttons.
To create a custom dialog containing a custom layout, have a look at the following tutorial and post again if you have specific questions/problems :
http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog
An Activity in general is better than a dialog, because u can take care of all things like orientation, theme etc. and it provides more flexibility. Though in simple cases u can use a dialog.
I am trying to create a small pop-up in my Android application to let the user choose from one of many items, ala a ListView. I am hoping to make it show up as a translucent box that overlays on the screen, as opposed to completely occupying it like Activities usually do.
One technique for doing this that I've heard is possible is to launch an Activity in an AlertDialog box. This would be perfect - it's the ideal size and has a lot of the mechanical properties I'm looking for, but I'm totally unable to find any more specifics of this technique.
Is this possible? And if not, what is the preferred way of accomplishing something like this?
This should answer your question: http://developer.android.com/guide/topics/ui/themes.html
Quote: For example, you can use the Dialog theme to make your Activity appear like a dialog box. In the manifest, reference an Android theme like so:
<activity android:theme="#android:style/Theme.Dialog">
Maybe you could just display AlertDialog http://developer.android.com/guide/topics/ui/dialogs.html