Commit Graph

6332 Commits

Author SHA1 Message Date
Alan Viverette
d6d9a94f80 Refresh views on DayPicker appearance changes
Bug: 28023419
Change-Id: Ie64face1d2a1be7f7be5814b60ed6d803f82d1e9
2016-04-06 16:01:00 -04:00
Svetoslav Ganov
f13f14ef30 Merge "Remove unusable a11y APIs for ClickableSpans." into nyc-dev 2016-04-06 02:05:42 +00:00
Kirill Grouchnikov
12454dcab1 Merge "Return correct unfocused month date color for pre-Material themes." into nyc-dev 2016-04-05 21:48:32 +00:00
Kirill Grouchnikov
7cf1586ce4 Return correct unfocused month date color for pre-Material themes.
Also deprecate setter / getter for showWeekNumber field.

Bug: 28022795
Change-Id: Ie0c33353f76c2a3d9666959a07f6809b7b85183f
2016-04-05 17:42:34 -04:00
Alan Viverette
9d8ec0f12e Merge "Rewrite popup window positioning algorithm" into nyc-dev 2016-04-05 16:29:08 +00:00
Kirill Grouchnikov
bbcf4327d2 Merge "Add a hidden test-only API to get Toolbar's navigation view." into nyc-dev 2016-04-05 14:54:48 +00:00
Keisuke Kuroyanagi
a46be16612 Merge "Fix: Selection handle behavior in scrolled TextView." into nyc-dev 2016-04-05 09:24:08 +00:00
Keisuke Kuroyanagi
a1a56ed09c Merge "Stop automatically creating action mode in FS extracted mode." into nyc-dev 2016-04-05 07:50:47 +00:00
Keisuke Kuroyanagi
b1b8865017 Fix: Selection handle behavior in scrolled TextView.
When dragging a selection handle, it moves to strange position in
scrolled TextView because scroll position isn't took into account.
This issue was introduced by rebase mistaking in
I2a7e87ad08416f4bd01a5f6.

Bug: 28008281
Change-Id: I6217483fcc0b9a7e661f02a1f276114ddd5031a4
2016-04-05 16:26:16 +09:00
Phil Weaver
72fde85f7f Remove unusable a11y APIs for ClickableSpans.
This change essentially backs out ag/683646, which added an API to click
on ClickableSpans within a TextView. This API has the flaw, however,
that ClickableSpans are not parcelable, so they are not in general
reported to AccessibilityServices. That means that services will have no
idea what they are activating.

Since the API is not usable end-to-end, I'm backing it out before the
API is final.

Bug: 17726921
Change-Id: I541c6218f2899ff67a6b32a13fd9ae6f3b53b3c4
2016-04-04 18:37:32 -07:00
Yohei Yukawa
807c3a828b Merge "Unhide View#dispatch{Start,Finish}TemporaryDetach()" into nyc-dev 2016-04-05 00:05:09 +00:00
Kirill Grouchnikov
67960a0a55 Add a hidden test-only API to get Toolbar's navigation view.
Change-Id: I15d4d9ac7ea77ff260bccdfb9d82c85a7bafdfab
2016-04-04 16:30:02 -04:00
Alan Viverette
9125fbacd8 Rewrite popup window positioning algorithm
- Avoids scrolling to display anchored popup menus
- Reverts interpretation of mClipToScreen

Bug: 27875726
Bug: 27998829
Bug: 27949042
Change-Id: I8335c8e60b96d59611268fce689ce78f337ff1c7
2016-04-04 15:07:18 -04:00
Phil Weaver
7eb716c0f4 Merge "Make a11y text navigation by page symmetric." into nyc-dev 2016-04-04 16:37:05 +00:00
Phil Weaver
2bf5f20a2b Merge "Support SET_TEXT for editable text views." into nyc-dev 2016-04-04 16:36:35 +00:00
Phil Weaver
d4a1932608 Merge "Add accessibility window title and anchor." into nyc-dev 2016-04-04 16:36:01 +00:00
Keisuke Kuroyanagi
0fd28c9f02 Stop automatically creating action mode in FS extracted mode.
With Ic025c109539c3b59638, selection action mode is always started
when there is a selection.  This makes it impossible to extend
selection using selection mode.
This blocks creating action mode when full screen extracted mode is
started with selection, but it's same as MNC's behavior.

Bug: 27988877
Change-Id: I9614cb16373029189bfc098b6c1d353326e6b518
2016-04-04 17:43:06 +09:00
Keisuke Kuroyanagi
fc1d11ed9d Merge "Make hasTransientState be true only if user created selection is active." into nyc-dev 2016-04-04 03:12:32 +00:00
Jorim Jaggi
e6e108e0eb Launch everything from the shade in full-screen stack
Bug: 27864383
Change-Id: I2925661f1c325f4385876188a5866ab6b57a8f19
2016-04-01 22:17:58 +00:00
Alan Viverette
1722613b0c Merge "Fix default gravity value for FrameLayout.LayoutParams" into nyc-dev 2016-04-01 18:26:51 +00:00
Alan Viverette
228137fa26 Merge "Refactor DatePickerDialog constructors to avoid early callback" into nyc-dev 2016-04-01 18:22:20 +00:00
Alan Viverette
bd53c98985 Fix default gravity value for FrameLayout.LayoutParams
Sets default gravity value to the aptly-named DEFAULT_CHILD_GRAVITY.

Also cleans up FrameLayout lint warnings, annotations, and whitespace.

Bug: 27576632
Change-Id: I457b13791ff85f2228e61e85e44a502a28439e01
2016-04-01 13:50:28 -04:00
Alan Viverette
a1009c28cc Merge "Clean up ArrayAdapter lint warnings and annotations" into nyc-dev 2016-04-01 17:24:17 +00:00
Alan Viverette
a9a75f506e Refactor DatePickerDialog constructors to avoid early callback
Bug: 27475444
Change-Id: I2536f969ca734f3977163305c1d33ee0e2e222fc
2016-04-01 13:22:10 -04:00
Adam Powell
991989f318 Merge "Revert "Only call Drawable.setVisible(false) for visible outgoing drawables"" into nyc-dev 2016-04-01 15:41:04 +00:00
Alan Viverette
9e623b64b9 Clean up ArrayAdapter lint warnings and annotations
Refactoring only, no code changes.

Change-Id: Ia384a6597c9af84d23aed481f84d67ae817b4ac7
2016-04-01 10:11:25 -04:00
Keisuke Kuroyanagi
183fd5071e Make hasTransientState be true only if user created selection is active.
Previously, hasTransientState returned true even when TextView has a
selection that hasn't been created by the user. This unnecessarily
prevents the TextView from being recycled.
This issue was introduced by Ib454b0fbbc2c2f8d198, which fixes that
setHasTransientState(true) is not always coupled with
setHasTransientState(false).

With this CL:
hasTransientState will get true when selection action mode is started.
hasTransientState will get false when selection is removed.
Note that hasTransientState intentionally continues to be true when
selection action mode is terminated with preserving selection.

Bug: 27913323
Change-Id: I960ddfd7221caeb676c23926af06a8a415dec288
2016-04-01 15:00:53 +09:00
Yohei Yukawa
24df931e9e Unhide View#dispatch{Start,Finish}TemporaryDetach()
In order to fix Bug 18920212, we have to track when a View enters
temporarily detached state and when it exits from that state. To do
that, ListView needs to use View#dispatchStartTemporaryDetach() instead
of directly calling View#onStartTemporaryDetach() because there is no
guarantee that existing applications have internally followed Call-Super
pattern.

With this CL, we are going to expose temporary detach state and its
dispatching methods as public APIs.  Major changes are:
  1. ListView's indirect children will start receiving temporary
     dispatch callbacks. Previously only direct children have received
     View#on{Start, Finish}TemporaryDetach() callbacks.
  2. TextView can no longer assume that ListView never calls
     View#View#dispatchStartTemporaryDetach() but directly call
     View#onStartTemporaryDetach() instead. See the commit message
     of [1] for details.

