How to handle a "long press" on a mapview/map overlay

by Amos » Fri, 14 Nov 2008 01:48:51 GMT


Sponsored Links
 Hi,

I want to be able to handle "long taps" on a mapview (or, preferrably,
a map overlay), like LongClick events. tap events are handled by these
classes, but I found no way to differentiate regular taps from long
taps.

I can probably implement this in the onTouchEvent method - but I don't
want to reinvent the wheel if there's already a way to do this. Any
ideas?

Thanks!
--~--~---------~--~----~------------~-------~--~----~



How to handle a "long press" on a mapview/map overlay

by dyonis » Fri, 14 Nov 2008 01:49:43 GMT


 O que voces acharam das novas musicass????
----- Original Message ----- 
From: "Amos" <[EMAIL PROTECTED]>
To: "Android Developers" <android-developers@googlegroups.com>
Sent: Thursday, November 13, 2008 1:48 PM
Subject: [android-developers] How to handle a "long press" on a mapview/map 
overlay




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to handle a "long press" on a mapview/map overlay

by JP » Fri, 14 Nov 2008 11:39:42 GMT


 Using TouchEvent is totally simple. I am using it to determine a long
tap. It's a one-liner.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Dialog (built using AlertDialog.Builder) not complete when showing dialog in runOnUiThread

Ok i solved it myself.

I use setMessage together with setItems.. this does not work
One should use setTitle in stead of setMessage.

I think the builder show throw an exception if somebody uses
a illegal combination of parts (in my case: message + items)

Anyway its a small issue, but a {*filter*} bug if you dont see it :-)



--~--~---------~--~----~------------~-------~--~----~

2. PNG transparency and OpenGL ES

I am rendering this PNG with no transparency just fine:
http://n4te.com/temp/test.png
However if I try to render this PNG (with transparency) with the exact
same code, I just get a white box:
http://n4te.com/temp/ball.png

I am loading the PNG into a texture like this:
Bitmap bitmap = BitmapFactory.decodeStream(input);
int[] temp = new int[1];
gl.glGenTextures(1, temp, 0);
textureID = temp[0];
gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_NEAREST); // GL_LINEAR for quality.
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_CLAMP_TO_EDGE);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_CLAMP_TO_EDGE);
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
bitmap.recycle();

I am using this blending:
gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);

How is it possible to render a PNG with transparency in OpenGL ES?

Thanks!
-Nate

--~--~---------~--~----~------------~-------~--~----~

3. help in maps

4. Question about SMS processing

5. sub-thread issue.

6. Dialog (built using AlertDialog.Builder) not complete when showing dialog in runOnUiThread

7. Accelerometer is cukoo???