Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Force Android material design when previewing in web browser

  • Onsen UI seems to default to iOS styling for components when previewing in web browser.

    To force material styling, I am told to:

    • Call ons.disableAutoStyling()
    • Add modifier="material" in every component

    Adding the modifier attribute for each and every component is a tedious task.

    Is there a better way where I can easily do a single setting change and see how the app would look like under iOS and Android?

  • Onsen UI

    @wetfeet Simply run'android'); after including onsenui.js. If it’s just for testing, you can also append ?platform=android to the url or use an Android device in Development Tools.

  • @Fran-Diox Great! This is brilliant! I am pretty sold on Onsen! :thumbsup: