Firefox It’s Been Nice Knowing You

I recently dumped Firefox 7 and relegated Firefox to the occasionally used computer corner where I store all my various testing tools. After sending several emails to Mozilla, blogging about how terrible the new release is and tweeting about it…I heard not a peep, zero, zippo. Which is strange. It’s rare these days to not hear anything back from an organization, especially when you make a complaint on social media that’s backed by a blog post. I supposed I’m just one small voice in the sea of millions.

So, I’ve done what consumers do and voted with my feet. I dumped Mozilla in favor of Chrome, which has been elevated to the lofty status of what they call the “Default” browser.  I’m still getting used to Chrome and recently had some issues with accidentally closing tabs. And, it’s developer tools are a bit more rustic than Firebug or httpfox’s polished functionality. But, it does seem faster and it’s definately more stable.

So, that’s that. The browser wars continue, especially on the mobile front. By the way, I did briefly try Firefox mobile but dumped that also because the work flows were too ackward. There will be dozens of new browser updates in the next year, who knows what new excitement is in store.

Adobe Flex Mobile: Detecting View and Orientation Change with Event Listeners

There will be a time when you want to have more control over the transitions between Adobe Flex Views, or detecting when the device orientation changes. For example, I recently built an app that had some event listeners that stayed persistent even when the user changed views. So, I needed to listen for the change event when using tabbed view navigator <s:TabbedViewNavigatorApplication/> so I could remove those event listeners and I did it like this:

this.addEventListener(Event.REMOVED_FROM_STAGE,tabChangeHandler);

I also had a need to detect when the phone was tilted. Yeh, in a perfect world everything in the app’s user interface would automatically adjust to the new state, but that isn’t always the case especially when building more complex apps. What I did was listen for orientation changes like this:

stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE,stageOrientationChangeHandler);

Even if you are using some other Flex methodology for your mobile app, hopefully these examples will give you some ideas!

Adobe Flex Mobile Styles – Easily change the color of a Button

Have a mobile app using a default spark Button <s:Button /> and you simply want to change the background color? Wait just a second before you start creating a full-blown skin! It’s actually very simple – change the chromeColor. This info is buried way down near the bottom of the online reference doc. This also applies to ActionBar, ButtonBar, CheckBox, HSlider, and RadioButton.

Here’s one way to do it using CSS:

<fx:Style>
   @namespace s "library://ns.adobe.com/flex/spark";
   #shutdownButton
   {
      chromeColor: #FF0000;
   }
</fx:Style>

<s:Button id="shutdownButton" label="Shutdown?" click="shutdownButton_clickHandler(event)"/>	 

 Reference:

Basics of Mobile Skinning