This also enables us to do the following fixes, which will be handled in
subsequent CLs.
  A. ViewCompat support lib is finally able to rely on temporary
     dispatch mechanism without reflection.
  B. InputMethodManager is now able to ignore focus-in events from
     temporarily detached Views. This will be done in the next CL [2].

  [1]: a440b002aa
  [2]: Ia79bbd8468f768d546354382b47b39dd31ef7bb5

Bug: 18920212
Bug: 27905921
Change-Id: If8f780f8b71754f7533a65097304113ae1f5cf12
2016-03-31 17:15:23 -07:00
Adam Powell
4b2e12cc9e Revert "Only call Drawable.setVisible(false) for visible outgoing drawables"
This reverts commit 35e2ea0203.

This patch was based on two different wrong assumptions.

Bug 27822069

Change-Id: I20b1017f91f3fce3c23dd8446459d6f3e3150a48
2016-03-31 15:36:18 -07:00
Roozbeh Pournader
1a08865d1f Merge "Invalidate TextView after locale change" into nyc-dev 2016-03-31 19:37:55 +00:00
Roozbeh Pournader
fafb7575c7 Invalidate TextView after locale change
Bug: 19294390
Change-Id: Ie0f08ab84b386ef6daa2570ea4d5203a04763b06
2016-03-31 11:23:00 -07:00
Yohei Yukawa
f6f0f5fbe9 Merge "Add IC#closeConnection()." into nyc-dev 2016-03-30 21:55:31 +00:00
Yohei Yukawa
9f9afe526d Add IC#closeConnection().
It turns out that BaseInputConnection has still depended on a private
API named BaseInputConnection#reportFinish(), which was introduced
4 years ago to work around a UI freeze due to an unbalanced batch edit
count [1].  Note that such an unbalanced batch edit count cannot always
be avoidable.  It can easily occur in the following situations.
 - The current IME crashed during batch edit.
 - The user changed the View focus during batch edit.
 - The current IME called IMM#switchToNextInputMethod() during batch
   edit.

The remaining problem is that #reportFinish() is still an internal API
and only subclasses of BaseInputConnection can implement it, and IMM
calls it when and only when the current InputConnection is
BaseInputConnection or its subclass.  InputConnectionWrapper and any
other InputConnection implementations will never receive such a callback
to clean up InputConnection#{begin, end}BatchEdit(), which is considered
to be a major contributor to UI freeze.

To address the above issue, we unhide BaseInputConnection#reportFinish()
as InputConnection#closeConnection() so that application developers can
receive an appropriate callback to clean up internal state including
unfinished batch edit.

  [1] I5525d776916f0c42d5e6d4a4282aed590d7f0e9a
      9d69ecbf61

Bug: 24688781
Bug: 25332806
Change-Id: I234309c5880c9fe0b299b8bd0f8862796d4dda0d
2016-03-30 12:03:51 -07:00
Yigit Boyar
7de3b2d898 Merge "Multiple fixes in ScrollView and HorizontalScrollView" into nyc-dev 2016-03-30 17:51:55 +00:00
Alan Viverette
a3a3f35e8d Merge "Pull weekday names directly from ICU" into nyc-dev 2016-03-30 13:35:18 +00:00
Siyamed Sinir
d225f87ebc Merge "Revert "TextView setText/append methods set movement method"" into nyc-dev 2016-03-29 23:59:15 +00:00
Siyamed Sinir
6ffb0a6818 Revert "TextView setText/append methods set movement method"
This reverts commit 4ba0aa598e.

Change-Id: I7d6eb2584a1348014ce9c3fc3e53b4cf96e30db1
2016-03-29 21:43:27 +00:00
Adam Powell
679be2d6c4 Add contentInsetStartWithNavigation/EndWithActions
Allow developers to set different content insets on toolbars and
action bars to be used when navigation buttons or menu actions are
present. Set the default values for these according to the material
spec.

Bug 19317855

