iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 552 forks source link

Mobile: Show portal highlighter in action bar #565

Closed fkloft closed 11 years ago

fkloft commented 11 years ago

Android supports showing a listview within the actionbar (see google calendar). We could use this to show the portal highlighter selection. No space wasted, easier to select, adds a bit of native.

I hacked a quick'n'dirty solution, and the basic function works. If implemented for real, I suggest:

  1. putting all action bar related stuff into a helper class (currently distributed among IITC_Mobile, IITC_JSInterface and possibly others)
  2. removing "IITC Mobile" from the action bar while in map mode
  3. removing the select box when on android

The mentioned helper class should simplify handling of backstack, home/up button, fullscreen action bar and title changes.

What do you think?

screenshot_2013-09-17-23-12-48

leCradle commented 11 years ago

Great idea! If no highlighter is enabled, the listview has to be hidden but this should be no problem. I'm looking forward to your pull request... :)

fkloft commented 11 years ago

The listview should also be hidden when opening the chat/details pane (which I partially already implemented) so this should be quite easy after the action bar refactoring.

fkloft commented 11 years ago

I implemented this in https://github.com/fkloft/ingress-intel-total-conversion/compare/actionbarhighlighter

@leCradle told me that highlighters were done by @vita10gy. I would be glad if you or @jonatkins had a look at the javascript part and told me in case I forgot something.

leCradle commented 11 years ago

Ok...I've merged it. The Android part looks good and everything on JS side is guarded with if (typeof android !== 'undefined' && android && ...) so it shouldn't break anything.