Drag and drop in grid view - android

I want to drag a image view in the grid view which support in android version 2.2.
I can implement it using drag listener but for 3.0 and above, but i want to implement it in 2.2 also.
Please suggest me any example if any one have.

Yes, that can be achieved in 2.2 but not using Standard Android API. You have to use some 3rd Party to achieve it. I have accomplished Drag and Drop in GridView Task by using PagedDragDropGrid. if you required only in single page then do it by creating only one page in ExamplePagedDragDropGridAdapter. Hope this will help you.

Related

Material design listview on Android 4

Hi I'm trying to create listview on Android 4+ similar to those available in material design, something like this https://developer.android.com/design/material/videos/ContactsAnim.mp4 but with some modifications, after click on item I would like to expand this item in a pretty way scrolling to almost top of the list and making rest of items darken. What is the best way to achieve something like this on Android 4? I was trying to use ExpandableListView but it looks really awfull. Or maybe there is some library which can provide this functionality?
Yes you could use Transition API for building animations like this. Most part of this API could be used in android 4+ bu using, for example, this library

Swipe to delete for a custom view not for list item

I want to develop a layout with a very simple ImageView and a Listview binded in a Relativelayout . Now for a better user experience I want to delete the Image view by swiping it left or right same like what is implemented in android Gmail app to delete emails.
Implementing it on a listview item is very simple and there are many tuts and sample codes are available over the internet including the official Google I/O talk on animation and explained in a very good way by Chet Hasse here
https://www.youtube.com/watch?v=YCHNAi9kJI4
but I don't require to implement it on the listview items insted I want to implement it in more generic way. In my case I want the same behaviour for my ImageView item as one view and ListView another . Like shown below
As soon as the ImageView item is deleted the whole ListView should smoothly come on the top.
I have tried many way to implement the same without any success.
Suggest me the approach or some samples to do this which is supported in Gingerbread and above android OS.
You can use this code:
https://github.com/romannurik/Android-SwipeToDismiss/blob/master/src/com/example/android/swipedismiss/SwipeDismissTouchListener.java
As described in readme this code works for android 14+.
You can use the NineOldAndroids library to support old versions of Android, or use the Jake Wharton's port:
https://github.com/JakeWharton/SwipeToDismissNOA
I looked around and found this helpful.
https://github.com/nhaarman/ListViewAnimations
I implemented a custom ViewGroup that takes one child and allows you to drag/fling it to the left with a callback once the swipe is complete. My intention was for it to work just like in a RecyclerView. Works well in a LinearLayout with animateLayoutChanges=true and setting the visibility to GONE in the callback.
Gist here: https://gist.github.com/darnmason/38a1a5178a06470202784050f4dc1cdf
All you need is this library: https://github.com/timroes/EnhancedListView

How to design live tiles in android like Windows phones?

Is there any way we can design a live tiles in android like windows phone? If so can you please guide me
hello you have to look at android design principles ,
just look at this link
You can use fragments for mimicking live tiles in android!
The container for the fragments should be dynamically created frame layout or any other layout.
You can add a long click listener for these layouts, to show options like unpin,re-size as in windows.
Add a drag listener too, so that the user can freely drag and drop the view any where within the parent layout.
I hope this idea is pretty clear.

android - Drag and drop in Listview

I am new to drag and drop functionality.Please provide the easy tutorials.I saw some where drag and drop functionality starts from 3.0 and above. is any possibility to use in the below versions? I want to use drag and drop functionality in List view. please can anybody help me.
You can use the drag and drop feature with the support package.
All details are right here : http://developer.android.com/guide/topics/ui/drag-drop.html
and here : http://developer.android.com/sdk/compatibility-library.html

Sencha carousel implementation in android

Can anyone let me know how to implement this feature specified at
http://vimeo.com/24475654
Specially i am interested to know how to give dots below images which get changed when we swipe the images. Is there inbuilt function or any open source to implement this ??
Another way to do it is by using ViewPager from android support package. Here is a tutorial on how to use it: Android User Interface Design: Horizontal View Paging
As for the 'dots' below you can refer to this custom library for a ViewPager indicator: JakeWharton / Android-ViewPagerIndicator
You can use the native Gallery to do this and extend it to look like the one you want.
It has on selected item listeners so you can simply select the dots that correspond to the selected items.
Here is a Gallery tutorial: http://developer.android.com/resources/tutorials/views/hello-gallery.html

Categories

Resources