I am trying to create a game, and I have a circle now I want to detect if a user has touched the edges of the circle.
It does need to be code even an explanation on how to do it would be great, but if there would be code it would be appreciated :D
This is the example:
Visual Aid on what I am trying to achieve.
Basically I want to detect if the user has touched the TOP LEFT, TOP RIGHT, BOTTOM LEFT, and BOTTOM RIGHT portions of the circle.
This is what I have done so far:
#Override
public boolean onTouchEvent(MotionEvent event){
int x=(int)event.getX();
int y=(int)event.getY();
if (event.getAction() == MotionEvent.ACTION_DOWN){
if (x < boxX){
touchDirection = "LEFT";
}
else if (x > boxX){
touchDirection = "RIGHT";
}
//NOT WORKING
else if (x < boxX && y > boxY){
touchDirection = "TOP LEFT";
}
else if (x > boxX && y > boxY){
touchDirection = "TOP RIGHT";
}
}
Thanks in advance for any help! :D
#Override
public boolean onTouchEvent(MotionEvent event){
int x=(int)event.getX();
int y=(int)event.getY();
if (event.getAction() == MotionEvent.ACTION_DOWN){
if(y > boxY) touchDirection.append("TOP");
else touchDirection.append("BOTTOM");
if (x < boxX){
touchDirection.append(" LEFT");
}
else {
touchDirection.append(" RIGHT");
}
}
Assuming touchDirection is StringBuilder
Sorry I didnt format, it is hard to do in mobile app
if (x < boxX){
touchDirection = "LEFT";
}
else if (x < boxX && y > boxY){
touchDirection = "TOP LEFT";
}
First condition will never allow you to check whatever you've written in else if block. Whether it finds x < boxX is true it's not going to the next condition to check 'y > boxY'. My advice is to using only if conditions for each and every case. Like this:
if (x < boxX){
touchDirection = "LEFT";
}
if (x > boxX){
touchDirection = "RIGHT";
}
if (x < boxX && y > boxY){
touchDirection = "TOP LEFT";
}
if (x > boxX && y > boxY){
touchDirection = "TOP RIGHT";
}
PS: As I can't replicate your case my answer is based on unimplemented logic. Hope this helps.
Hey guys I found my answer already, thanks to user5954246 and WS Ayan for providing help in finding the answer to my problem.
Basically this is what I did:
#Override
public boolean onTouchEvent(MotionEvent event){
int x=(int)event.getX();
int y=(int)event.getY();
if (event.getAction() == MotionEvent.ACTION_DOWN){
if (x <= boxX && y >= boxY){
touchDirection = "BOTTOM LEFT";
}
if (x >= boxX && y >= boxY){
touchDirection = "BOTTOM RIGHT";
}
if (x <= boxX && y <= boxY){
touchDirection = "TOP LEFT";
}
if (x >= boxX && y <= boxY){
touchDirection = "TOP RIGHT";
}
}
Related
I'm making a game and I can't get my image to move properly on a swipe. I tried doing angle calculations and such to sense where the swipe was by getting the x and y of the final and initial positions and subtracting them but it is not working for all angles. Up Right and Down Right aren't working but all the other directions are. I don't understand why because if down and up left are working, up and down right should work as well but they aren't.
Please help. I have no idea what to do.
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Rect;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.widget.ImageView;
import java.lang.Math;
import android.view.View;
import android.widget.*;
public class gameStart extends AppCompatActivity {
int Δx = 0;
int Δy = 0;
int x = 0;
int y = 0;
int speedx = 0;
int speedy = 0;
private ImageView character;
float charX = 0;
float charY = 0;
boolean left = false;
boolean right = false;
boolean up = false;
boolean down = false;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_game_start);
/**Gets the size of the screen.*/
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int height = displayMetrics.heightPixels; //May want to use dpi instead of pixels. Not sure yet.
int width = displayMetrics.widthPixels;
//Gets the width and height of the object as to set a constant speed for all screen sizes.
speedx = (int) (0.9*width)/100; //Change the decimal to change the percentage that the character moves in a specific direction.
speedy = (int) (0.9*height)/100;
View i = findViewById(R.id.square);
/**Gets the position of the character*/
character = (ImageView) findViewById(R.id.square);
charX = character.getX();
charY = character.getY();
}
public boolean onTouchEvent(MotionEvent event){
if(event.getAction() == MotionEvent.ACTION_DOWN) {
x = (int)event.getX();
y = (int)event.getY();
}
else if(event.getAction() == MotionEvent.ACTION_UP) {
int x2 = (int)event.getX();
int y2 = (int)event.getY();
//Get ΔX and Δy
Δx = x2 - x;
Δy = y2 - y;
swipe();
}
return true;
}
/** public boolean onDown(MotionEvent event){
//Initial location of swipe
System.out.println("Down");
if(!onDown(event)){
System.out.println("Swipe");
}
return false;
}
*/
public int swipe(){
//Determine the swipe of the user mathematically
if(Δx!=0) {
double radAngle = Math.atan(Δy / Δx);
double angle = Math.toDegrees(radAngle);
//Swipe Right Up
if (angle < 45 && Δx > 0 && Δy < 0) {
System.out.println("Swipe Right Up");
charX += speedx;
character.setX(charX);
}
//Swipe Right Down
if (angle > -45 && Δy > 0 && Δx > 0) {
System.out.println("Swipe Right Down");
charX += speedx;
character.setX(charX);
}
//Swipe Down Right
if (angle <= -45 && Δy > 0 && Δx > 0) {
System.out.println("Swipe Down Right");
charY += speedy;
character.setY(charY);
}
//Swipe Down Left
if (angle <= -45 && Δy > 0 && Δx < 0) {
System.out.println("Swipe Down Left");
charY += speedy;
character.setY(charY);
}
//Swipe Left Up
if (angle < 45 && Δx < 0 && Δy < 0) {
System.out.println("Swipe Left Up");
charX -= speedx;
character.setX(charX);
}
//Swipe Left Down
if (angle > -45 && Δx < 0 && Δy > 0) {
System.out.println("Swipe Left Down");
charX -= speedx;
character.setX(charX);
}
//Swipe Up Right
if (angle >= 45 && Δy < 0 && Δx > 0) {
System.out.println("Swipe Up Right");
charY -= speedy;
character.setY(charY);
}
//Swipe Up Left
if (angle >= 45 && Δy < 0 && Δx < 0) {
System.out.println("Swipe Up Left");
charY -= speedy;
character.setY(charY);
}
}
//Determine the swipe of the user mathematically
if(Δy!=0 && Δx==0) {
//Swipe Down
if (Δy > 0 && Δx==0) {
System.out.println("Swipe STRAIGHT down");
charY += speedy;
character.setY(charY);
}
//Swipe up
if (Δy < 0 && Δx==0) {
System.out.println("Swipe STRAIGHT Up");
charY -= speedy;
character.setY(charY);
}
}
return 0;
}
}
Here is the code for my onTouchEvent(MotionEvent event):
#Override
public boolean onTouchEvent(MotionEvent event){
int action = event.getAction();
int x = Math.round(event.getX());
int y = Math.round(event.getY());
//play is an imageView
int viewLeft = play.getLeft();
int viewRight = play.getRight();
int viewTop = play.getTop();
int viewBottom = play.getBottom();
boolean onPoint = false;
switch (action) {
case MotionEvent.ACTION_DOWN:
//Checks if the touched area falls within the imageView play
if ((x >= viewLeft && x <= viewRight) && (y >= viewTop && y <= viewBottom)) {
onPoint = true;
play.setImageResource(R.drawable.playyellow);
}
case MotionEvent.ACTION_UP:
//if the finger is lifed on the imageView, the intent is called
play.setImageResource(R.drawable.play1);
if (onPoint) {
if ((x >= viewLeft && x <= viewRight) && (y >= viewTop && y <= viewBottom)) {
Intent i = new Intent(this, InGame.class);
startActivity(i);
}
}
}
return true;
}
The problem here is that ACTION_UP is always called, regardless of whether or not I actually lift my finger off the screen. I ran it in debugging mode while placing a breakpoint on case MotionEvent.ACTION_UP, and when I pressed down (and didn't release), it got called. Can someone explain why this happens?
I analyzed your code and I think it is just because you did not insert break in between Action_Down and Action_Up cases.
try the following code.....
switch (action) {
case MotionEvent.ACTION_DOWN:
//Checks if the touched area falls within the imageView play
if ((x >= viewLeft && x <= viewRight) && (y >= viewTop && y <= viewBottom)) {
onPoint = true;
play.setImageResource(R.drawable.playyellow);
}
break;
case MotionEvent.ACTION_UP:
//if the finger is lifed on the imageView, the intent is called
play.setImageResource(R.drawable.play1);
if (onPoint) {
if ((x >= viewLeft && x <= viewRight) && (y >= viewTop && y <= viewBottom)) {
Intent i = new Intent(this, InGame.class);
startActivity(i);
}
}
}
return true;
I hope it will help you...
i just try to use FloodFill class and i found strange problem with coloring.
Lets start with code:
public class FloodFill {
public void floodFill(Bitmap image, Point node, int targetColor,
int replacementColor) {
int width = image.getWidth();
int height = image.getHeight();
int target = targetColor;
int replacement = replacementColor;
if (target != replacement) {
Queue<Point> queue = new LinkedList<Point>();
do {
int x = node.x;
int y = node.y;
while (x > 0 && image.getPixel(x - 1, y) == target) {
x--;
}
boolean spanUp = false;
boolean spanDown = false;
while (x < width && image.getPixel(x, y) == target) {
image.setPixel(x, y, replacement);
if (!spanUp && y > 0 && image.getPixel(x, y - 1) == target) {
queue.add(new Point(x, y - 1));
spanUp = true;
} else if (spanUp && y > 0
&& image.getPixel(x, y - 1) != target) {
spanUp = false;
}
if (!spanDown && y < height - 1
&& image.getPixel(x, y + 1) == target) {
queue.add(new Point(x, y + 1));
spanDown = true;
} else if (spanDown && y < height - 1
&& image.getPixel(x, y + 1) != target) {
spanDown = false;
}
x++;
}
} while ((node = queue.poll()) != null);
}
}
}
And method where i use FloodFill:
public void colorize()
{
bmp = ((BitmapDrawable)view.getDrawable()).getBitmap();
view.setOnTouchListener(new ImageView.OnTouchListener()
{
#Override
public boolean onTouch(View v, MotionEvent event)
{
int x = (int)event.getX();
int y = (int)event.getY();
...
flood.floodFill(bmp, new Point(x, y), bmp.getPixel(x, y), color);
view.setImageBitmap(bmp);
...
}
});
}
If i try to use standard android color f.g: Color.RED and Color.GREEN, everything works fine. I can replace f.g red with green its works, but if i try to use custom color like this: f.g. Color.rgb(34, 198, 67) i get single point colored instead of filled shape.
Can You help me to find a solution for this problem?
Edit1:
I spoted something interesting. Custom colors seems to be different values on some pixels but i dont know why if i using flood-fill.
Problem solved. Bitmap where i used floodfill was RGB_565. I just convert it to ARGB_8888 and everything work fine.
I'm doing a simple match-three game, similar to Bejeweled and I just want to move sprite objects by touching the sprite object and then move it one step in four directions like left, right, up and down. I do this by comparing the X and Y values on Down with the X and Y values on Move. It's working but it's far from perfect! It's so easy to get a wrong value if the movement isn't straight. My questions is: is there a way to improve this and make it better?
I have also looked at gesture, but this seems very complicated to use with a surfaceview that I have.
#Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
Log.i("test","Down");
touchActionDownX = (int)event.getX();
touchActionDownY = (int)event.getY();
touchActionMoveStatus = true;
gameLoop.touchX = (int)event.getX();
gameLoop.touchY = (int)event.getY();
gameLoop.touchActionDown = true;
break;
case MotionEvent.ACTION_POINTER_UP:
touchActionMoveStatus = true;
break;
case MotionEvent.ACTION_MOVE:
//Log.i("test","Move");
gameLoop.touchActionMove = true;
if(touchActionMoveStatus) {
touchActionMoveX = (int)event.getX();
touchActionMoveY = (int)event.getY();
if(touchActionMoveX < touchActionDownX)
Log.i("test","Move Left");
else if(touchActionMoveX > touchActionDownX)
Log.i("test","Move Right");
else if(touchActionMoveY < touchActionDownY)
Log.i("test","Move Up");
else if(touchActionMoveY > touchActionDownY)
Log.i("test","Move Down");
touchActionMoveStatus = false; // Will be set to true when pointer is up
}
break;
}
// return false;
return true; // This gets the coordinates all the time
}
Try something like this:
#Override
public boolean onTouch(View v, MotionEvent event) {
//You may have to play with the value and make it density dependant.
int threshold = 10;
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
Log.i("test","Down");
touchActionDownX = (int)event.getX();
touchActionDownY = (int)event.getY();
touchActionMoveStatus = true;
gameLoop.touchX = (int)event.getX();
gameLoop.touchY = (int)event.getY();
gameLoop.touchActionDown = true;
break;
case MotionEvent.ACTION_POINTER_UP:
touchActionMoveStatus = false;
break;
case MotionEvent.ACTION_MOVE:
//Log.i("test","Move");
gameLoop.touchActionMove = true;
if(touchActionMoveStatus) {
touchActionMoveX = (int)event.getX();
touchActionMoveY = (int)event.getY();
if(touchActionMoveX < (touchActionDownX - threshold) && (touchActionMoveY > (touchActionDownY - threshold)) && (touchActionMoveY (touchActionDownY + threshold))){
Log.i("test","Move Left");//If the move left was greater than the threshold and not greater than the threshold up or down
touchActionMoveStatus = false;
}
else if(touchActionMoveX > (touchActionDownX + threshold) && (touchActionMoveY > (touchActionDownY - threshold)) && (touchActionMoveY < (touchActionDownY + threshold))){
Log.i("test","Move Right");//If the move right was greater than the threshold and not greater than the threshold up or
touchActionMoveStatus = false;
}
else if(touchActionMoveY < (touchActionDownY - threshold) && (touchActionMoveX > (touchActionDownX - threshold)) && (touchActionMoveX < (touchActionDownX + threshold))){
Log.i("test","Move Up");//If the move up was greater than the threshold and not greater than the threshold left or right
touchActionMoveStatus = false;
}
else if(touchActionMoveY > (touchActionDownY + threshold) && (touchActionMoveX > (touchActionDownX - threshold)) && (touchActionMoveX < (touchActionDownX + threshold))){
Log.i("test","Move Down");//If the move down was greater than the threshold and not greater than the threshold left or right
touchActionMoveStatus = false;
}
}
break;
}
// return false;
return true; // This gets the coordinates all the time
}
Or use a ratio:
#Override
public boolean onTouch(View v, MotionEvent event) {
//You may have to play with the value.
//A value of two means you require the user to move twice as
//far in the direction they intend to move than any perpendicular direction.
float threshold = 2.0;
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
Log.i("test","Down");
touchActionDownX = (int)event.getX();
touchActionDownY = (int)event.getY();
touchActionMoveStatus = true;
gameLoop.touchX = (int)event.getX();
gameLoop.touchY = (int)event.getY();
gameLoop.touchActionDown = true;
break;
case MotionEvent.ACTION_POINTER_UP:
touchActionMoveStatus = true;
break;
case MotionEvent.ACTION_MOVE:
//Log.i("test","Move");
gameLoop.touchActionMove = true;
if(touchActionMoveStatus) {
touchActionMoveX = (int)event.getX();
touchActionMoveY = (int)event.getY();
// I haven't tested this so you may have a few typos to correct.
float ratioLeftRight = Math.abs(touchActionMoveX - touchActionDownX)/Math.abs(touchActionMoveY - touchActionDownY)
float ratioUpDown = Math.abs(touchActionMoveY - touchActionDownY)/Math.abs(touchActionMoveX - touchActionDownX)
if(touchActionMoveX < touchActionDownX && ratioLeftRight > threshold){
Log.i("test","Move Left");
touchActionMoveStatus = false;
}
else if(touchActionMoveX > touchActionDownX && ratioLeftRight > threshold){
Log.i("test","Move Right");
touchActionMoveStatus = false;
}
else if(touchActionMoveY < touchActionDownY && ratioUpDown > threshold){
Log.i("test","Move Up");
touchActionMoveStatus = false;
}
else if(touchActionMoveY > touchActionDownY && ratioUpDown > threshold){
Log.i("test","Move Down");
touchActionMoveStatus = false;
}
}
break;
}
// return false;
return true; // This gets the coordinates all the time
}
I would choose the dimension with the LARGEST movement and completely ignore the other, for example if the move is x=10 and y=8 then only use the x dimension (i.e. left/right) and vice versa.
Also as noted by Larry McKenzie, using a threshold to ignore smaller movements is a good idea to prevent registering accidental movements that the user did not intend. Tweak the threshold value to someting that feels natural.
Here is some code using your example (only the ACTION_MOVE case):
case MotionEvent.ACTION_MOVE:
//Log.i("test","Move");
gameLoop.touchActionMove = true;
if(touchActionMoveStatus) {
touchActionMoveX = (int)event.getX();
touchActionMoveY = (int)event.getY();
// setup a threshold (below which no movement would occur)
int threshold = 5; /* tweak this as needed */
// first calculate the "delta" movement amounts
int xMove = touchActionMoveX - touchActionDownX;
int yMove = touchActionMoveY - touchActionDownY;
// now find the largest of the two (note that if they
// are equal, x is assumed largest)
if ( Math.abs( xMove ) >= Math.abs( yMove ) ) { /* X-Axis */
if ( xMove >= threshold )
Log.i("test","Move Right");
else if ( xMove <= -threshold )
Log.i("test","Move Left");
}
else { /* Y-Axis */
if ( yMove >= threshold )
Log.i("test","Move Down");
else if ( yMove <= -threshold )
Log.i("test","Move Up");
}
touchActionMoveStatus = false; // Will be set to true when pointer is up
}
}
break;
NOTE: As mentioned in some of the other answers, because multiple events with very small values can occur, it might be best to accumulate (i.e. sum up) the movements UNTIL the threshold is reached - you can use members for this that reset in ACTION_DOWN. Once the threshold is reached (in either dimension) THEN you can perform the checks for which direction.
Alternative Approach
Another way to go about it would be to detect the largest movement in the FIRST ACTION_MOVE event, and then lock all further movements to that dimension. For this you would need to add various state members - these would need to be updated in each state.
Here is a rough example (with only the state tracking):
// members
private boolean axisLock = false; /* Track When Lock is Required */
private boolean axisX = true; /* Axis to Lock (true) for X, (false) for Y */
#Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
// set this state so that ACTION_MOVE knows a lock is required
axisLock = true;
break;
case MotionEvent.ACTION_UP:
// clear the state in case no move was made
axisLock = false;
case MotionEvent.ACTION_MOVE:
// now lock the axis if this is the first move event
if ( axisLock ) {
// this will set whether the locked axis is X (true) or Y (false)
axisX = event.getX() >= event.getY();
// reset the state (to keep the axis locked)
axisLock = false;
}
// at this point you only need to consider the movement for the locked axis
if ( axisX ) {
int movement = (int)event.getX(); /* Get Movement for Locked Axis */
// check for your movement conditions here
}
else {
int movement = (int)event.getY(); /* Get Movement for Locked Axis */
// check for your movement conditions here
}
break;
}
return true;
}
You could add many optimizations to this code, for now it just illustrates the basic idea.
larry had the right idea, i just want to put in a lil fix,
//put this in the wraping class
private static int THRESHOLD = 10;
private static int initX;
private static int initY;
#Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
initX = (int)event.getX();
initY = (int)event.getY();
break;
case MotionEvent.ACTION_POINTER_UP:
//you can add in some kind of "move back" animation for the item
break;
case MotionEvent.ACTION_MOVE:
if(((int)event.getY - initY) > THRESHOLD){
//move down
break;
}
if(((int)event.getY - initY) > -THRESHOLD){
//move up
break;
}
if(((int)event.getX - initX) > THRESHOLD){
//move right
break;
}
if(((int)event.getX - initX) < -THRESHOLD){
//move left
break;
}
break;
}
}
i didn't test this code, only free write it, but i hope you get my idea :)
I am a android beginner.
I am doing a android project which has a function to reorder something in a list.
I found a open source at https://github.com/commonsguy/cwac-touchlist#readme
and the module name is CWAC: TouchListView
But during my implementation, I have some problems and hope someone can help me,
I wanna to turnoff the remove function when I move the list item at horizontal but I cannot...
If I comment the remove code at TouchListView.onTouchEvent()'s case MotionEvent.ACTION_CANCEL
It will occur the unexpected behavior.
Also, I wanna have something animation during dragging the item like dolphin browser bookmark page, but I don't know is it should be implements the DragListener??
However, I have a bug fixed on it.
#Override
public boolean onTouchEvent(MotionEvent ev) {
if (mGestureDetector != null) {
mGestureDetector.onTouchEvent(ev);
}
if ((mDragListener != null || mDropListener != null) && mDragView != null) {
int action = ev.getAction();
switch (action) {
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
Rect r = mTempRect;
mDragView.getDrawingRect(r);
stopDragging();
if (mRemoveMode == SLIDE_RIGHT && ev.getX() > r.left + (r.width() * 3 / 4)) {
if (mRemoveListener != null) {
mRemoveListener.remove(mFirstDragPos);
}
unExpandViews(true);
} else if (mRemoveMode == SLIDE_LEFT && ev.getX() < r.left + (r.width() / 4)) {
if (mRemoveListener != null) {
mRemoveListener.remove(mFirstDragPos);
}
unExpandViews(true);
} else {
if (mDropListener != null && mDragPos >= 0 && mDragPos < getCount() - 1) {
mDropListener.drop(mFirstDragPos, mDragPos);
}
unExpandViews(false);
}
break;
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_MOVE:
int x = (int) ev.getX();
int y = (int) ev.getY();
dragView(x, y);
int itemnum = getItemForPosition(y);
if (itemnum >= 0) {
if (action == MotionEvent.ACTION_DOWN || itemnum != mDragPos) {
if (mDragListener != null) {
mDragListener.drag(mDragPos, itemnum);
}
mDragPos = itemnum;
doExpansion();
}
int speed = 0;
adjustScrollBounds(y);
if (y > mLowerBound) {
// scroll the list up a bit
speed = y > (mHeight + mLowerBound) / 2 ? 16 : 4;
} else if (y < mUpperBound) {
// scroll the list down a bit
speed = y < mUpperBound / 2 ? -16 : -4;
}
if (speed != 0) {
int ref = pointToPosition(0, mHeight / 2);
if (ref == AdapterView.INVALID_POSITION) {
// we hit a divider or an invisible view, check
// somewhere else
ref = pointToPosition(0, mHeight / 2 + getDividerHeight() + 64);
}
View v = getChildAt(ref - getFirstVisiblePosition());
if (v != null) {
int pos = v.getTop();
setSelectionFromTop(ref, pos - speed);
}
}
}
break;
}
return true;
}
return super.onTouchEvent(ev);
}
For the case MotionEvent.ACTION_CANCEL, if I drag the item over the list.getCount, it will throw exception, so I replace the condition
from
if (mDropListener != null && mDragPos >= 0 && mDragPos < getCount() ) {
mDropListener.drop(mFirstDragPos, mDragPos);
}
to
if (mDropListener != null && mDragPos >= 0 && mDragPos < getCount() - 1) {
mDropListener.drop(mFirstDragPos, mDragPos);
}
Then the exception will be fixed.
Could anyone can help me??
Many thanks.
I wanna to turnoff the remove function when I move the list item at horizontal but I cannot
Use the custom remove_mode attribute with a value of "none". For example:
<?xml version="1.0" encoding="utf-8"?>
<com.commonsware.cwac.tlv.TouchListView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tlv="http://schemas.android.com/apk/res/com.commonsware.cwac.tlv.demo"
android:id="#android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
tlv:normal_height="64dip"
tlv:grabber="#+id/icon"
tlv:remove_mode="none"
/>
I wanna have something animation during dragging the item like dolphin browser bookmark page, but I don't know is it
I will not be able to help you with that, sorry.