Change-Id: I13e04e1f19f0982bf551a3027eb70904d6b4674c
2016-03-29 14:24:15 -07:00
Alan Viverette
11c041576d Merge "Always use existing PopupWindow dimension if not otherwise specified" into nyc-dev 2016-03-29 20:35:59 +00:00
Alan Viverette
b91d6d06b8 Always use existing PopupWindow dimension if not otherwise specified
Removes mPopupWidth/Height, which have been moved entirely into the
width and height of the LayoutParams.

Bug: 27878812
Change-Id: Id9fe99c7d57d5c15c7fe10ea95d97be562301a8e
2016-03-29 14:55:04 -04:00
Yigit Boyar
115a6f4d77 Multiple fixes in ScrollView and HorizontalScrollView
* Fixes a bug in HSV where it was not using unspecified measurement hint
* Fixed a bug in SV where it was ignoring padding and margin when
specifying measurement hint.
* Fixes a bug in both where padding/margin were not taken into account
when re-mausing for fill viewport.
* Fixes a bug in both where the ViewGroup's padding was ignored when
measureChild is called.

Bug: 27602908
Change-Id: I15cb942e0fc2ef39c753ff35d36e1d007f4e05a8
2016-03-29 17:19:50 +00:00
Alan Viverette
d5c85c824b Pull weekday names directly from ICU
Also adds more debug logging to setMonthParams().

Bug: 27238545
Change-Id: Ib7a0685a54a560bbfffee72455aafcd85c07eb2d
2016-03-29 11:44:32 -04:00
Phil Weaver
396d549113 Add accessibility window title and anchor.
Plumbing through the title of windows so support multiwindow
accessibility.

Adding ability to determine the anchor of a pop-up window so the pop-up
can be traversed as part of its anchor.

Bug: 27687627
Bug: 8449376

Change-Id: I59e98a29fb90029407a26de5bf3d900fed5dd627
2016-03-29 08:41:09 -07:00
Siyamed Sinir
eb90e4406f Merge "Update get/setFontFeatureSettings JavaDoc" into nyc-dev 2016-03-28 23:16:20 +00:00
Siyamed Sinir
0925f40372 Update get/setFontFeatureSettings JavaDoc
Add CSS font-feature-settings URL to get/setFontFeatureSettings method
JavaDoc in both TextView and Paint.

Bug: 27857640
Change-Id: I8c20068801032407d493e4f4a15b89dcf35949d2
2016-03-28 16:14:46 -07:00
Yigit Boyar
e0827355a5 Merge "Recover focus on size change in ListView" into nyc-dev 2016-03-28 19:10:08 +00:00
Yigit Boyar
0363341f6c Recover focus on size change in ListView
This CL fixes a bug in ListView where if items are not selectable,
not focusable(in terms of ListView flags) but get focus (because
they can), ListView would not recover the focus properly although
it would make the child visible.

The major issue seems like AbsListView marks data set changed when
the list resizes. It seems like a workaround for some other issue
and the code is from 2009 so instead of changing it, I've decided
to implement a workaround to minimize the potential of breaking
something else.

Bug: 27488391
Change-Id: I5babd00e97bba7cb8cc9cfd0697ef79dfae12b97
2016-03-28 10:09:22 -07:00
Keisuke Kuroyanagi
1e632ba426 Merge "Improve selection handle behavior for bidi text." into nyc-dev 2016-03-28 06:06:02 +00:00
Alan Viverette
6acf2f909b Clean up popup window positioning
- Only move the popup above the anchor when necessary
- Adjust the y position when displaying the popup above the anchor
  rather than changing the popup gravity
- Reduce popup height if it's still too large after repositioning

Bug: 27819843
Change-Id: I1ecc235816a61b9431568a34d3116e286e092c11
2016-03-24 17:11:37 -04:00
Alan Viverette
f50df4362a Ensure correct width and height are used during popup positioning
Passes the width and height into findDropDownPosition() rather than
relying on global state. Ensures that an update is forced if any
aspects of the LayoutParams are changed during drop down position
computetion. Cleans up method and argument naming.

Bug: 27819843
Change-Id: Id85e2a0e81e0ea6a754dadf7c1d1c2493a5979b0
2016-03-24 14:08:24 -04:00