Commit Graph

4751 Commits

Author SHA1 Message Date
Alan Viverette
aa33a487c8 Merge "Always update date picker position after change in range" into lmp-mr1-dev 2014-11-05 00:00:52 +00:00
Alan Viverette
5ecbfeb38b Always update date picker position after change in range
BUG: 18204507
Change-Id: Id3ae11cdb68f60901a3145ebd93f3acbbccd71d2
2014-11-03 18:31:36 -08:00
Deepanshu Gupta
5ad076396c am cd5f3bab: Merge "Use the right layout for inflating Action Bar." into lmp-dev automerge: 84a89ed
* commit 'cd5f3bab37ef1dc041489f53f565416d295916d9':
  Use the right layout for inflating Action Bar.
2014-11-04 01:08:23 +00:00
Adam Powell
d8c941ff46 Merge "Don't update OverScroller fling state if no time has passed since start" into lmp-mr1-dev 2014-10-31 23:42:43 +00:00
Adam Powell
311506afbb Don't update OverScroller fling state if no time has passed since start
If no time has passed when we try to update fling state, skip the
update computation since there is nothing to do.

Fixes a bug where we could return NaN from
OverScroller#getCurrentVelocity.

Bug 17700698

Change-Id: I65042d4d26a29593f66781b58456c2d1e85381c6
2014-10-31 14:03:01 -07:00
Svetoslav
b1ecf0d776 Merge "Adding APIs to enable apps to influence accessibility traversal." into lmp-mr1-dev 2014-10-31 19:53:32 +00:00
Svetoslav
6c70290ff0 Adding APIs to enable apps to influence accessibility traversal.
Accessibility focus is a token that can be put on any view and is
entirely controlled by accessibility services which decide whether
to put accessibility focus on a given view and what the traversal
strategy is.

Currently accessibility service use the view tree structure for
traversal which does not always reflect the logical order and the
user experience is sub-optimal. In such cases apps should be able
to influence how they are traversed for accessibility.

This change adds the notion of an accessibilty traversal order.
If a view has next in the traversal, an accessibility service has
to traverse the content of this view before traversing the content
next one.

This change will enable accessibility service to move away from
using the view tree and use spatial location of the content while
app developers can also influence the treversal order.

bug:17319923

Change-Id: Ib67ae4577f30b2c96575c71538dc1afdea08bfd3
2014-10-30 16:55:53 -07:00
Deepanshu Gupta
0bffc736e1 Use the right layout for inflating Action Bar.
The choice of Action Bar layout depends on the theme. This also affects
the widget used to render the Action Bar.

Bug: http://b.android.com/77853
Change-Id: I6219a02853b4cd207a6125a5ed96fa5d16699460
2014-10-30 11:58:37 -07:00
Alan Viverette
f7dee54b62 Only draw AbsListView selector when focused or pressed
BUG: 18176135
Change-Id: Ibd9d9c0f439e5daa8eba606abc5ff055a3d8ff0c
2014-10-30 11:26:29 -07:00
Chris Banes
e436cb39da Merge "Fix ActionMenuView vertical alignment of items" into lmp-mr1-dev 2014-10-30 08:42:37 +00:00
Alan Viverette
d739d7bd8a Ensure ImageView.setImageResource() always resolves Drawable
Fixes no-op on method call after configuration change at the expense
of removing a micro-optimization that wasn't really needed.

BUG: 18178233
Change-Id: I36eccf91b138e4bed34be96d9b87200edeb66938
2014-10-29 17:26:37 -07:00
Alan Viverette
4e7c562c43 Merge "Update drawable state after updating tint list" into lmp-mr1-dev 2014-10-29 22:20:18 +00:00
Alan Viverette
66c0adcfd4 Merge "Ensure accessibility focus rect is drawn correctly" into lmp-mr1-dev 2014-10-29 22:05:05 +00:00
Alan Viverette
d513379239 Update drawable state after updating tint list
BUG: 18155988
Change-Id: Ic536027a54c10b2082fbc22476530165b76e2c59
2014-10-29 19:46:54 +00:00
Alan Viverette
7a0ae7ed31 Merge "Add content description to Toolbar collapse button" into lmp-mr1-dev 2014-10-29 18:00:12 +00:00
Chris Banes
1970cfd4ef Fix ActionMenuView vertical alignment of items
BUG: 18066203
Change-Id: I2a34f5b8b33e1e0f32c54acf79b281290fc047f1
2014-10-29 11:04:49 +00:00
Alan Viverette
85085343b3 Add content description to Toolbar collapse button
BUG: 17722111
Change-Id: If6caa8bc61b0d178648952c419591380f4edf4ba
2014-10-28 16:42:24 -07:00
Alan Viverette
4bf9edfc1f Merge "Update drag-to-open menu close behavior" into lmp-mr1-dev 2014-10-28 22:45:33 +00:00
Alan Viverette
632af84924 Ensure accessibility focus rect is drawn correctly
Reverts previous change that draws it as part of View.draw() and ensures
that the display is always redrawn if a view has accessibility focus.
Correctly removes focus from views with accessibility focused ancestors.

