Helo,
Is their any library that supports the swipe to delete feature as implemented in gmail on Android, that also shows the undo button ? I saw this also on google io 2013, so i assumed this is natively supported by Android ? Is this so ?
Kind Regards
yes there is but you need to slightly modify those based on your need:
https://github.com/romannurik/Android-SwipeToDismiss and this https://github.com/timroes/SwipeToDismissUndoList
and this https://github.com/47deg/android-swipelistview
There is no library i guess. But u can implement it by using DragListener and making the view's visibility to gone (make a custom view by extending it). And when you undo, set the Visibility to "Visible"
You can also use OnTouchListener and listen to the co-ordinates on which user performs drag & then perform your logic.
Related
I'm trying to find something about it and the API level of it.
It's only visible when the user reaches the end of a tabbed, swiped activity
Check out https://developer.android.com/reference/android/support/v4/widget/EdgeEffectCompat.html, it's used in ViewPager internally.
It's an android attribute called fadingEdge. Many of the android widgets like listview, viewpager, scrollview etc use it by default. You can place it in your widgets too using android:fadingEdge attribute.
Regarding the api level, it's deprecated since API 14 but you can still use it by requesting it using android:requiresFadingEdge attribute.
Refer to the docs here for details.
This is what I found in the Android documentation:
You can use scrollers (Scroller or OverScroller) to collect the data
you need to produce a scrolling animation in response to a touch
event. They are similar, but OverScroller includes methods for
indicating to users that they've reached the content edges after a pan
or fling gesture. The InteractiveChart sample uses the EdgeEffect
class (actually the EdgeEffectCompat class) to display a "glow" effect
when users reach the content edges.
Link: https://developer.android.com/training/gestures/scroll.html
I'm trying to make a viewpager that doesn't swipe but also allows touch inputs in the view it is showing to receive them.
When I return true in onTouchEvent and onInterceptTouchEvent() then the buttons in the view it's showing don't work.
Using a Wizard like https://github.com/PaNaVTEC/Wizard helped me solve this problem.
Disabling swipe entirely doesn't seem to give a good user experience. But that's just my personal opinion.
But if I were in your place and wanted to provide a cutting-edge wizard style tutorial page, I would have surely used this - ProductTour.
This library is just amazing and I actually use it.
At the top there is the favorites/styles/all channels
i don't know what that widget/control is i need to know what it is
i am certain i saw it before i just can't seem to find it again.
then there is a listview which is easy to implement no help needed there
then the same control again, i need to know how to build it.
it looks like a native Android control, i know how i can make one just like it using image buttons but i am sure i am missing something.
P.S. this is an image from sky.fm app on android
EDIT: I Do no need help with the ListView i already did that
What i do need help with is how to make the "favorites/styles/all channels" buttons if there is a way to do natively.
If there isn't a way to do natively, and you are sure just say there isn't a way to do natively ( that would be a good answer )
the perfect answer would be a working code, but i am not lazy i am already implementing the code my self
There's no native control for this. It's probably a Button or maybe ToggleButton. You could create a background xml with different states for selected true or false. And when you click the button toggle the selected state.
Top might be a custom tab layout, or just a bunch of buttons with custom styling.
Main part looks like a listview with complex row views.
Bottom almost definately is a bunch of buttons.
You can implement it using ClickableListAdapter.There is also tab implementation.try it.
Just make it using image buttons and put filters in your ListView, or create your own filter form scratch !
I have a need to create a circular dial/rotary style component for use in an application. It's essentially a circular menu that allows users to select from the items that are ringed around it, and then they can click the button in the center to activate the selected item. However, I've never created a custom UIView of this type, and don't really know where to begin. Can anyone give me any pointers as to how I would draw the view and then rotate it as the user drags their finger? I obviously know how to intercept touch events, etc. but I'm not sure how to actually go about manipulating the UI appropriately. Any tips or pointers would be great!
I don't know if you've already found a solution to this, but here is a nice overview of how to get started:
http://shahabhameed.blogspot.com/2011/05/custom-views-in-android.html
For you, I think you can extend an existing View, that View being the SeekBar. You can take the standard SeekBar and draw it in a circle.
Finally, here is a source code that does the rotation with a volume knob. It is its own project though, so you have to do some work to use it in your own app.
http://mindtherobot.com/blog/534/android-ui-making-an-analog-rotary-knob/
Good Luck!
I have a neat library to do this. It is extremely stable and well maintained. https://bitbucket.org/warwick/hgdialrepo
Heres a youtube demo: https://youtu.be/h_7VxrZ2W-g
This library comes with a demo app with source code and the demo app actually uses a dial as a menu, So I think this should be the perfect solution for you.
How to do drag/drop functionality to move a view from one position to another position in the current layout using a graphical drag and drop gesture in API level 8 as this functionality comes in Android 2.3
Thanks Saurabh!
hi here i give the link and go this post and find the solution of your question.
where i post my whole activity code for everyone.
so i think it`s help you best of luck
How to implement Drag and Drop in android 2.2?
and also find the another solution of how to do this.then use this link
http://code.google.com/p/rxwen-blog-stuff/source/browse/#svn/trunk/android/drag
And Another is
http://code.google.com/p/android-drag-and-drop-basic/source/browse/src/edu/sbcc/cs123/draganddropbasic/DragAndDropBasicActivity.java
My guess is you would need to listen for the touch of the user on the screen, identify the object that is being selected using the x/y coordinates, and then when the user releases the click, identify where they released. If it has changed, then work out where the new location is, and pass the object originally clicked to the other view, and remove it from the old one, placing it in the position clicked on the new view.
Look up OnClickListener for more information on how this works, in the Android Developer guides