Commit Graph

4282 Commits

Author SHA1 Message Date
John Reck
b14dfe20ef Revert "Revert "Workaround apps not calling super.onDetachedFromWindow()""
This reverts commit bac16fae7e.

Change-Id: I61e997b23fac1aa984129fdc0328426ff8891bdd
2014-03-06 14:12:35 -08:00
Bart Sears
bac16fae7e Revert "Workaround apps not calling super.onDetachedFromWindow()"
Requested by jreck to fix the build.

This reverts commit 198d20842a.

Change-Id: I733065cc124b59bf914034f5bac5e2e951a5b604
2014-03-06 21:09:51 +00:00
John Reck
198d20842a Workaround apps not calling super.onDetachedFromWindow()
Bug: 13338698
 Move the releasing of hardware resources to a new
 @hide onDetachedFromWindowInternal

Change-Id: I52b4e6ba4d5b3ce20b89cabffa248d1d780e3e81
2014-03-06 12:40:49 -08:00
John Reck
2665f6e9f5 Merge "Remove invalid usage of DisplayList.isValid()" 2014-03-06 00:07:29 +00:00
John Reck
7558aa7081 Remove invalid usage of DisplayList.isValid()
Bug: 13324734

 Editor was using isValid as a mechanism to track whether or not it
 needed to re-record the DisplayList. This is not correct as isValid()
 is not a general-purpose dirty bit. Add an explicit dirty bit for
 Editor to use instead

Change-Id: I5608b151791870fca3681056b5507bd39ee48f52
2014-03-05 15:01:04 -08:00
Svetoslav
dd2ce3448b Merge "Allow click listener registration in NumberPicker." 2014-03-05 22:35:13 +00:00
John Reck
24ba99c235 Merge "DisplayList overhaul" 2014-03-05 17:00:54 +00:00
John Reck
44fd8d24f7 DisplayList overhaul
Change-Id: I53418d580c98f706e971545cff81b9921c12cc5f
2014-03-04 15:18:16 -08:00
Alan Viverette
5876ff4a0a Quantum for seek bars, spinners, switches
Fixes a bug in Switch that ignores the switch intrinsic height. Reverts
list selectors since they're not implemented in AbsListView yet. Also
adds Quantum for some miscellaneous widgets and icons.

Change-Id: I918bb0165b84e108cdf17a29eadc8424ac35f9ee
2014-03-03 17:40:46 -08:00
Svetoslav
46a27efe95 Allow click listener registration in NumberPicker.
NumberPicker is composed of three areas, increment, decrement, and value,
which take the entire space. Hence, adding a click listener was a no-op.
Clicking on the value brings up the IME but for devices with very small
screens a developer may want to override this default behavior to say
confirm the selection.

This change allows adding a click listener to NumberPicker to override the
behavior of clicking on the current value. This is applicable only to the
new look and feel of the NumberPicker, i.e. the holo themes. This change
is safe as previously setting a click listener had no effect.

bug:13287234

Change-Id: I34e12a2e2bd64344a4797153fa6c820001a4722e
2014-03-03 16:16:26 -08:00
Alan Viverette
2ac93ae919 Don't smooth scroll if the adapter is null
BUG: 13235508
Change-Id: I1ca8a5675aa07b9a987e47a6eacdc0a1e4adde74
2014-02-28 12:18:38 -08:00
Alan Viverette
cb23bce60a Refactor smooth scrolling sub-row calculation and clamp target
BUG: 13205615
Change-Id: If3757be35593a072ba6e92aa9da085330a12fd9d
2014-02-27 16:33:06 -08:00
Alan Viverette
e6be9c78b5 Always set item type on obtained ListView item views
If a view is scrapped without layout params being set, it will
incorrectly be recycled as item type 0.

BUG: 13212603
Change-Id: I2a42c04ec5065067ab260a0a8afb07207db729f6
2014-02-26 18:16:36 -08:00
Alan Viverette
813d85b82c Fix progress bar tinting, add tint support to ShapeDrawable
Cleans up APIs a little, since I think we may want to add tinting
modes beyond what Porter-Duff can provide. Plus we don't actually
support some of the Porter-Duff modes in hardware.

Change-Id: I2cea1b737cc93607a24842c54eb9f0d8346b29d4
2014-02-26 15:38:51 -08:00
Alan Viverette
2546fcf5c9 Constrain starting sub row to list bounds
BUG: 13077653
Change-Id: Id01da055e8502b1447519666eb439d8480437c6c
2014-02-25 18:45:03 -08:00
Alan Viverette
65be9cc34c Force measurement in LinearLayout if any views are skipped
BUG: 12249256
Change-Id: I805cc70c4a2982befd9eb625be1378e6a2d9eba6
2014-02-24 18:21:09 -08:00
Alan Viverette
462c2177f7 Check for ongoing detachment in AbsListView
BUG: 13167767
Change-Id: Ie1a828eadbb99daef46af77544f233fee09fd1bc
2014-02-24 12:24:47 -08:00
Alan Viverette
2e6fc8ca56 Check for null view root before checking for accessibility focus
BUG: 13168971
Change-Id: Ia75d77b18112371f56a624e11f9509f14ec98093
2014-02-24 11:09:18 -08:00
Alan Viverette
dc8d7db35a Merge "Fix transient state, accessibility focus in ListView, GridView" 2014-02-21 23:19:21 +00:00
Guang Zhu
c8124a1e79 Merge "add new accessibility action for EditText to set text content" 2014-02-21 22:28:22 +00:00
Alan Viverette
503923220c Merge "Fix scrolling when the bound target offset is too high" 2014-02-21 19:13:17 +00:00
Alan Viverette
00b9829202 Fix scrolling when the bound target offset is too high
BUG: 13033556
Change-Id: I7a61548d3c604f004726117b40882f84ddf75337
2014-02-21 11:11:01 -08:00
Elliott Hughes
449e46600f am 0047d3e0: am e253b514: am 29d60b95: am 8d41e653: Merge "Miscellaneous small documentation fixes."
* commit '0047d3e025b43fd2dc05734f7ea6229291445046':
  Miscellaneous small documentation fixes.
2014-02-21 17:37:54 +00:00
Elliott Hughes
e253b514f4 am 29d60b95: am 8d41e653: Merge "Miscellaneous small documentation fixes."
* commit '29d60b95fa8019c0542f46551057c4d376bb8a7a':
  Miscellaneous small documentation fixes.
2014-02-21 17:28:51 +00:00
Elliott Hughes
8d41e653ba Merge "Miscellaneous small documentation fixes." 2014-02-21 17:19:21 +00:00
Guang Zhu
4cd353c038 add new accessibility action for EditText to set text content
Bug: 12872344
Change-Id: I85a3805ab0c34b96a7d4228f2382c8ff664e36e8
2014-02-20 20:05:34 -08:00
Alan Viverette
ff699570f6 Check item type before re-binding transient state views
BUG: 12701797
Change-Id: I180613cc342d24b63f80fd699937c7543c38fc20
2014-02-19 15:25:10 -08:00
Jean Chalard
ca7d37bd27 Merge "Fix a crash where user data was not validated." 2014-02-19 03:18:32 +00:00
Alan Viverette
3e14162fc6 Fix transient state, accessibility focus in ListView, GridView
Reverts portions of "Use transient state to preserve accessibility focus
in ListView," "Set transient state for focus container in ListView," and
"Restore A11y and keyboard focus positions after GridView layout."

Basically, using transient state here was bad and I should feel bad.

Replaces reverted code with better handling of accessibility properties
for scrapped views that are reused for the same stable ID.

BUG: 12701797
Change-Id: I7afcb2fe14413828435d1476b4f0f40108edd2dd
2014-02-18 17:05:13 -08:00
Jay Shrauner
ae58624157 Merge "Prevent SpellChecker from setting invalid range" 2014-02-19 00:24:39 +00:00
Alan Viverette
bb9364279f Fix sub scroller bounds checking
BUG: 13031919
Change-Id: I6b569b50034fbe70441e11e56706faa9f2acfcbd
2014-02-18 14:07:35 -08:00
Alan Viverette
23160f4fb9 Merge "Refactor AbsListView position scrollers for better abstraction" 2014-02-14 01:48:59 +00:00
Alan Viverette
d22db216fe Refactor AbsListView position scrollers for better abstraction
The AbsListView sub-scroller knows nothing about layout. That's now
handled by ListView and GridView, with subclasses of AbsListView using
the default PositionScroller. Removes unnecessary (unreleased) APIs.

Also fixes a bounds check that was using the item position rather than
the child view position.

BUG: 13006641
Change-Id: I2adb0f15623e32295facf81f5ada974083ba03ce
2014-02-13 17:47:38 -08:00
Jean Chalard
84a3320507 Fix a crash where user data was not validated.
ExtractedText#partialStartOffset and #partialEndOffset are
from the app, that sets it as it sees fit. We need to
validate them so that we don't crash.
Still emit a warning if this is the case, as this is
not expected.

Bug: 9570771
Change-Id: Id9d6babd1620da39bf0e454b14d7ce716bd9d9d3
2014-02-13 19:14:24 +09:00
Alan Viverette
76769ae02e Add selection properties to CollectionInfo, CollectionItemInfo
BUG: 12552541
Change-Id: Iae10abc02eeffea7c7fcb25020b343181e1e3482
2014-02-12 16:38:10 -08:00
Alan Viverette
71c6ca2a75 Merge "Update smoothScrollToPosition to move faster for large offsets" 2014-02-12 23:51:56 +00:00
Alan Viverette
d5694f02d5 Fix RelativeLayout measurement
BUG: 12993953
Change-Id: Idf82734eb9a06ea7610e8eb42705da9f4a4639e9
2014-02-12 15:49:18 -08:00
Alan Viverette
441b437b72 Update smoothScrollToPosition to move faster for large offsets
Adds a method to AbsListView for translating from position to row
and vice-versa. Doesn't NPE this time.

BUG: 3434554
Change-Id: I6a731aedda6d951ad46322dbe87df00b8d34a22c
2014-02-12 13:30:20 -08:00
Jay Shrauner
ea4adf2847 Prevent SpellChecker from setting invalid range
Add check for invalid range before setting for further check
at end of parse() loop.

Bug:12936072
Change-Id: Ie0b33b8e69fe47e5d3371640be5681f13a4e4f6e
2014-02-07 13:28:59 -08:00
Alan Viverette
e6875f1575 Temporary fix for background invalidation
Not a complete solution, since we could be more efficient, but enough
to have both background display lists and proper invalidation.

Change-Id: I0216a104948c0930760275bb2b98318b0a4487e7
2014-02-05 14:05:17 -08:00
Alan Viverette
8eea3ea559 Add APIs for obtaining themed Drawable from Theme, Context
BUG: 12611005
Change-Id: Ic0057be4e4c2d0c61ce02a019b3f7d0625e3a016
2014-02-03 18:42:24 -08:00
Alan Viverette
4803bc1ab7 Fix ordering of dimension caching during ImageView.setResource()
BUG: 12876148
Change-Id: I8c27546851f491e229a880307d34e1da8e74e6c2
2014-02-03 14:32:07 -08:00
John Spurlock
53a470af65 am be878d87: am b6a4926c: am 647db9fa: am 76ecd66a: am 0196e561: Fix typo in ImageView.java
* commit 'be878d8773cc841e5e144a6332c576c650e88126':
  Fix typo in ImageView.java
2014-02-03 17:36:11 +00:00
John Spurlock
647db9fae3 am 76ecd66a: am 0196e561: Fix typo in ImageView.java
* commit '76ecd66a6d5f8ceaebbe9cd109948f01aff4cd27':
  Fix typo in ImageView.java
2014-02-03 17:21:25 +00:00
John Spurlock
76ecd66a6d am 0196e561: Fix typo in ImageView.java
* commit '0196e561f280e6cc361442036da277a630e68558':
  Fix typo in ImageView.java
2014-02-03 17:18:37 +00:00
John Spurlock
0196e561f2 Fix typo in ImageView.java
Change-Id: Iaa7b020f09c893a5fe006a8523686dd8b9a8f872
2014-02-03 09:00:35 -05:00
Fabrice Di Meglio
25da1bac82 Merge "Fix bug #12066726 java.lang.NullPointerException at android.widget.CalendarView.onScroll(CalendarView.java:1216)" 2014-01-30 22:15:07 +00:00
Fabrice Di Meglio
ab5e089585 Merge "Fix bug #12467741 Java crash in com.android.settings: java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification." 2014-01-28 23:16:08 +00:00
Fabrice Di Meglio
ef4aad220f Merge "Fix bug #12422326 Unable to change text direction programmatically using setTextDirection Android SDK API" 2014-01-28 23:15:24 +00:00
Fabrice Di Meglio
fa55105137 Merge "Fix new TimePicker accessibility" 2014-01-28 23:14:49 +00:00