OSDN Git Service

Fix bug #8051633 Recent Apps thumbnails in RTL mode (Arabic / Hebrew / Farsi) should...
authorFabrice Di Meglio <fdimeglio@google.com>
Thu, 24 Jan 2013 02:46:25 +0000 (18:46 -0800)
committerFabrice Di Meglio <fdimeglio@google.com>
Sat, 26 Jan 2013 02:43:42 +0000 (18:43 -0800)
commit306fe5cc0e85e8a5ef07ff64493982f99caeba3a
tree2240b1d888ba450443cf1b057e80b69e565ad035
parentb9781fe08c5b1afba086857aa18b46862550ae88
Fix bug #8051633 Recent Apps thumbnails in RTL mode (Arabic / Hebrew / Farsi) should be aligned

Basically RelativeLayout was broken in a very stubtle way.

RelativeLayout needs in onMeasure() to have a width in RTL mode when "myWidth=-1" (meaning "not
defined") so that the rest of the onMeasure() computation can be done (children positioning and
width computation).

As there is no way to get its width apart from running the code, in RTL mode we set its width
arbitrary to the screen width for doing the width computation and children positoning.

Then, as a last pass, we will update and fix the children position (no need to do anything with
the computed width because it is correctly computed  already).

Change-Id: I426af3327160e751ef63ed3845aad5bab6dad661
core/java/android/widget/RelativeLayout.java