Also reverts the focus indicator to use a solid line since the dotted
line looked janky.

BUG: 17675993
Change-Id: I25718334cc1ae1c2cd19d3c23af1c18c6a67504c
2014-10-28 20:57:47 +00:00
Alan Viverette
e5d27a22a6 Merge "Play CLICK sound effect when compound buttons are clicked" into lmp-mr1-dev 2014-10-28 00:57:11 +00:00
Alan Viverette
d4e7790fee Play CLICK sound effect when compound buttons are clicked
Also plays the sound effect when the switch changes state as a result
of dragging, since that's effectively the same as the click action.

BUG: 16308311
Change-Id: Ic187ece2a8190082617f5ac7aaf05c3511fa80b5
2014-10-27 17:50:51 -07:00
Alan Viverette
99b4e85073 Update drag-to-open menu close behavior
Menu now closes if the user opens using long-press and then lifts their
finger when touching outside of the menu. This is consistent with the
normal drag-to-open interaction model.

BUG: 16352041
Change-Id: I06aafae7b702ef44000ed19707c46e2bb595095e
2014-10-27 16:42:26 -07:00
Alan Viverette
384755230c Merge "Fix min/max date range in DatePicker calendar mode" into lmp-mr1-dev 2014-10-27 23:16:26 +00:00
Svet Ganov
b32f04b785 Merge "Printing from two apps at the same time not working." into lmp-mr1-dev 2014-10-25 00:16:58 +00:00
Svet Ganov
99a82437ed Printing from two apps at the same time not working.
When printing from two apps at the same time the second print UI is
getting stuck. There were a couple of issues here:

AdapterView was not notifying for item selection if the data changes
after scheduling a dalayed selection notification and the notification
execution. The code assumed that a layout pass will occur and posponed
the notification after the layout pass but it is not guaranteed that
such a layout pass will occur. Now we delay only if a layout pass is
being scheduled.

Also when binding to the PDF rendering service the print spooler was
using the same intent and as a result two print activites were getting
the same renderer instance while they should get separate ones. Now
we use different data in the intent to ensure we get separate renderer
instances.

Change-Id: I6aa7c7b041957804b4273549dd837a6d70064efc
2014-10-24 17:02:32 -07:00
Alan Viverette
50eb025c2f Fix min/max date range in DatePicker calendar mode
Also cleans abstraction of various day/year pickers and adapters.

BUG: 18104457
Change-Id: Ifde664788d8123a3123303940bac63c1350c2cd7
2014-10-24 14:37:29 -07:00
Alan Viverette
1ac52667ee Merge "Add support for Explore by Touch to RadialTimePickerView" into lmp-mr1-dev 2014-10-24 20:36:33 +00:00
Alan Viverette
ffb46bf295 Add support for Explore by Touch to RadialTimePickerView
Also adds IntArray, which is like LongArray for integers, and prevents
the AM/PM label text in the time picker header from wrapping.

BUG: 17468036
Change-Id: I7120089885709f23e20368927e4b3ed9db2e5393
2014-10-24 12:06:11 -07:00
Jason Monk
104d2484ec Merge "Show screen pinning toasts on all users" into lmp-mr1-dev 2014-10-24 13:55:55 +00:00
George Mount
82fd842827 Merge "Protect against ImageView changing to a null Drawable during Transition." into lmp-mr1-dev 2014-10-23 21:46:54 +00:00
Alan Viverette
daf33ed853 Swap names for clock delegates so they are correct
Change-Id: Ic11affae802f0afe4746f65f0b96979a7c5a9c0a
2014-10-23 13:34:17 -07:00
Jason Monk
a585268aff Show screen pinning toasts on all users
Bug: 17657660
Change-Id: I964a210e7fb105e9494a7ab7f383aa9d141ba136
2014-10-23 14:12:19 -04:00
Svet Ganov
d8bc6677e5 Merge "Optimize text rendering in accessibility mode." into lmp-mr1-dev 2014-10-23 01:55:44 +00:00
Alan Viverette
e8f676c0e5 Merge "Use correct smooth scroll default duration" into lmp-mr1-dev 2014-10-23 01:29:06 +00:00
Alan Viverette
183cef06df Merge "Ensure AdapterView doesn't post selection notifications forever" into lmp-mr1-dev 2014-10-23 00:04:09 +00:00
Alan Viverette
3b415e41cc Use correct smooth scroll default duration
BUG: 18092378
Change-Id: I503677129edb647b7970b4e39a175289d5798e1b
2014-10-22 16:19:57 -07:00
Wale Ogunwale
d0aae5a222 Merge "Fix issue #17789629: PopupWindow overlaps with navigation bar." into lmp-mr1-dev 2014-10-22 22:17:19 +00:00
Wale Ogunwale
393b1c1e88 Fix issue #17789629: PopupWindow overlaps with navigation bar.
The Lollipop release introduced a feature that allowed
apps to extend under the navigation bar. This also means
any popup window that is anchored to the bottom of its
parent window will overlap with the navigation bar if the
parent window is extending underneath the navigation bar.

