Commit Graph

6014 Commits

Author SHA1 Message Date
Chris Craik
003cc3dec8 Rename DisplayListData to DisplayList
Change-Id: I25f6bb88ffdf9baf7e8e4e2a294aa8c9d2a4605b
2015-10-16 10:38:34 -07:00
Jun Mukai
1db5397d88 Allow changing mouse pointer icon for the current context.
Right now, it only supports I-beam on EditText, but further
rules will come in the future.

The png files for the icons are from chromium.

Bug: 24180385
Change-Id: I8de4ec8a5412b4830c08aa232c5083841c5c751c
2015-10-15 01:47:29 -07:00
Alan Viverette
1aba36d721 Merge "Revert "Reduce CascadingMenuPopup's reliance on internal ListView state"" 2015-10-08 19:54:49 +00:00
Alan Viverette
2ac975deb3 Revert "Reduce CascadingMenuPopup's reliance on internal ListView state"
Introduced some regressions. Reverting until we can do better testing.

This reverts commit 8375d63998.

Change-Id: I9b15d63e52c814ef8985b86f8a50359e39355d39
2015-10-08 19:54:16 +00:00
Alan Viverette
4e91907bf8 am 8a0c8e78: am 6a06f12c: Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams"
* commit '8a0c8e78a7d938288e065b21e78b2de6097b1599':
  Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams
2015-10-07 16:43:11 +00:00
Alan Viverette
3a3fea4fed am 4524278b: am 7de6ae15: Merge "To call TypedArray.recycle() when we are done with the array."
* commit '4524278bcb948196e8a9bfff69a566fce1fdc794':
  To call TypedArray.recycle() when we are done with the array.
2015-10-07 16:43:00 +00:00
Alan Viverette
8a0c8e78a7 am 6a06f12c: Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams"
* commit '6a06f12c3fa6a84306dc17f60eb16cdc25bc34b5':
  Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams
2015-10-07 16:34:35 +00:00
Alan Viverette
4524278bcb am 7de6ae15: Merge "To call TypedArray.recycle() when we are done with the array."
* commit '7de6ae159e0652cabe57ea8814ce8633049644a2':
  To call TypedArray.recycle() when we are done with the array.
2015-10-07 16:34:26 +00:00
Alan Viverette
6a06f12c3f Merge "Frameworks/base: Fix AdapterViewAnimator.createOrReuseLayoutParams" 2015-10-07 16:23:36 +00:00
Alan Viverette
7de6ae159e Merge "To call TypedArray.recycle() when we are done with the array." 2015-10-07 16:22:36 +00:00
Alan Viverette
8375d63998 Reduce CascadingMenuPopup's reliance on internal ListView state
Bundles cascading menu information and stores it in a stack representing
the hierarchy of added menus.

Bug: 23970448
Change-Id: Icc0a96ea2dd4320fd4dae9626435ed82a6165480
2015-10-06 10:40:25 -04:00
Alan Viverette
2b4dc11566 Animate radial time picker selector during hour/minute transition
Also propagates XML attrs from time picker to radial view during
construction, which allows the hour colors & etc. to be changed
inline without needing to set the timePickerStyle theme attribute.

Bug: 20333885
Change-Id: Ib42b9f5b93b5d6ce1dcbaa05f99cef40c9f9a9d3
2015-10-02 15:29:43 -04:00
Toni Barzic
e9889bf372 Forward SeekBarPreference key events to seekBar view
This is to ensure that seek bar progress gets properly updated,
and that progress changes reported by the seek bar are marked as
coming from user.

BUG=24416333
BUG=20049245

Change-Id: I0a48c8eae1528937024ca54720cac91c7d21b0b9
2015-09-30 10:22:06 -07:00
Toni Barzic
7c082caf65 Merge "Mark progress updates from AbsSeekBar.trackTouchEvent as from user" 2015-09-30 17:08:01 +00:00
Seigo Nonaka
f03d7994bd Merge "Reduce the number of TextAppearanceSpan objects for highlighting." 2015-09-30 04:39:26 +00:00
Toni Barzic
deb2ad56ea Mark progress updates from AbsSeekBar.trackTouchEvent as from user
Looks like this one was missed in Iafa32538b4f92705c4c1ca2a02145c078add2532
when setProgress(int, boolean) went from setProgress(progress, fromUser) to
setProgress(progress, animate)

