Including Crosswalk into an existing Android Project

I am trying to implement Crosswalk-project into an existing Android Studio project. So the first step it is to understand how to include the project into into our gradle.build file adding the repository:

repositories { maven { 
        url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
    } 
}

Continue reading Including Crosswalk into an existing Android Project

Handling other popups in Android WebViews using CrossWalk Project

In CrossWalk we don’t have a direct translation of the techniques used in WebView projects using the standard Android API.
What we want to do in here is to be able to handle a JavaScript popup opened through

window.open

Continue reading Handling other popups in Android WebViews using CrossWalk Project

How to rename a branch and the commits

In the company where I work we always tag the git commits against the ticket we are working on. I created a git hook for this. Each commit looks like:

“BRANCH-NAME: Commit message”

However it might happen that a branch name is mistaken, so you might needed a rename the branch and the commit messages. It is fairly easy, but be aware: if someone else is working on the same branch as you, you might create some problems.
Continue reading How to rename a branch and the commits

Targeting different Android layouts based on different SDKs

Please read through the whole article before doing anything, since these are notes I took while I was developing this feature.

The version of Android running on the device is given by the variable

android.os.Build.VERSION.SDK_INT

Continue reading Targeting different Android layouts based on different SDKs

Autocorrect, autocapitalize and autocorrect in contenteditable

While debugging some issues with lost of formatting in mobile editors I started researching about how to control input methods in mobile devices: we can control how the user gets corrected for words, autocorrection and spellchecking.
This feature is often desirable, however it causes content-loss in a rich text editor environment.
Continue reading Autocorrect, autocapitalize and autocorrect in contenteditable

Android Webview – The space event is not firing as expected

When we work with text editors we need to listen to every single event happening at the keyboard level and then act accordingly. For example after typing a space we might need to transform a link-like text into an actual link.

While this feature has been working fine in all the devices, our QA team has found an issue with this component, and digging into the code I found how the space is not being recognized correctly as a space.
Continue reading Android Webview – The space event is not firing as expected

Showing errors after the user finishes typing with angularjs

I really like the inline form validation pattern: as the user finishes typing the validation on that input is immediately performed. This improve the user experience, by:

  • a 22% increase in success rates,
  • a 22% decrease in errors made,
  • a 31% increase in satisfaction rating,
  • a 42% decrease in completion times, and
  • a 47% decrease in the number of eye fixations. (source alistapart.)

Continue reading Showing errors after the user finishes typing with angularjs

Same functionality, same UI, but different controller in AngularJS

I am relatively new to AngularJS, but I don’t miss occasion to be surprised by the simplicity of this spectacular framework.

First of all we define a service which contains the functionality we need. In this case is a “Welcome panel”, where it’s visibility can be managed from different points.
Continue reading Same functionality, same UI, but different controller in AngularJS

Setting Page titles with AngularJS

Factories

In AngularJS if we want to share informations across multiple controllers we should use factories.

I needed to change the page titles from multiple locations, so I made use of an extremely simple factory. We are going to use a local variable, named title which contains the title, and two exposed methods: title, which is going to be in charge of returning the title, and setTitle which we’ll call from the controllers to change the title page.
Continue reading Setting Page titles with AngularJS