How to handle widget's "Long Click" event on home screen?

by Jimmy Huang » Mon, 10 Aug 2009 14:15:54 GMT


Sponsored Links
 Dear All,

Does anyone know how to handle widget's "Long Click" event on home
screen? I want to implement: long click one widget on home screen then
one menu will be popup.

Thanks,
Jimmy
--~--~---------~--~----~------------~-------~--~----~



How to handle widget's "Long Click" event on home screen?

by Jimmy Huang » Mon, 10 Aug 2009 15:20:59 GMT


 Thanks for your quick reply.
But if I develop one myself's Home, then I can define the Long press
event on myself widget on Home?

Thanks,
Jimmy




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


Sponsored Links


How to handle widget's "Long Click" event on home screen?

by Jimmy Huang » Wed, 19 Aug 2009 17:07:00 GMT


 Anyone know this ? Thanks





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



Other Threads

1. View files within package data

Hi all,

Basically I want to know how to get a list or array or any type of
data about the files that have been stored in an package specific data
section. By this I mean that after using something like:

FileOutputStream fOut = c.openFileOutput(fileName, 0);
OutputStreamWriter osw = new OutputStreamWriter(fOut);

How can I get a list of the files saved to the data location of my
application where this file and other files or saved so that I can
choose which file I wish to read or edit. I've searched and searched
for this but have not found anything of use any help will be greatly
appreciated.

Cheers,

Irshad

-- 

2. Multitouch API question

I'm trying to detect fingers location on the screen within
onTouchListener. The location looks fine when only one finger is "on
touch". Touching with the other one causes somehow my first finger
location to be corrupted, shifted by some value. Below is an example
of the location log ([x, y]):

05-01 12:26:47.410: VERBOSE/TouchTest(8204): [58, 66]
05-01 12:26:47.960: VERBOSE/TouchTest(8204): [58, 67]
05-01 12:26:48.061: VERBOSE/TouchTest(8204): [58, 68]
05-01 12:26:48.070: VERBOSE/TouchTest(8204): [58, 69]
05-01 12:26:48.090: VERBOSE/TouchTest(8204): [58, 72] [392, 72]
05-01 12:26:48.100: VERBOSE/TouchTest(8204): [58, 73] [391, 74]
05-01 12:26:48.110: VERBOSE/TouchTest(8204): [58, 74] [391, 75]
05-01 12:26:48.121: VERBOSE/TouchTest(8204): [58, 75] [391, 76]
05-01 12:26:48.143: VERBOSE/TouchTest(8204): [58, 76] [391, 77]
05-01 12:26:48.170: VERBOSE/TouchTest(8204): [58, 77] [392, 78]
05-01 12:26:48.190: VERBOSE/TouchTest(8204): [58, 78] [392, 79]
05-01 12:26:48.230: VERBOSE/TouchTest(8204): [58, 79] [392, 80]
05-01 12:26:48.260: VERBOSE/TouchTest(8204): [58, 80] [392, 81]
05-01 12:26:48.320: VERBOSE/TouchTest(8204): [58, 81] [392, 82]
05-01 12:26:48.410: VERBOSE/TouchTest(8204): [58, 82] [393, 82]
05-01 12:26:48.510: VERBOSE/TouchTest(8204): [58, 82] [393, 81]
05-01 12:26:48.520: VERBOSE/TouchTest(8204): [58, 82] [393, 78]
05-01 12:26:48.531: VERBOSE/TouchTest(8204): [58, 77] [394, 73]
05-01 12:26:48.550: VERBOSE/TouchTest(8204): [58, 69] [394, 73]
05-01 12:26:48.570: VERBOSE/TouchTest(8204): [58, 68]
05-01 12:26:48.592: VERBOSE/TouchTest(8204): [58, 67]
05-01 12:26:48.730: VERBOSE/TouchTest(8204): [58, 66]
05-01 12:26:49.580: VERBOSE/TouchTest(8204): [58, 67]
05-01 12:26:49.640: VERBOSE/TouchTest(8204): [58, 68]

The code that creates the log above is:

StringBuilder message = new StringBuilder();

for (int i = 0; i < event.getPointerCount(); i++) {
  float viewX = event.getX(i);
  float viewY = event.getY(i);

  if (i != 0)
    message.append (' ');

  message.append ('[');
  message.append((int)viewX);
  message.append (", ");
  message.append((int)viewY);
  message.append (']');
}

Log.v (
  "TouchTest",
  message.toString());

And I'm having problems with creating a view to control some car.
There are four areas on the image to choose left/right/forward/
backward and when only one area is touched it works great. Touching
another one causes misplaced X,Y coordinates for both of it. When I
release the first area suddenly second area is detected as being
touched. I've created dummy event.getXY(...) log to show that the
problem arises from MotionEvent data (or my understanding of it
contents) not area hit detection.

Thank you.

-- 

3. Enabling Pattern lock without a set pattern

4. Update/alter Android Preferences dynamicaly

5. How to bring activity to front?

6. How to connect with MS SQL to android

7. TTS through blue tooth