BUG=24416333

Change-Id: Id22f4d67986a24c907f61e22866ae43ffdfe79b8
2015-09-29 15:52:49 -07:00
Alan Viverette
b854d07a1a Unhide PopupWindow.getMaxAvailableHeight(View, int, boolean)
Bug: 24394572
Change-Id: If66fa0178ed0d8c8d78e286a8b928ad88d6e90fa
2015-09-28 16:12:18 -04:00
Oren Blasberg
b8c7ef5eaf Merge "Make context menus show as popup menus." 2015-09-25 21:09:18 +00:00
Oren Blasberg
ed3912692f Make context menus show as popup menus.
This means that right-clicking/long pressing on a view that is registered for
context menu will show the context menu as a popup menu instead.

Bug: 20016398
Change-Id: I96fea60435fff2f981d288521f490f8ff24ada15
2015-09-25 12:01:01 -07:00
Gus Prevas
efca0aa919 am 3197cd36: am 41110261: am b17d1e5e: Merge "Adds an option to override RemoteViews transition." into cw-e-dev
* commit '3197cd36fef11b1fdd59bdd341f65f9f2364ed2a':
  Adds an option to override RemoteViews transition.
2015-09-25 18:59:45 +00:00
Gus Prevas
3197cd36fe am 41110261: am b17d1e5e: Merge "Adds an option to override RemoteViews transition." into cw-e-dev
* commit '41110261bb4f9f733b579b3dc26d3d6de5642ef5':
  Adds an option to override RemoteViews transition.
2015-09-25 18:09:41 +00:00
Gus Prevas
1ed322b123 Adds an option to override RemoteViews transition.
This change adds a configuration option,
"config_overrideRemoteViewsActivityTransition", which is false by
default and true on watches.  If it's true, when a RemoteViews
is clicked, it will use a new attribute on the active window animation
style, "activityOpenRemoteViewsEnterAnimation", to determine
the entry transition to use, instead of the current hard-coded
default.

Bug: 23534750
Change-Id: I91e92804a663ab71a3e46c3430fa579b87cc7931
2015-09-25 13:10:52 -04:00
Oren Blasberg
8f3976c875 Merge "Cascading submenus: Fix a few small issues." 2015-09-24 20:59:44 +00:00
Oren Blasberg
734320d06b Cascading submenus: Fix a few small issues.
1. Open submenus now disappear instantly rather than fading out when
mouse hovers over a non-submenu item.

2. When a submenu is opened on hover, the item that was hovered now
will remain selected instead of being deselected.

3. Fix an issue where if the same chain of submenus was opened more
than once, the submenus could open in a different direction each
time. To fix, we keep track of the direction of opening along the way
and make sure to reset the preferred direction when a submenu is
closed.

Bug: 20127825
Change-Id: I99972cce4ddabe316c5148f1dd79a5d7b3e64b87
2015-09-24 13:36:15 -07:00
Alan Viverette
ed49b02abc Merge "End switch thumb animator if it's been started" 2015-09-23 20:05:35 +00:00
Alan Viverette
ee20d7799f End switch thumb animator if it's been started
Running implies that it's been started and the animation has actually
begun, which is not true if we call start() and then immediately try
to jump state.

Bug: 24273164
Change-Id: I7f8d856dbe925679dad082f1e28d8936ac2b04db
2015-09-23 14:23:21 -04:00
Alan Viverette
9477229fe8 Merge "Smooth progress bar animations" 2015-09-23 14:07:11 +00:00
Alan Viverette
a64ed3bf8c Smooth progress bar animations
Removes smooth progress bar hack from volume dialog.

Bug: 23566299
Change-Id: Iafa32538b4f92705c4c1ca2a02145c078add2532
2015-09-23 10:01:45 -04:00
Alan Viverette
7b9bfaf784 Merge "Add accessor methods for Toolbar title margins" 2015-09-17 14:07:42 +00:00
Oren Blasberg
ca33b3547c Merge "Cascading popup menus: open submenu on mouse hover." 2015-09-16 20:59:11 +00:00
Oren Blasberg
23087be779 Cascading popup menus: open submenu on mouse hover.
When the cascading feature is enabled, users can mouseover a
submenu item in a popup menu to expand and open the new submenu
(after a short timeout). Similarly, if a user mouseovers a
different menu item in the original menu, the submenu gets closed
(again, after a short timeout).

