Is there a way to create something likea draggable menu in wearable device in Android? - android-layout

I was wondering if it is possible to create something like a menu that I can drag either by the side or from above on a wearable device. But I don't want it to affect the activity I have. You know like on a smart phone and you drag down the menu with some settings like brightness, rotation, etc...
To elaborate, I have a timer with a progress bar, but my activity would be overcrowded if I added any other stuff. So I want something to drag from the top of the screen to check on something, then drag again to return to my view that has the timer and progress bar. I basically have an activity where I make some selections, I wanted my selections to appear in that draggable menu thing to check to see my selections displayed there.

There are two drawer components for the type of behavior that you describe. Which one is better depends on the specifics of your implementation. The documentation for Navigation Drawer and Action Drawer can be found here.

Related

Android Admob Banner and Menu Settings

So I am integrating AdMob banners in an android application. The Banner is situated at the bottom of view, working fine, not overlapping with the list view when scrolling and it's all good. I think that bottom position is a very good place to put the banner, but when clicking on the menu button, the menu does cover the banner. I guess this normal behavior but want to make sure it does not break the admob policies, specifically:
Ads should not be placed very close to or underneath buttons or any other object which users may accidentally click while interacting with your application.
Does anybody have a similar situation?
Thanks,
I think until you dont have it very close to the menu it would be fine.
All you need to make sure is that it should not interfere with user inputs and produce incorrect clicks.
Its usually on a more case to case basis.

How to skin MFC main menu

I got a menu in an existing MFC application that has a standard MFC main menu.
But I would like to change its background colour so that it appears to more seamlessly belong to the rest of the application.
First picture: An MFC main menu. The application is skinned blue, as seen in the toolbar, but the menu is still standard grey background colour.
Second Picture: Spotify's menu, skinned to fit into the rest of the
colors.
I have not found any examples on anything similar. Could you please point me towards how to achieve this?
Approaches I thought of:
Subclassing CMenu to my own SkinnedMenu, but it is not created by our code but by a GetMenu() call in a mainframe class deriving from CFrameWnd. The only thing I can find here is its method signature, defined in afxwin.h so then how could I make use my own subclassed menu?
Removing the entire menu and add my own custom menu buttons, in a row, making it look like a menu. Maybe this is what spotify have done, as they have also removed the Windows window frame.
Editing the existing CMenu in some way, but the only customization I am able to find right now is modifying its MENUINFO. For example if I set info.hbrBack = skin.GetSysColorBrush(COLOR_MENU) the only colour that changes is the background of the dropdown, not the main menu itself.
Other :)

Magnifier like feature inside popup window....how to?

I need to create a magnifier like feature in my app. Like the "loupe" effect on the iphone !
The problem is that I need to do that inside a popup window and I don't get how to make it work !
The popup window display a grid of colors that I generate and draw one by one using shapeDrawables. What I want is to display that color bigger, zoom on it when the user touch and move his finger around the popup window (color grid). The idea is to create a tracking-zooming effect on the colors so the user can see more clearly under wich color his finger is currently located.
Problems are :
I can't seem to create another popup window on top of this one, Android limitation I think ?
If I modify the current shapeDrawable, resize it, change the boundaries, It needs to re-display the popup window before it takes effect (which is not acceptable of course)
So, anyone knows of a way I could draw over that popup window ?
EDIT :
I've tried solving this issue using a Custom Toast object...But it doesn't quite do the trick. It works, but toast object appears slowly and so the touch motion is not in sync at all with the user movement over the color grid.
I'm not sure if this will help you or not, but you might be able to accomplish this by using a second Activity... this second Activity would use Android's translucent theme if you include the following attribute in your manifest:
<activity android:theme="#android:style/Theme.Translucent">
This second activity will now only contain what you place in your layout. That is... the "real" activity you're running will still be visible behind it (anywhere you don't cover it up with views in the new layout).
You also might prefer Theme.Dialog if you really want to resemble a popup.
Something to keep in mind if you take this approach is you will probably want to override onWindowFocusChanged() in the new activity, and finish() in the event of you losing focus. Additionally, you'll need to figure out how to share your data between the two activities.

Dismiss spinner control popup if you don't want an item in android

I have an android spinner which I call via the performClick method to show a list of items (the actual control is hidden from the user and is called from a checkbox, too complex to explain why I have done it this way).
If I do not want an item in the list, how can I dismiss the popup by clicking on the black area?
Does this make sense? :/
Edit: Sorry, forgot to mention that the users will not be able to operate the bottom buttons (device is going to be galaxy tab) as they will be covered up with protective layer due as they will be outdoors.
usually such a control is dismissed using the back key in the android applications. So I would suggest that you find a way to do it the same way on your control.
'Esc' button should do the same job..

android - UI like sliding down notification bar

I want to develop a panel with animation same as notification panel. I mean to say the notification panel is a cool control where you grab and slide down the notification bar and see all the notifications.
Actually, I am having 2 UI , 1st should be shown with Button at top, when user click on that button, the 2nd UI with listview items should be slide down same as notification panel and again when user click or drag the 2nd UI at the top side, then 2nd UI should be become invisible. I hope i made clear my question.
From Christian's answer, I am trying to use a sliding drawer that will display a
list of options. I need this to expand over the current ListView on the page.
So if anybody know how to implement such layout or UI with sliding down animation then please share it.
Please suggest how to build with such control or layout? any ideas or suggestions
Thanx
Have you tried the SlidingDrawer widget?
Paresh I found a solution in this post about sliding drawers.
android misc widgets has it implemented , though it still has some flaws but it will definitely prove helpful.
Though in the same SO post CommonsWare has quoted :
...
You similarly cannot make a
SlidingDrawer that descends from the
top.
Good Luck.
You can use SlidingTray from: http://aniqroid.sileria.com to make this happen
http://aniqroid.sileria.com/doc/api/com/sileria/android/view/SlidingTray.html
Alternatively you can also use a custom PopupWindow class which is part of Android API.

Resources