Commit Graph

6438 Commits

Author SHA1 Message Date
Yigit Boyar
1968ffe284 Merge "Invalidate child bounds when AbsListView bounds change" into nyc-dev
am: bb039d2f17

* commit 'bb039d2f17d61b96c88d2cae445a53a642fb421f':
  Invalidate child bounds when AbsListView bounds change

Change-Id: I5d139388bea3610d2e1de2ded48ae7a510d2aba7
2016-05-31 19:26:11 +00:00
Yigit Boyar
bb039d2f17 Merge "Invalidate child bounds when AbsListView bounds change" into nyc-dev 2016-05-31 19:20:21 +00:00
Yigit Boyar
51b5caf902 Invalidate child bounds when AbsListView bounds change
This CL fixes a bug in AbsListView where it was not invalidating
children's bounds when AbsListView's bounds change. This was
triggering bugs where if you set padding on a list view, it would
not resize its children.

Bug: 28800232
Change-Id: I81a4e9ea234c395de80efea5ef5e47a71cb95136
2016-05-27 16:00:22 -07:00
Siyamed Sinir
6fe1ab7f21 Merge "Revert "Fix TextView layout reuse when maxLines is set"" into nyc-dev
am: 990e26118d

* commit '990e26118d5b6cad2d34483b1908ba6f8334a764':
  Revert "Fix TextView layout reuse when maxLines is set"

Change-Id: I543c1944fafb920b697eb87c92cf0d4ae8339e54
2016-05-27 18:50:51 +00:00
Siyamed Sinir
361f03c4e2 Merge "Set StaticLayout.maxLines only when ellipsize is set" into nyc-dev
am: 92d0316d28

* commit '92d0316d2837baceffb22e1a7eb0e5da50f0a025':
  Set StaticLayout.maxLines only when ellipsize is set

Change-Id: I2b0281da1d8aba5f84da01c00f31d79af901db35
2016-05-27 18:45:20 +00:00
Siyamed Sinir
990e26118d Merge "Revert "Fix TextView layout reuse when maxLines is set"" into nyc-dev 2016-05-27 18:34:30 +00:00
Siyamed Sinir
92d0316d28 Merge "Set StaticLayout.maxLines only when ellipsize is set" into nyc-dev 2016-05-27 18:34:30 +00:00
Alan Viverette
99de597c71 resolve merge conflicts of f118700 to nyc-dev-plus-aosp
Change-Id: I6fc2b3d279318c5c34a1f4b2921d3c1eff8ac627
2016-05-27 11:04:59 -04:00
Alan Viverette
34cd48bcd8 Merge "Chronometer: Update the value only if displayed on screen" 2016-05-27 14:18:20 +00:00
Siyamed Sinir
108b013a51 Revert "Fix TextView layout reuse when maxLines is set"
This reverts commit f75775ea7f.

Bug: 28885989
Bug: 28468120
Change-Id: I6fa5401c8a76db1bacc2d8201eece91a3c52b758
2016-05-27 01:37:59 +00:00
Siyamed Sinir
24aba4b9e9 Set StaticLayout.maxLines only when ellipsize is set
A partial revert for the CL I5dbc48a6c7f0f4ac4c693d5c95f0a99b989e07f4.
The mentioned CL tried to always set the maxLines attribute of
StaticLayout. However this caused regressions at certain points.

Bug: 28885989
Bug: 28468120
Change-Id: Ic09cb194c8811a06b5d53de50bfb77938b91b88d
2016-05-26 18:33:33 -07:00
Selim Cinek
38b5946fae Merge "Fixed the relative time spoken with accessibility" into nyc-dev 2016-05-26 22:33:51 +00:00
Selim Cinek
570bfa2768 Fixed the relative time spoken with accessibility
The relative time was unclear for certain locales
and even worse 1m was spoken as 1 meter.

Change-Id: Ie172092da27ea8119906b0c301b5569bf3efabbb
Fixes: 28961667
2016-05-25 18:44:44 -07:00
Siyamed Sinir
e747160509 Merge "Fix TextView layout reuse when maxLines is set" into nyc-dev 2016-05-25 22:03:06 +00:00
Alan Viverette
29c01336db Merge "Fix DatePicker.setMin/MaxDate()" into nyc-dev 2016-05-25 21:17:53 +00:00
Siyamed Sinir
f75775ea7f Fix TextView layout reuse when maxLines is set
When maxLines is set on StaticLayout and the text is wrapped, during
onMeasure TextView couldn’t recognize the wrap in the layout and tried
to reuse the layout which in turn caused width calculation problems.
This CL checks if maxLines is set, and if there is a text cut-off in
order to reuse existing layout.

Bug: 28468120
Change-Id: Ide43df8512a09112715067cbadf29cc64fd53247
2016-05-25 12:01:23 -07:00
Alan Viverette
3fb5c7b8fa Fix DatePicker.setMin/MaxDate()
Previously it would only allow year changes, which... doesn't make sense.

