Firefox for Android: Native Android UI

You have probably seen some announcements and read some blog posts about Mozilla’s recent change in direction for Firefox Mobile on Android. We have decided to drop the XUL-based UI and re-build the application using native Android widgets. Here’s some of the rationale, from Johnathan’s newsgroup post:

  • Startup – A native UI can be presented much faster than a XUL based UI, since it can happen in parallel with Gecko startup. This means startup times in fractions of a second, versus several seconds for a XUL UI on some phones.
  • Memory Use – We believe a native UI will use significantly less memory.
  • Responsiveness – A native UI has the potential for beautiful panning and zooming performance.

Another major change is a move away from multi-process architecture (e10s) as well. The web content process was great for stabiilty, keeping crashes from taking down the entire application, but it also increased our memory usage and created some performance issues. In the new application, Gecko is running in a separate thread, not a separate process.

Quite simply everything you see is a native Android widget. Even the web content is displayed in a native view, very similar to the multi-process layers system we previously used. This allows us to asynchronously pan and zoom the web content, without waiting for the browser to scroll or zoom the actual content.

Even though the UI is completely implemented in native widgets, there is still a lot of JavaScript around, it’s just not visible. JavaScript is the perfect binding language into the Gecko platform and we are still using it for many of the same tasks. If you have ever built a browser using XUL, take a look at the browser,js file and you will see some familiar code. Because we have such a strong JavaScript binding layer, we can support add-ons in much the same way as a XUL-based application. More on that in a future blog post.

A few more details on how these three systems interact can be found in this basic architecture document. There is some details on the simple messaging system we use to allow the JavaScript and Java systems to communicate too.

The current nightlies are very usable, and support Flash (yes they do!) – so go grab the APK and try it out yourself.

20 Comments

  1. zoulou said,

    November 18, 2011 @ 9:57 am

    Currently flash videos are not displayed for me (Galaxy S II GT-I9100 – ANdroid 2.3.5 – Today’s nightly)

    Here’s a bag of comments:

    - I liked the previous tab UI a lot better. I catch myself loading firefox beta just because the tab experience is so much better :-( Sure the animations etc are nice, but its not nearly as functional.

    - Font rendering is odd currently ;-)

    - Browser gets confused with multiple tabs loading at the same time

    - zooming is odd currently as well ;-) performance is decent however

  2. Rami said,

    November 18, 2011 @ 11:10 am

    Hi,
    I tried to install it on my Tablet (Galaxy 10.1 3G). I think it’s still not optimized for the tablet UI.
    Everything was really fast, even the Arabic fonts was rendered perfectly. but after I closed it and try to run again, I have Auto Close window.

  3. Mark Finkle said,

    November 18, 2011 @ 11:28 am

    @zoulou – Thanks for testing it out and giving feedback. The Flash issue you reported might have been fixed and will show up in tomorrow’s build. Please check it out.

    Keep giving the new UI some time to grow on you. The font, zooming and tab loading issues are know and are getting fixed. Great performance is one of our top goals, so I am glad to hear your feedback on it.

  4. Firefox Android Native UI Debuts Sans Electrolysis: Mozilla Has Work To Do | ConceivablyTech said,

    November 18, 2011 @ 2:17 pm

    [...] strategy, short e10s, which constructed Firefox into a multi-process architecture. However, according to Mozilla developer Mark Finkle, also resulted in substantial memory issues and created performance [...]

  5. baschtl said,

    November 20, 2011 @ 3:30 am

    I can´t open aspx-sites. Firefox want to download the file.

  6. Nueva interfaz nativa de Firefox para Android | Computerworld Venezuela said,

    November 23, 2011 @ 7:08 am

    [...] segundos a fracciones de segundo), según explica el desarrollador de Firefox Mobile, Mark Finkle, en un blog. También se espera que consuma mucha menos memoria y que ofrezca unos tiempos de respuesta mucho [...]

  7. Firefox’s Android reboot begins tomorrow | QATAReTRADE said,

    November 23, 2011 @ 8:42 am

    [...] Among a local interface advantages, according to programmer Mark Finkle: [...]

  8. Kites4you said,

    November 23, 2011 @ 11:54 am

    I’m loving Firefox new UI. and I must say it’s tab management is better than any other web browsers i’ve seen. Keep growing, God bless Mozilla.

  9. Firefox for Android Gets Its Overhaul | PHP World said,

    November 23, 2011 @ 12:50 pm

    [...] version of Firefox for Android is that everything in the application is a native Android widget, as explained in this post: "Quite simply everything you see is a native Android widget. Even the web content is [...]

  10. Ubuntu and Android Users Should Jump On New Firefox Updates | PHP World said,

    November 25, 2011 @ 12:31 pm

    [...] as we’ve reported, Firefox for Android is a mobile browser to be taken seriously.  As explained in this post: "Quite simply everything you see is a native Android widget. Even the web content is [...]

  11. Ubuntu and Android Users Should Jump On New Firefox Updates | Matias Vangsnes said,

    November 25, 2011 @ 5:59 pm

    [...] as we’ve reported, Firefox for Android is a mobile browser to be taken seriously.  As explained in this post:“Quite simply everything you see is a native Android widget. Even the web content is [...]

  12. Tech Links 2 Click – Ubuntu and Android Users Should Jump On New Firefox Updates said,

    November 25, 2011 @ 9:18 pm

    [...] as we’ve reported, Firefox for Android is a mobile browser to be taken seriously.  As explained in this post: “Quite simply everything you see is a native Android widget. Even the web content is [...]

  13. Tech Links 2 Click – Firefox’s Android Reboot: What to Expect said,

    November 28, 2011 @ 10:49 pm

    [...] Finkle, a programmer for Mozilla detailed the native interface advantages of this model through his blog stating the [...]

  14. New wardrobe for Android Firefox surfaces | androidless.net said,

    December 14, 2011 @ 5:21 pm

    [...] to launch in “fractions of a second, versus several seconds,” according to programmer Mark Finkle, who also anticipates lower memory use and better responsiveness to user [...]

  15. New wardrobe for Android Firefox surfaces said,

    December 14, 2011 @ 6:48 pm

    [...] to launch in “fractions of a second, versus several seconds,” according to programmer Mark Finkle, who also anticipates lower memory use and better responsiveness to user [...]

  16. New wardrobe for Android Firefox surfaces | Android News Center said,

    December 14, 2011 @ 8:25 pm

    [...] to launch in “fractions of a second, versus several seconds,” according to programmer Mark Finkle, who also anticipates lower memory use and better responsiveness to user [...]

  17. New wardrobe for Android Firefox surfaces | Partners In Sublime said,

    December 14, 2011 @ 10:14 pm

    [...] to launch in “fractions of a second, versus several seconds,” according to programmer Mark Finkle, who also anticipates lower memory use and better responsiveness to user [...]

  18. Mava said,

    December 15, 2011 @ 8:00 am

    I have tried it, and it worked fine.
    The only thing I really don’t like is the new tab UI, I think it looks horrible.
    Other than that, great job again mozilla :D

  19. Firefox Aurora for Android now has the new native Android interface « Channels said,

    December 23, 2011 @ 1:11 pm

    [...] new Firefox Aurora for Android update includes a new native Android interface that we need your help [...]

  20. Firefox 11 Aurora (11.0a2) Released | Firefox Extension Guru's Blog said,

    December 23, 2011 @ 4:18 pm

    [...] channel. From Mozilla Future Releases: The new Firefox Aurora for Android update includes a new native Android interface that we need your help testing. Users will experience a faster start-up time, new design, improved [...]

RSS feed for comments on this post