This change introduces a new window flag
(FLAG_LAYOUT_ATTACHED_IN_DECOR) that allows the app to
specify if the popup window should be attached to the decor
frame of the parent window thereby avoiding an overlap
with the screen decorations.

By default the flag is set on SDK version LOLLIPOP_MR1 or
greater and cleared on lesser SDK versions.

Also, replaced flags FLAG_NEEDS_MENU_KEY and
PRIVATE_FLAG_NEEDS_MENU_KEY_SET with needsMenuKey state
variable to make room for the new
FLAG_LAYOUT_ATTACHED_IN_DECOR flag.

Bug: 17789629
Change-Id: I2150e0c6ac688c966c0e8f7e54d42fd20285bea6
2014-10-21 12:45:53 -07:00
Alan Viverette
3d52809bad Merge "Prevent excessive accessibility announcements in TimePicker" into lmp-mr1-dev 2014-10-21 18:16:25 +00:00
Alan Viverette
a496ba5552 am e61519b4: am 15e7b2ac: Merge "Translate compound button drawable by scroll position" into lmp-dev
* commit 'e61519b4a541a4262389842ae8b72dac401b2199':
  Translate compound button drawable by scroll position
2014-10-18 00:32:17 +00:00
Alan Viverette
b95c336d78 Translate compound button drawable by scroll position
BUG: 18028674
Change-Id: Iaba848642b87f0d134c6a6c57e5756d883e45904
2014-10-17 17:19:12 -07:00
Alan Viverette
26c563b051 Prevent excessive accessibility announcements in TimePicker
This is not a complete solution, and it's still awkward to use for
actually setting the time using the radial time picker. Better
software keyboard support and explore-by-touch CLs are still pending.

BUG: 17994166
Change-Id: Ia2871840a13cb00c140f7f2ab07fe03371acab2f
2014-10-17 12:49:16 -07:00
Alan Viverette
0db6536190 Merge "Update AM/PM selectors for clock face TimePicker" into lmp-mr1-dev 2014-10-16 23:48:38 +00:00
Alan Viverette
b4a29247ff Merge "Set content description on CalendarView day labels" into lmp-mr1-dev 2014-10-16 01:07:04 +00:00
Alan Viverette
0511023432 Merge "Document Toolbar's vertical alignment strategy" into lmp-mr1-dev 2014-10-16 00:46:24 +00:00
Alan Viverette
29632521c3 Add style support to PopupMenu, clean up constructor javadoc
BUG: 18002523
Change-Id: Ice492686b814460248ccbe9727c64dd002e7ed7a
2014-10-15 17:19:30 -07:00
Alan Viverette
ef71947fd3 Set content description on CalendarView day labels
BUG: 17985867
Change-Id: I64fa9c757504fe7aebd8d5b7576ebe57e3a3e3fd
2014-10-15 14:16:41 -07:00
Alan Viverette
67945c11a5 Update AM/PM selectors for clock face TimePicker
The selectors are now CheckedTextViews, which makes more sense when
using a screen reader.

BUG: 17468036
Change-Id: I09c62a08172a710faa8fb7ed2bf99a66331e5701
2014-10-15 13:20:54 -07:00
Svet Ganov
9e1c67e861 Optimize text rendering in accessibility mode.
In accessibility mode when iterating over the text of a TextView we
use the selection to keep track of the current position. Consequentally,
if the text of a TextView does not support selection we change the text
to Spannable. Doing that has performance cost. While we need selection
support before we used to convert the text to Spannable even if we do
not need to. Now this transformation happens only when the user decides
to traverse the text which is very rare as opposed to doing this for
every TextView.

bug:17491082

Change-Id: Id7e82e01034e439b5d34133b9350a4efc4d19d4a
2014-10-14 08:53:37 -07:00
Alan Viverette
157afde397 Document Toolbar's vertical alignment strategy
BUG: 17526065
Change-Id: I78fdd8da225c33971985d3941f54624b20248409
2014-10-13 17:25:26 -07:00