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. OOT:Android di Archos

Dear all, maap kalo OOT sekali. Barusan baca-baca tentang archos dan terbaca
ada yang telah berhasil menginstall android di dalamnya, dalam artian bukan
archos yang sudah include android sebelumnya. Adakah yang bisa menceritakan
tentang archos dan android ini, karena rasanya kok menarik untuk proyek
selanjutnya..thx. brgds
nb: kalo mengganggu jalum boleh japri saja...

-- 
"Indonesian Android Community [id-android]" 

2. How to get value from one intent in another intent?

Hello everybody,
           I had write two classes IntentA and IntentB in my
application (Both are in same package and both extends Activity
class). In IntentA class I had created one button on pressing that
button controll is trsnfer to IntentB class . IntentB class also
contain Button on pressing that control is transfer to IntentA class.

          This work fines. Now I want to set value in IntentA class
using putExtra method and access that value in IntentB class How
should I do that? I had put value in class IntentA like


        Intent i1 = new Intent(this,IntentB.class);
        i1.putExtra("Intent Name", "IntentA");
        startActivity(i1);



Now I don't know How to access "Intent Name" value in IntentB class.
Please help me.
Thanks in advance

-- 

3. ciri ciri android yang sudah aktif A2SD nya

4. custom fast scroll thumb

5. OOT WTA yg pake handset android garansi lokal siapa aja yak..

6. Media gathering and launching HTC Legend, HD Mini dan HTC Smart

7. How to narrow down the method that is involved in exception from the pid