onTouchEvent in MapActivity

by fala70 » Sun, 18 Jan 2009 01:26:43 GMT


Sponsored Links
 I am trying to catch onTouchEvent on MapActivity. I overwritten the
method but it isn't never fired. Why ?. I need to find the location
lat. and long. for show add new marker when the user tap on map.

public boolean onTouchEvent(MotionEvent event){
                super.onTouchEvent(event);
                if (event.getAction()==MotionEvent.ACTION_UP){
                        Projection pro = map.getProjection();
                        GeoPoint p = pro.fromPixels((int)event.getX(), 
(int)event.getY());
                        curDB.requery();
                        Db.createPointItem(p.getLatitudeE6(), 
p.getLongitudeE6(), "CIAO");
                        map.getOverlays().clear();
                        map.getOverlays().add(so);
                        map.invalidate();
                        return true;
                }
                else
                        return false;
        }
--~--~---------~--~----~------------~-------~--~----~



onTouchEvent in MapActivity

by MrChaz » Mon, 19 Jan 2009 23:14:52 GMT


 Is your map view both enabled and clickable?  Both these properties
seem to be false by default.
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


onTouchEvent in MapActivity

by 艩ikus » Wed, 04 Mar 2009 23:27:16 GMT


 I recomend use for tatching a display:

@Override
        public boolean dispatchTouchEvent(MotionEvent ev) {//dotek prstem
                if(ev.getAction() == KeyEvent.ACTION_DOWN) {
                        Log.w("Uri.onCreate", "aaaaa1");

                }
}
}
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. AppWidgetProvider onReceive

I need to overwrite onReceive to get some own Broadcasts. The original method 
dispatches certain Broadcasts to onUpdate. I'm having a little trouble and like 
to see what the original method dispatches exactly to onUpdate. Does anybody 
know in which package the source file is with onReceive of AppWidgetProvider? 
Or just know what the method does?

-- 

2. Berhasil Overclock ampe 1.2Ghz. Batre n Suhu stabil.

Ni ada info yg pastiny bkin gregetan pra mania android! Stelah
browsing2 n ngutak ngatik hp. Akhirnya brhasil jg overclock(OC) SGS
pny gw make Super Optimized Kernel.
Stelah ngdownload Betteryminder(ni power management paling TOP!), suhu
btre trus stabil d bwh 50. Btre jg ga krasa ngdrop, smw normal2 aja..
Sbnernya d option setCPU bsa mlih opsi 1.6Ghz. Tp btreny lgsg ngdrop.
Dlm wktu stgh jam udh abis btrenya..jd gw ttep aman d 1.2ghz deh.
Quadrant score jg lumayan udh sampe 2300.
Kalo ada yg ttarik pgn tw n mw ngotak ngatik sndri, hub'in aja lwat
gtalk atw gmail d dimasle...@gmail.com nnti smw instruksi ane kasi tw.

Spec handset:
Galaxy S
Froyo 2.2 (JPA, Super Optimized Kernel v4.4)
RyanZA's One Click Lag Fix
Rooted

-- 
===============
"

3. [WTShare]Mozilla Seabird 鈥?A Communit y-driven Mobile Phone Concept

4. I can't get Android SDK setup to activate

5. TapJacking: Android Touch Event Hijacking

6. Hi..email validation problem

7. Abridged summary of android-developers@googlegroups.com - 84 Messages in 39 Topics