Commit Graph

3738 Commits

Author SHA1 Message Date
Fabrice Di Meglio
69ad42a6c1 am b91fb8c6: am 36fb0166: Merge "Fix bug #8200928 ExpandableListView should be RTL-aware" into jb-mr2-dev
* commit 'b91fb8c665e9bbdf18d66c0817278e20a97791d8':
  Fix bug #8200928 ExpandableListView should be RTL-aware
2013-03-22 01:27:32 +00:00
Adam Powell
f2bfed0d68 am 6338eb11: am ef793669: Merge "Fix a stability regression in ListView arrow scrolling" into jb-mr2-dev
* commit '6338eb1165d2d932a90738fea1f6d7be6a7fa3aa':
  Fix a stability regression in ListView arrow scrolling
2013-03-22 01:20:21 +00:00
Fabrice Di Meglio
36fb0166a3 Merge "Fix bug #8200928 ExpandableListView should be RTL-aware" into jb-mr2-dev 2013-03-22 01:20:15 +00:00
Adam Powell
04fb1a450f am 7b8dfeb6: am 86a1a245: Merge "Revert "Revert "Fix ListView is not scrolled properly with arrows""" into jb-mr2-dev
* commit '7b8dfeb6ad1036506403fdb7b523db8ca3c2c633':
  Revert "Revert "Fix ListView is not scrolled properly with arrows""
2013-03-22 01:16:49 +00:00
Adam Powell
2a93911b87 Fix a stability regression in ListView arrow scrolling
The earlier patch 3cf7b3c59 introduced a stability regression. Perform
the appropriate bounds checking alongside the fix it implements.

Bug 8264185

Change-Id: I943d6c05bacdd777f89243fdac97788b16639dc6
2013-03-21 17:08:38 -07:00
Fabrice Di Meglio
605c5af9c8 Fix bug #8200928 ExpandableListView should be RTL-aware
- draw the group and child indicator at the correct position when in RTL mode

Change-Id: Ib346ae59f17c129fc59b76cd7fcc36fbdb86e499
2013-03-21 16:10:13 -07:00
Justin Ho
1ad11b9c6c Revert "Revert "Fix ListView is not scrolled properly with arrows""
This reverts commit 3cf7b3c592.
2013-03-21 14:21:30 -07:00
Michael Jurka
a383eba1cc am 953a9466: am 6812efd2: Merge "Make hasOverlappingRendering() method more accurate" into jb-mr2-dev
* commit '953a94662114933ee81ad197e6a70ffc3f45a289':
  Make hasOverlappingRendering() method more accurate
2013-03-21 17:09:33 +00:00
Michael Jurka
0931a8516a Make hasOverlappingRendering() method more accurate
Bug: 8439502

Change-Id: I80075eddf6abc7999b70e665e692d88b81d5f087
2013-03-21 16:12:35 +01:00
Fabrice Di Meglio
3807312e9b am 0bcec06b: am 19eceaad: Merge "Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies" into jb-mr2-dev
* commit '0bcec06b24e7bc67ab4922f6bb18e6bc7737ba69':
  Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies
2013-03-20 22:32:45 +00:00
Fabrice Di Meglio
19eceaadd7 Merge "Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies" into jb-mr2-dev 2013-03-20 22:27:37 +00:00
Fabrice Di Meglio
665f02c667 Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies
- remove the ICU related methods and update the methods using the "reserved" argument
- update to CTS in another CL too

Change-Id: I5509736568c342d9d17bfeafc17951117ab5d3cc
2013-03-20 14:56:05 -07:00
Fabrice Di Meglio
0d84e72566 am 430058f2: am 2d18e52b: Merge "Fix bug #8335710 TextView can\'t clear CompoundDrawables" into jb-mr2-dev
* commit '430058f2699041e86d7c0e50cad1fa6989d08cab':
  Fix bug #8335710 TextView can't clear CompoundDrawables
2013-03-19 17:43:45 +00:00
Fabrice Di Meglio
2d18e52b00 Merge "Fix bug #8335710 TextView can't clear CompoundDrawables" into jb-mr2-dev 2013-03-19 17:39:11 +00:00
Elliott Hughes
d81830d67e am 110a98b6: am f7c01e5a: am eda35cb7: am a8974d3f: Merge "Clean up (some of) our many clocks to use H instead of k."
* commit '110a98b67285ec213720c542e6fb4711d9fd3114':
  Clean up (some of) our many clocks to use H instead of k.
