In my android studio, I am creating animated floating button, in which on click it expands to multiple floating button again on click it collapse. "https://www.sitepoint.com/animating-android-floating-action-button/"
The part where I need help is if the buttons are expanded and the user instead of collapsing the button its touches another part of the screen or clicks something else then I can detect and collapse it programmatically.
What method should i use to do this?
You can use third-party library to save your time. I recommend this one
Check it out and I hope that it will be useful
Related
I'm trying to do an Accessibility Service where the purpose it's to create some "layer" between the user when he touches the screen and the tap.
For example : when I touch the screen I when to double tap at this precise position I touch the Screen.
I think, but I'm really open to suggestion, that I will have to create an invisible layout that will cover all the screen where a would be able to activate an onTouchListener to get the position and use my accessibility service to create gesture and transfer the touch behind the layout to click anywhere.
As far I only found a solution for Android 4.1 or less.
I also want to use a kind of cursor, the app Open Sesame do it well and the cursor can go over the navigation bar and interact with.
I also found the open source project Eva facial mouse but they don't perform complex gesture and don't go over the navigation bar.
So my big question is, I am in the right way by wanting to create an invisible layout to detect touch even on the navigation bar and is there someone would help me to enlighten my search in the right direction.
I succeed in putting an overlay layout over the status bar, just add the right Flags to your LayoutParams.
For my case I use: FLAG_FULLSCREEN, FLAG_LAYOUT_IN_SCREEN and FLAG_LAYOUT_NO_LIMITS.
Please refer the attached picture when user click on GO button all the other button comes under the GO button and when user again clicks the GO button all the buttons get distributed. I want to make same button and animation. I searched a lot but not got anything relevant, Kindly help.
There is a satellite menu library, with this you can acheive as you want. In this you need to handle the position of it.
I wanted to achieve the same sort of functionality found in Google Now where you can tap the cards overflow icon and a menu appears next to it with options (shown here).
Does anyone know how to implement this sort thing to achieve the same style etc?
I think you can do this by placing a listview under your button, and set its visibility to invisible.
Then place an onclicklistener on your button to turn your visibility to visible.
Is it possible to create a menu in android that shows when someone for example touches a graph and It brings more options. I want a menu that will appear from above and below like how the menu used to be in android when you touch the menu button. Now without the button i would like the user to touch a chart or a table and two menus appear from above and below or even sides. Any suggestions will highly be appreciated
Suggestion:
Make the layout of menu you would like to show, and include it in the layout of your activity.
By default set it to be GONE, this will hide it.
Then set a touch listener for your graph, and change the visibility of menu to VISIBLE to show it.
I think what u need is a context menu; see this example Hope this helps :) cheers :)
When you using standard Android keyboard on small screens, if you touch a button, you can see a hint, showing which button you hold now. How can I implements this on my custom set of buttons? Is the only way is creating pop ups on every touch event?
There is no built-in popup functionality for regular buttons in Android, so yes, you will have to implement this manually. However you don't necessarily have to create the popups for every touch event. I recommend creating one popup and changing its location and visibility on every touch event.