For Android GUI: I would like to create a window that I can pull up from the bottom of another window, kind of like the Notification bar or the tab in the bottom on Spotify for Android.
I want to be able to grab a small piece of the window and pull it up. Or just click it and it will "pop up". And afterwards be able to pull or click it so it returs to its original space.
Does anyone know a good way to do this?
Use SlidingDrawer
Related
I'm trying to make my app (which is some kind of toolbox) to be opened from any screen (home, other applications etc..) by swiping from the bottom. Something like the action-bar drop-down menu, but from the bottom.
I saw an app that managed to do similar thing - it was "Omni Swipe".
I tried a lot of creative ways with no success. any tips ?
Thanks,
Amit
If my memory doesn't betray me applications like "Omni Swipe" add their views as systems overlays. You can open up "Omnie Swipe" in the HirarchyView to see exactly what flags they use.
Also, check out the window manager for more information on you window flag priority works:
http://androidxref.com/5.1.1_r6/xref/frameworks/base/core/java/android/view/WindowManager.java#359
For sample code look at this stack overflow question:
Creating a system overlay window (always on top)
I am trying to modify HelloNotification sample code given in SonyEyeGlass SDK samples. As described in https://developer.sony.com/develop/wearables/smarteyeglass-sdk/guides/notifications/
we can add a menu to be shown in the notification view when the user drills down into the notification details(Action menu with 3 Action Toasts as shown in that link and example).
But in SmartEyeglass screen I want to add some description above this menu, as that area is empty. Is there any API that I can use for showing any text description in that empty area? (probably using Notification.SourceColumns) ?
Please help.
Thanks,
Manish
Unfortunately there is no way to draw above the menu. If you really need to draw on that area you would have to build a Control extension and use your own menu control on the bottom.
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.
Im looking for a way to create android window which will contain a button, the window should be small, but i want it to contain no parent activity.
So, if the launcher is opened and the app is launched, the back will be the launcher, and still usable.. (so transparent activity is not good)..
I saw dialog and popupWindow are options, can it be done with any of them? Any other API?
Thanks.
StandOut is a third-party library that lets you create floating windows and its fairly easy to create them. There are few examples on the GitHub page so you should check them out
I need to create a List view. However this list view is somewhat of a pull down menu. That is, I have to create a button on top of screen, where on clicking it, a list view will be displayed (pulled down) from top.
Can some one give me an idea about this? I mean, what is this component in Android and how do I go about it creating it?
I know the normal way of creating a list view but not this.
Hey thanks all for your replies i finally got want i wanted to implement.The following link helped me achieve it:
http://techdroid.kbeanie.com/2009/08/android-sliding-drawer-example.html
Typically you would use a Single Choice Dialog.
http://developer.android.com/guide/topics/ui/dialogs.html#AddingAList
If you want to do it Pull-down-from-top. You'll need to use Panel Custom view from this project.
If a pull-from-below will suffice, use a Sliding Drawer. (From Android 3.0, Sliding Drawer can be configured to be pulled down aswell. See Here)
Have the Listview inside the Drawer/Panel.