Bug: 28953902
Change-Id: I9b15b96662d9d496e11fb426ff23f14b26e90800
2016-05-25 12:34:55 -04:00
Alan Viverette
cfbca5640c Merge "Use ICU's Calendar class in date picker & related classes" into nyc-dev 2016-05-25 16:20:16 +00:00
Alan Viverette
68763be41c Use ICU's Calendar class in date picker & related classes
Also organizes imports.

Bug: 28756630
Change-Id: I4e59c4b35c88edd94ff4b2945ad9feb2a4bd0022
2016-05-25 11:42:42 -04:00
Seigo Nonaka
7c8305bcfe Merge "Use original theme for SuggestsionsPopupWindow" into nyc-dev 2016-05-25 03:24:11 +00:00
Siyamed Sinir
df9dee869c Merge "setTransformationMethod should reset mTextDir" into nyc-dev 2016-05-20 17:46:27 +00:00
Siyamed Sinir
d55be2b9d5 setTransformationMethod should reset mTextDir
When transformation method is set via API, text direction heuristics has
to be reset since for PasswordTransformationMethod it is set to LTR. Not
resetting it causes inconsistencies with the remaining of the TextView.

Bug: 28562779
Change-Id: I225e35e39bde60d4296852ff17b107d5b7b99f8a
2016-05-19 18:30:38 -07:00
TreeHugger Robot
0676196be2 Merge "Fixed a bug where the chronometer wasn't updating the time" into nyc-dev 2016-05-19 20:39:34 +00:00
TreeHugger Robot
a1e0cebf3a Merge "DO NOT MERGE Rename PointerIcon and Pointer Capture APIs" into nyc-dev 2016-05-19 15:03:36 +00:00
Selim Cinek
a2a0171e7c Fixed a bug where the chronometer wasn't updating the time
When the countdown was set to true and the chronometer was set to
count down it wasn't updating the time, which is now fixed.

Change-Id: I4887d9eb09193c5636070edee9ba1bd13b9a23b5
Fixes: 28829131
2016-05-18 16:59:07 -07:00
Yohei Yukawa
23cbe85610 Move LocaleList to avoid layering violation.
Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
2016-05-17 16:42:58 -07:00
Michael Wright
f9d9ce7705 DO NOT MERGE Rename PointerIcon and Pointer Capture APIs
This is a response to API council feedback.

Bug: 26830970
Change-Id: Ia2d284b5c1ab8365bedfdc37d129be4b8146036b
2016-05-17 18:02:32 +01:00
Seigo Nonaka
e9f54bfde2 Use original theme for SuggestsionsPopupWindow
Some application set textColorPrimary as white, as the result the
suggestion window draws white text on white background.
To avoid this UX, always uses original theme for suggestions popup
window.

Bug: 28371168
Change-Id: I2ef41d162b63a7e277decc2065609a7d43590afe
2016-05-17 13:53:21 +09:00
Alan Viverette
c3e5a82691 Use standalone capitalization for month labels
Bug: 28020439
Change-Id: I85169a78142a43ff2348e0b561a7aa995544a65e
2016-05-16 13:35:56 -04:00
Alan Viverette
c952b035b2 Merge "Remove extra logging in DatePicker" into nyc-dev 2016-05-12 14:57:58 +00:00
Yigit Boyar
1a97cbd4ca Merge changes I6e3f4da2,I8acfbd1a into nyc-dev
* changes:
  Fully detach unused scrap views
  Remove detached headers
2016-05-11 22:32:05 +00:00
Alan Viverette
efb8e576a9 Remove extra logging in DatePicker
Issue seems to be fixed now, don't need the extra logging.

Bug: 27310206
Change-Id: Ibf53d056e9c5144729dae02c72050aebd90e4343
2016-05-11 17:10:13 -04:00
Robert Carr
bf9e17b181 PopupWindow: Be more careful with FLAG_LAYOUT_NO_LIMITS
If we intend to clip to the screen we can't pass NO_LIMITS.
Luckily the default behavior for LAYOUT_IN_PARENT_FRAME is to not
clip to the parent frame, so we don't have to do anything except
update our local flag we use for explicit size calculations.

Bug: 28194524
Change-Id: I1465efce7f5412cf646bccd83e23a4b049f4dbc4
2016-05-10 13:56:21 -07:00
Yigit Boyar
9afbf9ceb7 Fully detach unused scrap views
This CL fixes a bug in list view where an unused
scrap view would stay in temporarily detached
state until it is re-used.
It is an invalid state for a view and to fix
that issue, I've changed AbsListView to fully
detached scrap views at the end of a layout
pass and also treat them as regular new views once
they are re-used after being fully detached.

Bug: 28672259
Change-Id: I6e3f4da29f8cbca32787862402f5c21f674a7145
2016-05-10 10:49:39 -07:00
Yigit Boyar
b742b87a6b Remove detached headers
ListView was leaving header and footer views
in the detached state, which is a problem because
no view should be left in that state after a layout
calculation. This was also causing the view to never
received detached-from-window callback if
the ListView is detached while the header is not
visible.

