I know Googles now say to us forget about "menu" stuff, apps needs to call that another name, "action" if I can remember... anyway I do need a menu and have simulated with a TListBox, problem is: my code is fixing that position when open and I cannot set that dark grey color style. TMenu is not available to Android... Any tip?

Comments

  1. I think this is trying to force the platform to do something that's not supposed to.

    You should play with different layouts and see what works best for you.
    There's a problem, too: menus are way too small to be handled by a finger, which is probably why they are discouraged.

    A common layout that involves a list box would be to have it at the centre of the screen or, if it's lots of things, a tab control with a listbox in each so that you have multiple "menus".

    Regards,

    A

    ReplyDelete
  2. Andrea Raimondi "menus are way too small to be handled by a finger" -> I disagree. A proper Android menu is designed to be pressed by a finger. It's quite large enough.
    Maybe a listbox faux menu might be too small, but there is nothing wrong with a real Android menu. You still get menus in regular Android apps if all the actions can't sit on the action bar - it's called an action overflow menu.

    ReplyDelete
  3. "It's quite large enough." - Completly agree. Even with small screens is easy to access.

    ReplyDelete
  4. Brian Long can you give me an example of such menu? I have had a Samsung Galaxy II for the last year and something and I either don't understand what you mean or have never seen such a menu. A

    ReplyDelete
  5. Andrea Raimondi The sort of thing I'm thinking of is given by this example

    Oh bah! Can't embed images in G+ posts...

    Lemme upload it somewhere.

    Try this - https://www.dropbox.com/s/jviv4vl7ctcr0vz/Menu.png - ignore my choice of icons - it was a test app to try something.

    ReplyDelete
  6. Brian, I am started to make my 1st ever app for mobile, and simple things like you did, as put dark theme I simply don't figure out how to... The things to build an app for mobile are really a bit ofuscated to me and I know it´s not RAD fault, if not because of Delphi I were still waiting for...That said, how do you did that? :)

    ReplyDelete
  7. You implicitly get a style book in your app, which is the light theme. To get the dark theme, drop a TStyleBook on the form, double-click it and load in the dark style file with Load...

    The file is at %PUBLIC%\Documents\RAD Studio\12.0\Styles\Android\AndroidDark.fsf.

    Now set the form's StyleBook property to point to your new style book, if that didn't happen automagically.

    If you want to choose between the themes, have another stylebook on there, which will default to containing the light theme, and you can code up an assignment of either stylebook to the form's StyleBook property.

    TBH I'm not hot on all the stuff to do with styles. I got that trick watching an Embo bod doing a demo - fortunately I had a pen & paper handy at the time :o)

    ReplyDelete
  8. hmmmm.. well, time to learn, thank you again

    ReplyDelete
  9. Ok,that worked!! Thank you! 
    But I was unable to mix styles, as I have see in your example, the Tabs are black and background white, I tried to put a second bookstyle without loading style and keep the light color, made a research to discovery how to do something like you did, I was unable.

    ReplyDelete
  10. They aren't tabs. They are Android menus. You'll recall I was showing that menus are perfectly large enough - there are 2 menu items shown in that screen shot.

    ReplyDelete
  11. Oh, and what I'd also meant to mention was that menus are Android system artifacts, so they take the Android app theme. The FMX style book is all about custom rendering of styles to app-drawn items, so pays no attention to the Android app style. That's why the screenshot shows the app as Holo light, but the menu as Holo dark - the app is taking the dark theme.

    ReplyDelete

Post a Comment