Sliding menu: closed, half-opened and opened - android

in an android application, I need to do the following:
I have a view, that acts like a menu, I can slide it from the bottom-up.
However I want to have 3 states: closed, half-opened and opened.
Please refer to this pic:
The blue section is the Handle, the user will use it to slide up/down or fling...
This is a bit similar to the android 5 notification bar, where you drag down to reveal half the view, then another drag down will reveal the whole view.
I can start implementing it in the onTouch of the blue section but that would require me to handle a lot of cases, especially the ones where the user flings vs slowly drag....
Is there any easier way or library that can help?
Thank you very much

Related

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.

launching app by swiping on screen(like Switchr app)

I have a news app.It is supposed to launch by swiping on the screen(homescreen or while in any other activity like switchr app).I learned to code swiping patterns but in my case I have to do exactly in the following way(swiping bottom right to top left)..Kindly have a look over following pictorial representation
1.Firstly app should launch by swiping bottom right to top left on the screen
2.next,show the user with list of scrollable arc menu buttons embedded in it like second image
3.when a user clicks on particular button it has to show a brief description about the content like third image
my problems:
creating arc like scrollable menu on bottom right side of the screen(I googled sia ahmed's solution over here ,it helped me a bit)
creating that parachute like structure(image 3) when user clicks particular bubble like button in arc menu..
please guide me
For the menu check out arcmenu by daCapricorn on github. Also see this question.
The balloon bit is trickier. I know of a balloon hint code for android but i haven't seen it in action.
Hope this helps!

swiping view or layout in android

I'm trying to make an extra effect to menu that will come down from the top of the screen
I want to make it enter the screen while swiping it from the top and if the user left it, it should continue to the end
this is the figure that demonstrate what I want to do:
I tried to do it with animation but the animation will not go on while swiping and it will go to the end without touching
any other ideas to move the view down with finger ?
Check this out for a sliding Drawer http://developer.android.com/reference/android/widget/SlidingDrawer.html
it sound like you kind of want the same thing as the pulldown menu at the top of all android phones except you want it customized, the link will show you that.
OK
It works for me now
I used SlidingTray.java class from this API
API Website
btw : this api open source

Android: SlidingDrawer like the one in the Android main window

I implemented a SlidingDrawer in my app and everything works fine so far.
Then I made an invisible handle, just like the one in the Android main window.
Now I want, that it is possible to grab the handle (and make it visible) just by moving the finger over the handle. I mean the same behaviour like the one in the Android main window.
But i donĀ“t know how to mange that.
(At the moment it only works when you tap at the handle, and not if you tap somewhere else and move the finger above the handle)
Sounds like a bad idea. There will be no way to distinquish between the system's drawer and your app's drawer.
You want to detect a swipe motion that starts on the top bezel.
You want to use MotionEvent's getEdgeFlags() to detect whether a swipe gesture starts on the bezel.

Android: Draggable view to show another view (similar to Facebook)

For those of you who have used the Facebook app, it has an interesting way of showing more information on the home activity by having a draggable view at the bottom of the screen that, when dragged up, shows Facebook notifications. Dragging the same view back down hides the notifications. Note that this will work either by holding and dragging it to the top of the screen or simply flinging it in that direction.
I would like to do something similar for my app. I have a LinearLayout at the bottom of my activity and want to be able to drag it up to see more information. How can I go about doing this? Are there any tutorials available?
Have you checked out the sliding drawer component?
http://developer.android.com/reference/android/widget/SlidingDrawer.html
I think this might be what you are looking for.

Categories

Resources