Rummys Blog An world of endless Monday

Monday, 4 July, 2016

Manage Routes

Filed under: — Andrew.Rowbottom @ 11:23 am


For the preferences on the watch I use code based on Deneley wear preferences, pilule with amendments by LadyViktoria. And then some further modification to “fix” some scrolling issues.


Several of the icons I’m using come from, remedy then minor edits to make them white.

dots-horizontal more horizontal (3 dots)

watch, watch-export, watch-import
routes — signpost, directions
check and close and window-close
crosshairs , crosshairs-gps
trending-up (looks a teensy bit like a route)
vpn (needs a little edit)

eye/show, eye-off/hidden
developer mode (Device)
gps fixed, off, not fixed (Device)
show chart .. zig zag line (Editor)
smartphone, watch, (Hardware)
directions (Maps)

Fling Detection

To reduce CPU and lag I’m using a single map in a “GridViewPager” with a user interaction of swipe left/right to zoom in and out. Code that helped me work on the swipe interaction came from StackOverflow:
which gives info about system standard values

handlepointermove has

interestingly scroll left doesn’t call onTouchEvent at all in gridviewpager
but scroll right DOES .. turns out
canScrollHorizontally in GridViewPager is called from SwipeDismissLayout!!!

No events at all seen by assorted listeners! – Doh, attaching to getView(), not myMapFragment, though not then either!
is not focusable
is not clickable
this could possibly be the problem

StackOverflow suggest I need to find the appropriate parent to attach to…

out of interest the heirachy – found in onViewCreated
MyMapFragment (actually the container for it aka emptyFragment)
SwipeDismissLayout .. I know this gets events!#

I think we could
a) intercept the canScrollHorizontally and say YES for the MAP specifically
b) check in the onScrolled for a float value of >0.05 this depends heavily on the GridViewPager internal configuraiton though.
Ideally we probably ought to just use similar logic to gridviewpager re fling detection (or roll our own)

// using built in gesture detector ..
// actually is a little aggresive as it pings in early .. not only when map is displayed
// also .. it is attached when previous row is shown
// gets DOWN .. MOVE .. UP to display the MAP
// when on MAP it then only gets MOVE and UP, but NO down events. I wonder where the down events go?
perhaps to the map?
// all guestures are disabled on the map!


Can enable Maps blue dot without the mylocation button by


Crash Reporting

By default all routes that are on the map will be shown, Sildenafil
The Manage Routes activity allows the user to

  • View routes loaded
  • Synchronize routes with the phone
  • hide a route, ask
    this would be used when multiple routes for the same area exist (e.g. a 24km route AND a 32km Route)
  • delete a route

The Manage Routes activity will be based on a GridView Pager.
Each Row is an individual route.
Routes are sorted by Distance (is it worth the effort to sort by name?)
First Column:
x of y text in top right
a snapshot of the map | length, viagra buy
distance to route from current location
the route name underneath
Second Column
delete button? — delete button shows an OK/Cancel dialog — and then a delayed confirmation
Third Column
.. show/hide (again)
.. set colour
.. set width

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress