Skip to content Skip to sidebar Skip to footer

How To Use View.setx() Method In Android Version Less Then 3.0

i want to implement drag and drop feature but the device version is 2.2.1 so application is not working i am use onTouch method and set coordinate using setx() and setY() but this

Solution 1:

Unfortunatelly Android Support Package doesn't contain new Drag-n-Drop from API 11 (Android 3.0) probably because it would need platform-side changes.

Basically you can find examples in Android 2.1 source code for Launcher. But it's a bit complicated. Checkout this implementation of custom ListView component with drag-n-drop. It helped me a lot when I had the same task.

Solution 2:

Android does not support this method in version < 3.0 but if you want to implement this then you need to change the layout param .

Hope this will work you

Solution 3:

Use this jar file to use functions of all versions up to version 4.

http://www.java2s.com/Code/Jar/a/Downloadandroidsupportv4jar.htm

Post a Comment for "How To Use View.setx() Method In Android Version Less Then 3.0"