2013-03-19 16:35:46 +00:00
Elliott Hughes
f7c01e5a8a am eda35cb7: am a8974d3f: Merge "Clean up (some of) our many clocks to use H instead of k."
* commit 'eda35cb7c5781a32b038f1ef76b8e50f26f9bfaf':
  Clean up (some of) our many clocks to use H instead of k.
2013-03-19 09:31:04 -07:00
Chet Haase
92eb0073bf am 58afb2f0: am f4071065: Merge "Fix bug with transientState for listviews without stable IDs" into jb-mr2-dev
* commit '58afb2f0501b22d020ac1fc1a116baec21765e3c':
  Fix bug with transientState for listviews without stable IDs
2013-03-19 13:12:40 +00:00
Chet Haase
f4071065b8 Merge "Fix bug with transientState for listviews without stable IDs" into jb-mr2-dev 2013-03-19 13:06:56 +00:00
Fabrice Di Meglio
f7a5cdfac6 Fix bug #8335710 TextView can't clear CompoundDrawables
- fix start/override mechanism
- take care of RTL compatibility mode (pre JB-MR1)
- fix where reset of drawables resolution needs to happen

Change-Id: I55a69487a0eedee14c4be7006ee0abad085200ad
2013-03-18 18:13:16 -07:00
Elliott Hughes
cdafd37f31 Clean up (some of) our many clocks to use H instead of k.
Bug: 8359981
Change-Id: I3c0c38c2bf5adc4b5bdc11c3d10cf41dd8fb6462
2013-03-18 17:21:33 -07:00
Chet Haase
a2230e1856 Fix bug with transientState for listviews without stable IDs
This is the other part of a fix with transient state. A layout container
may be out of sync with its adapter during a data change. When the transient
state views are managed by their positions, and these positions may not match
between the container and the adapter, then the views will not be updated
correctly on the screen (though the underlying data will still be correct).

An earlier fix addressed the problem when the adapter has stable IDs (managing
the transient views by their IDs instead of their positions). This fix addresses
the other part of the problem, simply avoiding managing via positions during
a data change.

Issue #8254775 View.setHasTransient state has side-effects when deleting content in ListView

Change-Id: I0fe1692a1507a042180f8a14a8ef2d0c6946a061
2013-03-18 14:52:37 -07:00
Svetoslav Ganov
b002104350 am 3405dac2: am e4c9ac2d: Merge "Remember which list child has A11y focus BEFORE clearing A11y focus." into jb-mr2-dev
* commit '3405dac287580e65d74a2fd8e6d2bffd85420bf0':
  Remember which list child has A11y focus BEFORE clearing A11y focus.
2013-03-18 21:29:18 +00:00
Svetoslav Ganov
e4c9ac2df2 Merge "Remember which list child has A11y focus BEFORE clearing A11y focus." into jb-mr2-dev 2013-03-18 21:23:45 +00:00
Chet Haase
728713258f DO NOT MERGE: ListView transient state fix
ListView child views with transientState (setHasTransientState(true)) are not
handled correctly when the data set changes, such as when an item is added
or removed. The problem is that the transient views are cached by their
position, but this position is out of sync between the ListView and the adapter
until the ListView layout process is complete.

A better way, which unfortunately only works on ListViews with stable IDs, is
to cache the views by their itemID instead, and to use that ID to determine when
and where to reuse/retrieve a transient view during the ListView layout.

Issue #8254775 View.setHasTransient state has side-effects when deleting content in ListView

Change-Id: I2fc25e71ed6655af30b9c3f47fdf014e9b667616
2013-03-18 10:06:27 -07:00
Alan Viverette
b53c5f6b6f Remember which list child has A11y focus BEFORE clearing A11y focus.
Bug: 8332399
Change-Id: I0293efe5cef4a011a584e62fc4a64cde7d354efe
2013-03-15 15:50:37 -07:00
Fabrice Di Meglio
f72b5c920a am cf60cc9a: am 261f82ca: Merge "Revert "Clean Paint.mBidiFlags as it is no longer used"" into jb-mr2-dev
* commit 'cf60cc9adedf032c6c97cd2cbb9ff211deaaf3ae':
  Revert "Clean Paint.mBidiFlags as it is no longer used"