This CL fixes an issue by traversing fixed views
and removing the ones that match the criteria.
To keep the behavior as similar as possible,
we still do not call startTmpDispatch on
fixed views unless we'll remove them.

Bug: 24490656
Change-Id: I8acfbd1a9d9b8b24c1c4b7692ef82cfe0f4d43a8
2016-05-09 11:45:57 -07:00
Alan Viverette
32f7dab282 Cancel animation and jump to current state if not animating picker
Bug: 28629631
Change-Id: I0e1b3c2f2c774e027f2df8c9ab75c7a89bd2ddb7
2016-05-06 15:31:23 -04:00
Alan Viverette
61c41bf617 Revert "Always assign leftover pixels to last weighted child"
This reverts commit cc26636f08.

Bug: 27690033
Change-Id: Ib7084dd8961cd486de4e6b13e36da7be887b1835
2016-05-05 17:54:36 +00:00
Alan Viverette
cc26636f08 Always assign leftover pixels to last weighted child
Bug: 27690033
Change-Id: Ibee51d49d3f7aa923750ce330df2e1aa2156f2bd
2016-05-04 16:59:38 -04:00
Keisuke Kuroyanagi
be1cd9f5ce Merge "Show drag handles after finishing batch edit if needed." into nyc-dev 2016-05-04 00:22:58 +00:00
Siyamed Sinir
c18009e6dd Merge "Revert "Request re-layout after setText if layout width is 0"" into nyc-dev 2016-05-03 21:22:18 +00:00
Siyamed Sinir
1f575b890e Revert "Request re-layout after setText if layout width is 0"
This reverts commit 375366cb2d. 

Bug: 28523980
Change-Id: Ib4dd00eabaf7b5630b18373cc1d7bec61c0e155d
2016-05-03 20:35:35 +00:00
Keisuke Kuroyanagi
f2f8e65f98 Merge "Adjust touch position for handles using window coordinate." into nyc-dev 2016-05-03 02:29:07 +00:00
Keisuke Kuroyanagi
c6fad96b59 Show drag handles after finishing batch edit if needed.
Drag handles are blocked from being shown if batch edit mode is active
when onPreDraw is called; however, IME can start and end batch edit
mode regardless of onPreDraw timing.
As a result, drag handles are sometimes not shown even if selection is
created and text action mode is started.

With this CL, drag handles are shown after finishing batch edit mode
if the handles were blocked from being shown in the above case.

Bug: 28366507
Change-Id: I7f099d0626bee70a63bb14bc75eefc2551a52d53
2016-05-02 15:11:41 +09:00
Alan Viverette
2a993b4f6d Maintain internal consistency for TimePickerClockDelegate hour
Hour was not updated correctly when a new hour was selected using the
radial picker or when AM/PM was changed, which prevented programmatic
calls from working.

Bug: 28398738
Change-Id: I0c1ffd9f9e569d980e72e74dc62568a56930afc4
2016-04-28 12:56:09 -04:00
Clara Bayarri
adde076fcb Merge "Fix ListView losing scroll position" into nyc-dev 2016-04-28 09:20:47 +00:00
Keisuke Kuroyanagi
e2a3b1edd9 Adjust touch position for handles using window coordinate.
Touch position is adjusted in HandleView#onTouchEvent to snap to
ideal offset.
Previously, screen coordinate was used for input, but window
coordinate is used for the ideal offset. As a result, window adjusted touch
position will be adjusted to improper position and a handle being
dragged will get moved to unintended line.

Bug: 22308836

Change-Id: I4a5a3cc695a874c85aa341f06ffcba8b7f5e318c
2016-04-28 12:55:18 +09:00
Alan Viverette
fea4013499 Always account for divider height when calculating list height
List items are always positioned using the divider height, even if there
is no divider drawable, so we should account for that when calculating
list height.

Bug: 28402970
Change-Id: I14b8d3b04a369749ff4b7e6f1e6e003ac08f6b7f
2016-04-27 16:31:33 -04:00
Phil Weaver
7a61d6031b Merge "Fix crash with a11y set text with text filters." into nyc-dev 2016-04-27 16:49:27 +00:00
Andrei Stingaceanu
cf38110526 Fix ListView losing scroll position
Restrict restoring the selected position when AdapterView
gets restored for Spinner instances only.

Bug: 26991402
Bug: 23619366
Change-Id: Ib002eac5ed0b8810a3e9988ad36f03450cb03b9b
2016-04-27 11:29:26 +01:00
Phil Weaver
6dde7e75e8 Fix crash with a11y set text with text filters.
A text filter may shorten the text, so we need to use the text
that's actually in the View, not the text we requested, to move
the selection.

Also removing the override of performAccessibilityActionInternal,
which should have been done as part of adding text actions initially.

Bug: 28253708
Change-Id: I184f49dcba0238f4ccc222597cefca258393b263
2016-04-26 17:01:29 -07:00