This should complete the implementation of cascading submenu
functionality.

Also fix two other issues:

(1) Update some oudated code in PopupMenu that was still opening
the submenu when a user clicks on a submenu item; this
responsibility now lives within the MenuPopupHelper's delegate
MenuPopup class, so it doesn't need to live in PopupMenu anymore.

(2) Fix an issue where icons would be force-set on a submenu when they
should not be. Instead, decide whether to show icons in a submenu
based on whether to show them in the top level menu, as intended.

Bug: 20127825
Change-Id: Ia46852c7f99436065ab4bc234de94dffc0019666
2015-09-16 13:47:03 -07:00
Alan Viverette
8de78eba5d Merge "Ensure AM/PM buttons are at least 48x48dp" 2015-09-16 19:34:22 +00:00
Alan Viverette
f86bbd04b9 Ensure AM/PM buttons are at least 48x48dp
Also cleans up imports.

Bug: 24057304
Change-Id: I95e8e7c49247bcf51aabcb656d76c0bfa0f0865c
2015-09-16 14:19:21 -04:00
Doris Liu
29a526695a Merge "Fix Spinner not restoring selection when set to GONE" 2015-09-16 16:45:12 +00:00
Alan Viverette
4db9d1b48b Add accessor methods for Toolbar title margins
Also adds missing attrs to public.xml so they can be documented, adds
attr refs to Toolbar class docs. Many accessor methods still missing,
but those can be added in subsequent CLs.

Bug: 23719889
Change-Id: I09eeef65141d4af77c8813e8fac5f89bead47597
2015-09-15 16:21:16 -04:00
Alan Viverette
92539d5c75 Avoid OOBE when AbsListView layout is out of sync with adapter
Views are not synchronized with adapter state until a layout pass
occurs, which may cause an OOBE if a list item is removed and an
accessibility node is obtained before the next layout pass.

This CL caches the item's enabled state on the bound view's layout
params, which allows us to avoid relying on the adapter to populate
accessibility nodes. It also aborts actions if the target position
is no longer valid.

Updates the documentation on AdapterView to reflect that the result
of getPositionForView() may not be synchronized with the adapter.

Bug: 23943664
Change-Id: Ic79eaa2e26bec9cd8d90fdab434271bc4f3d8a68
2015-09-14 10:49:25 -04:00
Doris Liu
b7714ae157 Fix Spinner not restoring selection when set to GONE
This CL restores the selected position when AdapterView
gets restored, rather than wait until the next measure/layout
pass to do it. After the change, even when the AdapterView
is set to GONE (i.e. no measure/layout pass), the selection
will still be kept up to date.

Bug: 23619366

Change-Id: I09a31b6e2a61ca0edf129af8fe634b83784f9167
2015-09-11 18:03:28 -07:00
Alan Viverette
f9a75e1a84 am 7914680e: am 58c483fc: am 62b94c35: Merge "Avoid OOBE when AbsListView layout is out of sync with adapter" into mnc-dr-dev
* commit '7914680e1ec319f50cb99b6c761aace56fc6e3ed':
  Avoid OOBE when AbsListView layout is out of sync with adapter
2015-09-11 23:30:34 +00:00
Oren Blasberg
96b22a98ce Merge "Add Cascading submenus implementation." 2015-09-10 16:58:01 +00:00
Oren Blasberg
8e12f8df07 Add Cascading submenus implementation.
This change adds a new Cascading implementation of MenuPopup. When
enabled, submenus will show up in a cascading side by side fashion
when opened next to popup menus.

Bug: 20127825
Change-Id: Ie3c797fb5dbada7521cd93dc4171950af2be2ff7
2015-09-10 09:54:17 -07:00
Alan Viverette
a84dda54e4 Avoid OOBE when AbsListView layout is out of sync with adapter
Views are not synchronized with adapter state until a layout pass
occurs, which may cause an OOBE if a list item is removed and an
accessibility node is obtained before the next layout pass.

This CL caches the item's enabled state on the bound view's layout
params, which allows us to avoid relying on the adapter to populate
accessibility nodes. It also aborts actions if the target position
is no longer valid.