2013-03-15 20:39:31 +00:00
Fabrice Di Meglio
da12f389eb Revert "Clean Paint.mBidiFlags as it is no longer used"
This reverts commit 6d9fe5bd22.
2013-03-15 11:26:56 -07:00
Jean Chalard
92291eea07 Merge changes I3109a482,Ia5e25738
* changes:
  Final small cleanup.
  Actually change the place where updateSelection is called
2013-03-12 06:20:59 +00:00
Jean Chalard
79386f4f54 Merge changes Ia01aee85,I17bd91a1
* changes:
  Add a SpanWatcher to catch programmatic selection changes
  Initial refactoring to move updateSelection to a better place
2013-03-12 06:18:39 +00:00
Chet Haase
fbde30877f Merge "add getAlpha() to Drawable" 2013-03-08 23:52:33 +00:00
Chet Haase
b1af7f3d4b add getAlpha() to Drawable
Drawable has setAlpha(int), but no getAlpha() (although some subclasses have added the
method). This makes it more tedious to use the property. For example, animations that wish to
animate this property must explicitly give it a start value since this value cannot be queried
from the object.

The trick is that setAlpha(int) is abstract, only implemented by subclasses. We cannot take this
approach for getAlpha(), as we would break all subclasses of Drawable until they implemented the
method. Instead, we'll add a default method which returns an invalid value, making it easier for
clients of the method to detect whether the value is valid.

All subclasses of Drawble in frameworks have been changed to add an override of getAlpha() when
appropriate.

Issue #7485875 Drawables is missing getAlpha()

Change-Id: I06b6e35f1a56d202838eca44759c85c82595020a
2013-03-08 15:40:28 -08:00
Chet Haase
f287913e4a Merge "Revert "add getAlpha() to Drawable"" 2013-03-08 23:01:17 +00:00
Chet Haase
9f48f3eeae Revert "add getAlpha() to Drawable"
This reverts commit a227f59691

Change-Id: Ic6337b773a2a2302d9d3f84fa9ff9c2324edd2ae
2013-03-08 23:00:02 +00:00
Chet Haase
799f3623db Merge "add getAlpha() to Drawable" 2013-03-08 22:30:04 +00:00
Chet Haase
a227f59691 add getAlpha() to Drawable
Drawable has setAlpha(int), but no getAlpha() (although some subclasses have added the
method). This makes it more tedious to use the property. For example, animations that wish to
animate this property must explicitly give it a start value since this value cannot be queried
from the object.

The trick is that setAlpha(int) is abstract, only implemented by subclasses. We cannot take this
approach for getAlpha(), as we would break all subclasses of Drawable until they implemented the
method. Instead, we'll add a default method which returns an invalid value, making it easier for
clients of the method to detect whether the value is valid.

All subclasses of Drawble in frameworks have been changed to add an override of getAlpha() when
appropriate.

Issue #7485875 Drawables is missing getAlpha()

Change-Id: I3211bb03789282e010356bad92da0a4a9fe9afb3
2013-03-08 14:16:13 -08:00
Svetoslav
e10837f444 [DO NOT MERGE] DatePickerDialog title initially incorrect if calendar view shown.
If the calendar view of the date picker dialog is shown we
do not use a formatted date as the dialog title since the
calendar view shows it, instead we show a static "Set date"
title. However, the initial state of the date picker dialog
on a tablet has a formatted date since the date picker widget
does not do a correct check whether the calendar view is shown
which returns a false negative resulting in a title with a
formatted date being added since the dialog thinks it has no
calendar view.

Change-Id: Ibf4c433b34ab1ee1bc1dc386689664a32283fb6a
2013-03-08 13:31:53 -08:00
Svetoslav
a2510b5aeb DatePickerDialog title initially incorrect if calendar view shown.
If the calendar view of the date picker dialog is shown we
do not use a formatted date as the dialog title since the
calendar view shows it, instead we show a static "Set date"
title. However, the initial state of the date picker dialog
on a tablet has a formatted date since the date picker widget
does not do a correct check whether the calendar view is shown
which returns a false negative resulting in a title with a
formatted date being added since the dialog thinks it has no
calendar view.

Change-Id: Ibf4c433b34ab1ee1bc1dc386689664a32283fb6a
2013-03-08 12:43:50 -08:00
Fabrice Di Meglio
0016420830 am 64ac478f: am 617283c3: Merge "Fix bug #8217354 Suspicious behavior in RTL support for a RelativeLayout" into jb-mr2-dev
* commit '64ac478f45061e57406ab3d83c69bf8988288b41':
  Fix bug #8217354 Suspicious behavior in RTL support for a RelativeLayout
2013-03-07 22:56:25 +00:00
Fabrice Di Meglio
617283c3c0 Merge "Fix bug #8217354 Suspicious behavior in RTL support for a RelativeLayout" into jb-mr2-dev 2013-03-07 22:49:38 +00:00
Jim Miller
3e5105351d Fix keyguard listview widgets for secondary users
This fixes a bug where secondary user widgets weren't being updated
properly because the system was checking for SYSTEM_UID which no
longer works with keyguard in a separate process.  The symptom was an
app with a listview, like Gmail, would always show an empty list for
secondary users.

Change-Id: I3749a7a0b39f1eb7922966af0fbdcefdd804e41e
2013-03-06 17:01:35 -08:00
Jean Chalard
c99d33fb4d Actually change the place where updateSelection is called
Call updateSelection in endBatchEdit instead of onDraw.
This works because all edits go through a batch edit,
which is already the case although the next change will
enforce it going forward.
This is step 3 of a four-step refactoring.

Bug: 8000119
Change-Id: Ia5e257382e2ef2168726bf3d9c7c84f9379ba376
2013-03-05 20:34:09 -08:00
Jean Chalard
baf3094eca Add a SpanWatcher to catch programmatic selection changes
When the selection is set via Selection#setSelection, the
Editor needs to know so that it can call back to a bound
IME, if any. This adds a watcher to catch these events.
This is step 2 of a four-step refactoring.

Bug: 8000119
Change-Id: Ia01aee853d5cafb4820fd234bc24b587ad3f7dd0
2013-03-05 20:34:05 -08:00
Jean Chalard
df7c72f68c Initial refactoring to move updateSelection to a better place
This is step 1 of a four-step change which will move where
updateSelection is called in regular text fields. The new
behavior will be to call it for each actual batch of
changes, instead of doing it in the render loop which leads
to both false positives and true negatives.

Bug: 8000119

Change-Id: I17bd91a129b18d5451fe1d8e7794ae20165de309
2013-03-05 20:26:11 -08:00
Fabrice Di Meglio
844efa911f am 80273c6b: am 5f51fd69: Merge "Make Spinner widget RTL-aware (part 2)" into jb-mr2-dev
* commit '80273c6b5973d7d4d100a35f6646af45a3179740':
  Make Spinner widget RTL-aware (part 2)
2013-03-05 22:29:22 +00:00
Fabrice Di Meglio
b0359666b4 am cc2e3c05: am 8e440a6c: Merge "Improve RTL code for RelativeLayout" into jb-mr2-dev
* commit 'cc2e3c05d2a0f58e67ed00e1ee1f08150d78ffcf':
  Improve RTL code for RelativeLayout
2013-03-05 22:29:19 +00:00
Fabrice Di Meglio
5f51fd6970 Merge "Make Spinner widget RTL-aware (part 2)" into jb-mr2-dev 2013-03-05 22:23:33 +00:00
Fabrice Di Meglio
c44d880c50 Fix bug #8217354 Suspicious behavior in RTL support for a RelativeLayout
- make rules resolution follow the same pattern as padding and other
RTL properties

Change-Id: Ia0f460f188063f950bc311b51765fdec2f96f542
2013-03-05 14:10:23 -08:00
Fabrice Di Meglio
f80ceed450 Make Spinner widget RTL-aware (part 2)
See bug #8159072 Spinner widget should be RTL'ized

Change-Id: I3f9368f242a027852bf13a7ce4b760de1e1c2fb2
2013-03-05 13:12:13 -08:00
Fabrice Di Meglio
d5ffc79fc8 Improve RTL code for RelativeLayout
- instead of passing the screen size as a constant for computing the
layout size in RTL mode, we just use a real constant. Any value would
work actually, as soon as the value would not be null.

Change-Id: If9f5b38afa88938db36a795bfc8a403ad660726b
2013-03-05 13:07:08 -08:00
Philip Milne
a235362152 GridLayout diagnostics.
Add null check for:

https://googleplex-android-review.git.corp.google.com/#/c/183792/

Change-Id: Ic8ef7b6749b6d2568ed4e4b3b1fa4ad6659c70eb
2013-03-05 12:21:43 -08:00