What is the best approach to create a dragable floating buttons - android

On Samsung mobiles you can pin an application, to have it in a floating window, and can be minimized to a floating circled button / icon ... What is the best approach to accomplish this? Do I go for using Service that holds ImageView or do I go for the Floating Action Button (If it's possible to drag it around).
By any chance if there's an open source project that has this feature, could you please guide me to it.
Thank you

Related

Progress Indicator inside Button on click

Is there a way to set a progress indicator inside a button (preferably using the native Material Button from Material Components - Android)? There is a video on the website showing exactly what I need, but there's nothing in the documentation about it. Here is a screenshot of the same. Wanted to use it on a login button.
I also though of using a CircularProgressDrawable, which I've used before on a chip (as a chip icon), but in case of a button, I don't think there's a way to centre an icon horizontally on a button (my button width matches parent).
If anyone knows how to do this via either of the two ways, I'd be thankful.

Overlay layout that go over Navigation Bar Android 7+

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.

android - how to create this draggable menu

I have 3 main actions on my app. So I want a draggable icon that the user drag on direction of the desired action. Example:
I've found some circular menu libraries on github, but no one seems to have the option to drag the central icon. How can I create this? Maybe a free draggable button with colision test to detect desired action?

Interactive home screen icons

I searched this topic and couldn't find anything on it.
Is there a way to make interactive icons on the home screen?
for example there is "clean master" that after you click an icon of it, it make an animation. Also there is this facebook thing where you get a message and an icon with the profile picture of the one that messaged you pops up.
I can't figure out or find a way to implement this kind of stuff..
I would be happy if any one could give me some kind of direction..
Thanks in advance.
for example there is "clean master" that after you click an icon of it,
it make an animation.
The icon doesn't animate. When you click on it, a new transparent Activity opens which the icon at the same position where the original icon is. The animations happens entirely on the activity.
The activity is transparent so you get a feel that the icon itself is animating. If you notice carefully, you can find the navigation bar coming up if you tap somewhere while its animating.
Also there is this facebook thing where you get a message and an icon
with the profile picture of the one that messaged you pops up.
It is know as Chat Heads. You ca create your own, but it an take some time and is a bit involving. If you are a beginner and/or you are in a hurry, you can use this library. I have used it and it works perfectly.
The general answer if you want activity on the home screen is to implement a widget.
http://developer.android.com/design/patterns/widgets.html

How to create tool bar at the bottom when click menu button(left side button ) using android

I have a touch screen samsung android mobile. I need to create the toolbar when i press the menu button(left side button). My question is how to find the left side button pressed. How to code to find the mobile button pressed.
Please research on the topic on Internet first....
There are lots of tutorials available for you.
Create Menu

Categories

Resources