Updates the documentation on AdapterView to reflect that the result
of getPositionForView() may not be synchronized with the adapter.

Bug: 23943664
Change-Id: I90ca946bead1d87a179eab1c2f482a54bcce9c38
2015-09-10 15:17:11 +00:00
Alan Viverette
ad0020f807 Invalidate when Drawable.setState() returns true
Ensures views that manage drawables follow the contract set forth in
the Drawable.setState() documentation.

Bug: 23792020
Change-Id: I4e5a449cd6535487873fd8443da50555c38e8ed9
2015-09-04 10:10:42 -04:00
Oren Blasberg
b23976efdd MenuPopupHelper: Factor out a MenuPopup interface.
Move much of the responsibility into implementations of this interface.
Delegate functionality to it where appropriate.
Provide a standard (non-cascading) implementation for this interface.

This CL should have NO BEHAVIOR CHANGES.

A follow-up CL will provide a cascading implementation, whereby a
config variable will enable submenus to open side by side with their
parent menus. That CL will be the first with functional/ actual behavior
changes.

Bug: 20127825
Change-Id: Iecac2d340dd8750ebe4e99162d447c9411f09227
2015-09-02 11:52:24 -07:00
Roozbeh Pournader
008d6d034e Merge "Add LocaleList support to Paint and TextView." 2015-09-01 21:14:11 +00:00
Roozbeh Pournader
a23748a9ff Add LocaleList support to Paint and TextView.
This keeps the existing single-locale APIs working (and adds
parameter annotations to them), while adding an API for setting and
getting the whole locale list.  At the moment, the implementation
ignores the actual data in the locale list except for its primary
locale.

Also add a method to LocaleList to return the system's default locale
list. (Currently a one-member list just containing the system
default locale.)

Change-Id: Icea9d164ddae51f50dd71e18b5d91c96f233b8b8
2015-09-01 14:12:40 -07:00
Oren Blasberg
6b49d30034 Merge "Pull out widget helpers into their own classes." 2015-09-01 21:11:04 +00:00
Oren Blasberg
f44d90b5c2 Pull out widget helpers into their own classes.
This is in service of desktop-style submenus. Follow up CLs will make
use of the newly independent classes. MOST of the changes in this CL
are simply moving code from one place to another. Below are
descriptions of the new files added:

DropDownListView:
Decouple this from ListPopupWindow, so other "menu popup"
implementations [forthcoming] may make use of it.
This class is UNCHANGED except for the addition of the
setListSelectionHidden method.

ForwardingListener:
Decouple this from ListPopupWindow, so that other clients of this
listener can expect a more general ShowableListMenu rather than a
concrete ListPopupWindow.  This will be useful later when we want to
use something other than ListPopupWindow to show a menu.
This class is UNCHANGED, except for (1) using the getListView() on
popup rather than accessing its mDropDownList member, and (2)
replacing ListPopupWindow return values with ShowableListMenu.

MenuAdapter:
Decouple from MenuPopupHelper so it may be used by forthcoming "menu
popup" implementations rather than just by MenuPopupHelper itself.
This class is UNCHANGED.

ShowableListMenu:
A new interface to encapsulate a menu that can be shown or hidden.
This will be implemented by both ListPopupWindow and a forthcoming
"menu popup" class.

Bug: 20127825
Change-Id: I565b444d25e966ff8b8c6ceac7be8de56a9116df
2015-08-31 14:29:34 -07:00
Deepanshu Gupta
88db51084b Merge "Switch SimpleDateFormat to icu version" 2015-08-28 15:54:11 +00:00
Alan Viverette
798253e190 Expose password text to accessibility services, if requested
Otherwise, exposes the hint or the result of whatever transformation
method is set. This is consistent with what is displayed visually.

Bug: 23568127
Change-Id: Ib5c7fe78fb3b58feb36f0314638345bd40e401ab
2015-08-27 14:53:48 -04:00
Alan Viverette
bd1d652f37 am 8d8c53df: am 76c73ae4: am 12874d2d: am b9b57225: am 95137857: Merge "Avoid NPE when getPositionForView() is called on detached view" into mnc-dev
* commit '8d8c53df26ac29fa3c6df782eb49e8d50683a1dd':
  Avoid NPE when getPositionForView() is called on detached view
2015-08-26 21:23:45 +00:00