Am 2012-04-28 23:10, schrieb Jan Schejbal: > I located the cause for the high CPU usage while the app is idle: > Updating the compass arrow (which happens quite often) invalidates the > entire map (see the sensorListener in Main.java). I'm probably not going > to do anything about this, at least not until I am done with my actual task.
I made a semi-fix by ensuring the map is only invalidated when the compass has changed by at lease 1 degree. I also got annoyed by a bug in the zooming logic that caused me to get caught in maximum zoom repeatedly, so I fixed it. Other than that, I have had some time, and as I didn't get any negative feedback on the general idea, I have created a prototype of the easy edit mode. For this, I have added long-press support to the VersionedGestureDetector. A long-press happens if a few hunderd milliseconds after the initial touch event, no scaling, dragging or release of the finger occurs. The listener gets informed about this, and can either chose to ignore it (return false), which means the gesture detector does nothing, or handle it (return true), which means the gesture detector will ignore any following up or drag/scale events (until the finger is released and a new touch occurs, of course). I proceeded to putting in a prototype of the easy edit mode. It currently supports creation of nodes (similar to "add" mode), moving nodes around (similar to movement mode), tagging (similar to tag edit mode) and deletion of nodes (similar to delete mode). It is mostly separated in its own class, which causes some weird long calling chains. The context menu handling is mostly separate. I plan on completely separating it later, and replacing the context menu with something more custom for more flexibility. I will post some mock-ups during this or next week. While this is just a first raw prototype, it should give you an insight into the look and feel of the planned EasyEdit mode. If you find time, you are welcome to have a look at the code and try it out. I appreciate any feedback you can provide. Note that you will need the ActionBarSherlock library to successfully compile the project. Kind regards, Jan _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev