Commit Graph

4515 Commits

Author SHA1 Message Date
Alan Viverette
5134478151 Add public attributes for TimePicker styling
BUG: 11218747
Change-Id: Ifdf981280ebe20a9066f219c9a4505d0d7486b2e
2014-07-17 04:36:11 +00:00
Chris Craik
62cc377c03 Merge "Avoid arc for edge effect drawing." into lmp-dev 2014-07-15 20:46:43 +00:00
Chris Craik
8eeb729cf2 Avoid arc for edge effect drawing.
b/16131698

Tessellation doesn't support joins, which filled arcs have.

Change-Id: I566d0c1c39f058bb641aa24d2a4488b0aaa1b454
2014-07-15 15:36:32 -07:00
Fabrice Di Meglio
bd9152f6ee Update DatePicker widget and its related dialog
- the old DatePicker widget is still there for obvious layout compatibility reasons
- add a new delegate implementation for having a new UI
- use the new delegate only for the DatePickerDialog (which does not need to be
the same)
- added support for Theming and light/dark Themes
- added support for RTL
- added support for Accessibility
- verified support for Keyboard
- verified that CTS tests for DatePicker are passing (for both the legacy and the
new widgets)

Also added a new HapticFeedbackConstants.CALENDAR_DATE and its related code for
enabling day selection vibration

Change-Id: I256bd7c21edd8f3b910413ca15ce26d3a5ef7d9c
2014-07-15 20:26:21 +00:00
Alan Viverette
49a22e8202 Add window elevation for dialogs, clean up surface insets API
BUG: 13211941
Change-Id: I9d605d0b2fb24f9bf8e73fbecd520b6b52ae5751
2014-07-14 23:13:28 +00:00
Alan Viverette
1dada3da99 DO NOT MERGE Remove sub-position scroller
BUG: 14477472
Change-Id: I019c58dedb383e9e906831c8e44bab8b88e92604
(cherry picked from commit 66072fe0e1494a851e54bc7756734141dfbf4fe0)
2014-07-14 19:03:43 +00:00
Alan Viverette
dec17299fe Fix switch text position when thumb is null
Change-Id: I05a107423fabf5a538258cf0562e0916c8be18b6
2014-07-12 00:26:36 -07:00
Alan Viverette
4d065a04ce Remove old listener when rebinding SwitchPreference
Also fixes switch animation during scrolling, unnecessary call to
requestLayout() on drawable invalidate, and potential NPE.

BUG: 16225972
BUG: 4312303
Change-Id: I015d1f03206dd2c812592b0abfa4214a3de73d3f
2014-07-11 23:03:52 +00:00
Fabrice Di Meglio
dfaa6c7439 Fix TimePicker behavior
- use Alert Theme and make the TimePickerDialog show its done button
in the legacy mode
- if targetSdkVersion < L or if TV UI show the legacy TimePicker

Change-Id: I19ca6dbbcb50599c7e230262a23956c185f53a5c
2014-07-11 22:48:26 +00:00
Yohei Yukawa
0023d0e0c4 Polish new IME API for L part 2: CursorAnchorInfo
This CL addresses feedbacks from internal customers for new
input method APIs that are mainly used for physical keyboard
support in L.

For performance reasons, #onUpdateCursorAnchorInfo is not called
back by default and each input method has to enable this
event notification explicitly whenever fine-grained character
locations are needed.

In L-preview, InputMethodSession#setCursorAnchorMonitorMode was
introduced for this purpose.  However, we got several feedbacks
to be addressed.
- The effect of #setCursorAnchorMonitorMode is not preserved
  during focus change.  IMEs need to call
  #setCursorAnchorMonitorMode every time when #onStartInput is
  called.  This is tricky and hard to understand.
- As #onUpdateCursorAnchorInfo is a new API, not all
  applications/text editors have supported it. Therefore IMEs
  can't always rely on it. However, there is no way to query
  if the attached target is supporting this new API or not.
  It would helpful for IME authors if we can provide a
  reliable way to query if the attached input target is
  supporting the new API or not.

In order to address these issues, the triggering method has
moved from InputMethodSession to InputConnection in this CL,
as an analogy of existing InputConnection#getExtractedText API,
which has provided similar functionality including optional
reactive event callbacks from the application to the IME.

BUG: 15812658
BUG: 16118603
Change-Id: I3c6b69bd9d79b199afe68d838f25effa6048e5cc
2014-07-11 21:13:17 +09:00
Alan Viverette
244911f976 Merge "API for inflating action bar menus against a different theme" 2014-07-10 20:54:59 +00:00
Alan Viverette
3d0f21dab8 API for inflating action bar menus against a different theme
BUG: 16162344
Change-Id: I5bf9f133de56a1830028bca6326cc2c50888a052
2014-07-10 16:15:35 -07:00
Jon Miranda
a25dc428db Exposes more properties to assist in evaluating contrast ratios.
Change-Id: I43468df4d842e03001ab33e139095afadaeacd20
2014-07-10 21:35:22 +00:00
Alan Viverette
503dca6f58 Merge "Add API for specifying popup window shadows and shadow insets" 2014-07-10 16:04:18 +00:00
Yohei Yukawa
0b01e7fc58 Polish new IME API for L: CursorAnchorInfo
This CL allows application authors and input method authors to
communicate with each other more precisely on the visibility of
insertion marker and composing characters. Now we can describe
the situation where the coordinates of them are available but
they are overlapped by other UI elements.

This change is based on feedbacks from internal customers of
this preview API.

Change-Id: I82eba0e844a6f8b99ba11a68fad272399034cc24
BUG: 16118303
2014-07-10 20:23:26 +09:00
Alan Viverette
ccb11e1837 Add API for specifying popup window shadows and shadow insets
BUG: 14569120
BUG: 13211941

Change-Id: Ia21596b25a0471344d42d59377074f67fce00042
2014-07-09 18:26:30 +00:00
Svetoslav
554776e515 Remove an obsolete code comment
Change-Id: Ia04f18eb9e9153d46e12219482e84b862e4ec8e6
2014-07-09 19:30:49 +00:00
Craig Stout
9eef3f4fb9 NumberPicker fixes for Android TV.
Fixed stuck dpad navigation when end of range is reached.
Adds theme attribute 'hideWheelUntilFocused'.

b/15194230

Change-Id: I9a77c6ad29a1fd930a8920d9944ad1eb15ca6b96
2014-07-08 00:10:05 +00:00
Adam Powell
032fb0a2a2 Merge "Avoid texture path drawing for EdgeEffect" 2014-07-02 18:55:10 +00:00
Adam Powell
ccb2466b5d Avoid texture path drawing for EdgeEffect
Make sure we stay on tesselated geometry code paths instead of texture
generation.

Bug 16131698

Change-Id: I6b934e718e1d3c5164a8ede71b1240ce761eaf71
2014-07-07 16:24:13 -07:00
Craig Stout
59c7b4b04f TimePickerDialog does not force new ui on TV.
Add support for done button in LegacyTimePickerDelegate.
Provide leanback themed legacy time picker layout with buttons
on the side.

b/15194230

Change-Id: Ie05c1cf45b334e9642095d63c682aba314ff3c6b
2014-07-07 23:08:11 +00:00
Adam Powell
aab726c53e Fix consistency in nested pre-scroll with ScrollView for AbsListView
Keep sign consistency for nested pre-scroll dispatch in AbsListView
with ScrollView. Also correctly invoke nested flings.

Bug 16015770

Change-Id: Ia8a82667ea548aafda66f04e32046c3b0a5c2314
2014-07-07 15:29:13 -07:00
Alan Viverette
fccbff5f02 Add API on AccessibilityNodeInfo for retrieving TextView error
BUG: 11155198
Change-Id: Ie01b92e1071ff584b360cfa3ece4320ad05e4aae
2014-07-07 15:06:14 -07:00
Craig Stout
f209ef9c3a Fix TextView drawing issue.
The predraw listener was lost because the view was detached and reattached
after layout but before the first draw.

b/15376022

Change-Id: Idf38f7373df3c457f54b6e3f995b00256914f775
2014-07-07 17:43:52 +00:00
Brian Duff
f8d4602c9b am 51d70ce9: am c542745e: am a6e9dd3f: Merge "Fix a typo in NumberPicker javadoc."
* commit '51d70ce9b8dbbcb7f354c87b722efe84b2a62a28':
  Fix a typo in NumberPicker javadoc.
2014-07-03 09:49:24 +00:00
Brian Duff
51d70ce9b8 am c542745e: am a6e9dd3f: Merge "Fix a typo in NumberPicker javadoc."
* commit 'c542745e23fe9d2e71c1f607d66f5570f585133d':
  Fix a typo in NumberPicker javadoc.
2014-07-03 09:43:56 +00:00
Brian Duff
a6e9dd3f9a Merge "Fix a typo in NumberPicker javadoc." 2014-07-02 20:51:20 +00:00
Alan Viverette
5dddb70b4e Add style for SearchView
BUG: 6420978
Change-Id: I31d9f7e66c2404388ccbe6d2e43a005deb0b7c25
2014-07-02 15:59:30 -07:00
Adam Powell
b3e411458c Fix a copy/paste bug in Toolbar.
Bug 15868762

Change-Id: Ie2a0c492f9d7baa05d520cd2fee652245ab4b61b
2014-07-01 17:42:34 -07:00
Alan Viverette
d361a4f98b Use touch hotspot in drag-to-open, fix forwarding cancellation
BUG: 14230395
Change-Id: Ibea615bcd6a2e57fca8b49ffea23f0df951d497c
2014-07-01 23:16:49 +00:00
Adam Powell
d76008352e Remove ActionBar.LayoutParams MarginLayoutParams constructor
Adding this for L caused some fun issues with source compatibility.
Apps that previously passed another MarginLayoutParams subclass to
ActionBar.LayoutParams' constructor started statically linking to a
constructor overload that did not exist on older platform changes with
no other source changes. In the interests of avoiding these headaches
for developers, remove it.

Bug 15933193

Change-Id: I01cf8dfa2341b9d9629331639433b59352e7e15a
2014-07-01 15:39:28 -07:00
Jorim Jaggi
3aa422033a Fix jank in TextView.Marquee
Use Choreographer animation callbacks to update the scrolling and
make the delta dependent on the time passed since the last update.

Change-Id: If6ce365014e8d32dadfc93bba0d4733050f673f7
2014-07-01 20:15:01 +02:00
Alan Viverette
d87c7767d9 Merge "Fix NPE in AbsListView hotspot management" 2014-06-30 22:33:05 +00:00
Alan Viverette
8390fab6f4 Fix NPE in AbsListView hotspot management
BUG: 15989761
Change-Id: I1c2fc2ddf3128bf3ba4aa7d986899193559b0c76
2014-06-30 16:03:43 -07:00
Chet Haase
6c8fef7fb8 Avoid null-deref crashes in ScrollBarDrawable
Some of the code in ScrollBarDrawable automatically derefs
the horizontal and/or vertical thumb objects. The drawable can
sometimes be in a state where these objects are null, causing
a null deref. This fix simply avoids dereferencing null objects.

Also, fixed doc bug in attrs.xml for Transition tags.

Issue #13210554 Transition style documentation refers to 'move' instead of 'changeBounds'
Issue #15636059 ScrollBarDrawable crashes in setAlpha() and other methods when thumbs are null

Change-Id: I6664ba17dae0845de8a8658381ae6e9c9ef99214
2014-06-30 14:15:03 -07:00
Yohei Yukawa
5d6b6f2892 Allow TextInfo to store ParcelableSpans for TextService
This CL adds a new constructor of TextService so that spell
parcelable spans can be preserved in TextInfo.  The primary usage
scenario is to provide locale information for spell checker
service.

BUG: 15869548
Change-Id: Ib58ece68dee4c6187d469049fca8c35a307c7a01
2014-06-30 09:42:18 +09:00
Alan Viverette
abda548088 Fix unsafe public methods that take TypedArray
BUG: 15782973
Change-Id: Ifeb032976cd20cf25fe7ecea83eab9d71a16ebc3
2014-06-27 23:11:55 +00:00
George Mount
31e8005e06 Merge "Don't use overlay to transition ImageViews." 2014-06-27 15:56:14 +00:00
George Mount
990205eada Don't use overlay to transition ImageViews.
Bug 15744992

MoveImage used an overlay to transition ImageViews. This
caused strange problems when ImageViews were contained in
other Views. The new ChangeImageTransform does a smooth
transition for changes in scale type and bounds.

Change-Id: Ia5021f4828f8f818a8699b3bdd38437aeba1cfc8
2014-06-25 13:45:16 -07:00
Adam Powell
7901b2a549 Set the default content description for Toolbars acting as action bars
Bug 15814044

Change-Id: I07c20de1349cb07f21eaf0db718da94c0ba7043d
2014-06-24 17:32:06 -07:00
Adam Powell
1a264ce3d9 Add Toolbar methods to set title text colors
Bug 15836670

Change-Id: If62da4104853c772790597be44f7a1efde2505ef
2014-06-23 18:16:44 -07:00
Brian Attwell
a279918c5b Add EdgeEffect#setColor
Bug: 15725269
Change-Id: Ifdb0a53d1f17e2433683e51d09588545b69e6238
2014-06-24 00:04:05 +00:00
Adam Powell
287c036187 Compatibility shim for apps calling View methods with TypedArray params
Apps calling the View methods that accept TypedArray params have
always been wrong. There is no way to call these methods safely since
apps can't get at the correct filter array assumed in these methods'
implementations. Do the best we can with these calls anyway; ignore
whatever they did pass and just get the styled attributes from the
Context used to construct the view and its associated theme.

Bug 15792674

Change-Id: I6dfa1abf273b581e79a17a72f68c97ff9a9148c5
2014-06-23 15:18:28 -07:00
Chris Craik
a7090e0cfd Update 'DisplayList' vs 'RenderNode' naming in several places
Change-Id: I635c6627d098b661fb9b0ba1bd42fa6d7277d287
2014-06-23 09:57:07 -07:00
John Spurlock
e599488968 If we're not showing switch text, don't include in measure.
Naive fix for switch crashes when !showText.

Bug:15770311
Change-Id: I68839b61b907d62159e2c12349005683e9ac6436
2014-06-20 10:53:54 -04:00
Alan Viverette
2a37cf8d76 Don't show text in Material-styled switch
BUG: 15754341
Change-Id: Iae43b31c6e445207a0c95b48d0f0befac0f5cc78
2014-06-19 17:09:10 -07:00
Jeff Sharkey
b9a45aae8d am 447b68e7: am b5e05cff: Merge "Fixing parcel leaks to avoid virtual memory leak"
* commit '447b68e767943fdde297d78321378e2623985a0a':
  Fixing parcel leaks to avoid virtual memory leak
2014-06-19 16:11:51 +00:00
Maunik Shah
db1a9a3862 Fixing parcel leaks to avoid virtual memory leak
Client has to call recycle() on parcel object after its usage
otherwise native layer of binder won't clear the resources of
parcel which were allocated for IPC

Change-Id: Ib31ddcc92aa4ebd80bb66729922b9133692e9c9e
2014-06-19 19:44:21 +05:30
Alan Viverette
e3c433aa45 Persist selector on ListView and GridView layout
BUG: 15472031
Change-Id: I0d10be3e0cf8a4d7580bd834e432c1c15fc481f5
2014-06-19 14:36:59 -07:00
Jeff Sharkey
65dfc83cef am b9a45aae: am 447b68e7: am b5e05cff: Merge "Fixing parcel leaks to avoid virtual memory leak"
* commit 'b9a45aae8d07e7a92806b53cbc36f5488e3bac2d':
  Fixing parcel leaks to avoid virtual memory leak
2014-06-19 16:17:03 +00:00