Commit Graph

706 Commits

Author SHA1 Message Date
Andrew Sapperstein
8d9db8e4c7 Added getNumColumns function to GridView.java.
Change-Id: I1cec19c77d0ee47278d93c6b0a112edae777e4e9
2010-05-13 17:45:50 -07:00
Romain Guy
743e25c914 Merge "Prevent possible leak in AbsListViews." 2010-05-13 14:06:59 -07:00
Romain Guy
82afc7b32b Prevent possible leak in AbsListViews.
This change unregisters a list's data observer from the adapter when the list
is detached from the window. The default data observer impl. is a non-static
inner class with a synthesized pointer to the list. Thus if an app keeps
the adapter around the list is also kept around. This can be a problem with
dialogs in particular.

Change-Id: Ia95a995d3f54b9caf1bbcd2c7239a0318511b08c
2010-05-13 14:03:09 -07:00
Doug Felt
f47d7405bb Modify Canvas drawText to run bidi and shape.
Adds drawTextRun as internal API on Canvas and GraphicsOperations.
Adds implementation to implementors of GraphicsOperations.

Adds state and API on Paint to control the bidi algorithm when used
by Canvas.  This API is currently hidden.

The drawText changes are incomplete since shaping is not yet available
in the native code.

Change-Id: I4368048aef9545df0953a349381771603e04b619
2010-05-12 18:50:02 -07:00
The Android Open Source Project
108817f3d8 am 8b270a7a: am 579e08e6: am f7896449: merge from open-source master 2010-05-05 18:16:31 -07:00
The Android Open Source Project
f78964490d merge from open-source master
Change-Id: Ia9e1f4e049f5870386ea29ddb6e3ef028ea918da
2010-05-05 15:57:42 -07:00
Nicholas Killewald
0ba2d4782c Fixed deserialization problem in DatePicker.
During onRestoreInstanceState for DatePicker, the internal
state of the widget is restored properly (thus setting the
internal year, month, and day), but the spinners aren't
visually updated to that state immediately. That is to say,
the internal state of the widget doesn't match the spinners
in that case, which can cause confusion.

Change-Id: I96d1a299d0ee159d41450470acb30a3bf6006d44
2010-05-04 11:48:22 -07:00
Adam Powell
8c2d5cf826 am 6bbb65e6: am 6483f6d5: am b40c42f1: Fix bug 2639949 - Don\'t stop a Scroller early 2010-04-28 19:45:04 -07:00
Adam Powell
b40c42f1ff Fix bug 2639949 - Don't stop a Scroller early
Change-Id: Ia827199a27d03289b6fa573dd6f2b13517943400
2010-04-28 16:36:37 -07:00
Jeff Hamilton
69e87f9b43 Fix a bug I introduced in CursorAdapter.
It will now properly register the content
observer when used with the auto requery
constructor and auto requery set to false.

Change-Id: I0f3995a2d5f1e27aaeab8c5f2f951fefc8a072e5
2010-04-22 11:26:06 -05:00
Evan Millar
9a20aa74ca Clean up the fallback state of QuickContact
-Show the generic avatar by default, until otherwise set
-Add padding to the nobadge asset so that it will be square
-Remove states from the nobadge asset since it is not actionable

Change-Id: Ide7da78782a0db9047de52af6f9c1f654fc6a1b5
2010-04-14 16:45:07 -07:00
Romain Guy
1b2d7ec487 Merge "Ensure Gallery does not unselect the selected item after a layout. Bug #2573921" 2010-04-14 14:45:43 -07:00
Romain Guy
6691fcfbc8 Ensure Gallery does not unselect the selected item after a layout.
Bug #2573921

Change-Id: I5c39881f541835fe5515b35a9f12761a8a2c1b8b
2010-04-14 14:43:18 -07:00
Steve Howard
16bd9372ee Hide zoom buttons when a view gets hidden, i.e. by a TabHost
When a View uses a ZoomButtonsController, it needs to explicitly hide
the zoom controls when it gets hidden itself, such as when it's within
a TabHost.  Add a note to the javadoc to do this via
onVisibilityChanged(), and update WebView to follow the instructions.

Thanks to Ross Levinsky for discovering and tracking this one down.

Bug: 2582718
Change-Id: Ia0c9ea4efcb29eb1f321be54f3d8ae1e056df6b7
CC: rosslevinsky@google.com
2010-04-13 11:55:02 -07:00
Romain Guy
3e089c6c65 am aa03df8a: am 50e0d9ae: am 376722fc: am 4525c981: Merge "Fix regression introduced when fixing focus issue with ScrollView. Bug #2581646" into froyo 2010-04-10 11:59:16 -07:00
Romain Guy
2d4cff64b4 Fix regression introduced when fixing focus issue with ScrollView.
Bug #2581646

The correct fix is to make ScrollView ignore the BACK key instead of consuming it.

Change-Id: I5c029a5c60ae8e7791391f63672c44b5c96fec71
2010-04-09 15:39:00 -07:00
Romain Guy
c9c82b5669 Don't supply a null child to the click listener.
External bug #http://code.google.com/p/android/issues/detail?id=7644

Change-Id: Iea2c0d7fa02d355fd68750d6dccf8e6c6773ab6b
2010-04-09 14:08:26 -07:00
Adam Powell
57f65e04fd am 203cd5e0: am 85a650fe: am c696b0df: am eb3d47e4: Merge "Fix bug 2574860 - fix AbsListView.trackMotionScroll edge detection" into froyo 2010-04-07 10:01:53 -07:00
Adam Powell
91f234fe4d Fix bug 2574860 - fix AbsListView.trackMotionScroll edge detection
Change-Id: I0fc6d2b8547ab56937eeb5ef3438003a06b966ec
2010-04-06 19:35:32 -07:00
Adam Powell
702d985b5d am 942d070c: am 1f29b4cd: am 21990922: Merge "Fix AbsListView scrolling behavior at edges." into froyo 2010-04-02 11:19:10 -07:00
Adam Powell
b7795432a5 Fix AbsListView scrolling behavior at edges.
Allow the user to start scrolling back into content immediately
after dragging past the end of content.

Remove some dead code.

Change-Id: Ife8f60499ac58179ba1e2500ca8745916392a4bc
2010-04-02 10:21:55 -07:00
Jeff Hamilton
451513baa7 Add an option to not register the ContentObserver when creating a CursorAdapter.
Change-Id: Ic18f0307f5ba0d54f7270d8d1e032feff537360b
2010-04-01 15:30:00 -05:00
Romain Guy
f4d67ca61d Merge "Don't ignore the parameters passed to the load methods." 2010-04-01 01:02:01 -07:00
Romain Guy
43d390085d Don't ignore the parameters passed to the load methods.
Change-Id: Id2090a2a0a39dc19b821ee6a01dd206de366397e
2010-04-01 01:01:17 -07:00
Adam Powell
ffd8e0fe94 am fff52b6a: am 5af7ef60: am 40cd1cf6: Merge "Fix bug 2562240 and clean up scrollbar behavior" into froyo 2010-03-31 23:34:04 -07:00
Romain Guy
feb4fb9682 Fix the build, really
Change-Id: Id5e00cf7eb822dabb0b2b95b541855871ff0fe07
2010-03-31 21:09:19 -07:00
Romain Guy
ec1ca4200c Fix the build
Change-Id: Ia55ab3e19e6cf81d719759eac48e00849bc0b73b
2010-03-31 19:34:08 -07:00
Adam Powell
a0d645cb69 Fix bug 2562240 and clean up scrollbar behavior
Change-Id: I551803a1c997c9d10e1d004ce14472af6090f432
2010-03-31 17:27:49 -07:00
Romain Guy
30346c4399 Add support for XML-defined adapters.
This is preliminary work for new types of Launcher widgets.

See javadoc in android.widget.Adapters for more details.

Change-Id: I413b8d5f97673e255d84dc07ad112c333c0ce9dc
2010-03-31 16:07:35 -07:00
Adam Powell
005c0a445e Fix bug 2523622 - ListView invokes onItemClick for disabled adapter items
AbsListView was relying on TOUCH_MODE_DOWN to signal that the item was
enabled, but onInterceptTouchEvent uses it for other purposes. Check
before dispatching the event.

Change-Id: I6babd3872cb51ebdba8e97a3b349e0cc08cd1279
2010-03-30 16:26:36 -07:00
Adam Powell
9d32d24dbd Remove overscrolling
Change-Id: I7e9db8d8a9b8ef67f0c0c82bf57c9155b7ebabea
2010-03-29 20:46:45 -07:00
Romain Guy
6b1e696982 Rename tab widget attributes, remove scroll barrier constant.
Bug #2553515 #2553595

Change-Id: Id36280a57f00a1ee59251be6be1aae8df2189c09
2010-03-29 14:40:34 -07:00
Romain Guy
0e1229260d Merge "Rename private fields to break bad code examples" into froyo 2010-03-29 12:28:20 -07:00
Romain Guy
65fe2c08fa Rename private fields to break bad code examples
Change-Id: I4a3e8df5de159c703db244212f78824e4105ba90
2010-03-29 12:27:30 -07:00
Romain Guy
91c8613679 Don't assume there's a selected position in touch mode.
Bug #2520743

Bad GridView, bad!

Change-Id: Ideed32dc70a69c85df5afbf949e78b481e147b7f
2010-03-26 17:29:45 -07:00
Adam Powell
aeb30e6d22 Fix bug 2544916 - Fun with AbsListView touch mode
Change-Id: I79de051891d535f44c0910295976d1f3634aca4c
2010-03-25 18:09:09 -07:00
Adam Powell
6579b0b4ac API refactoring for OverScroller.
OverScroller is no longer a child class of Scroller and several
Scroller methods that do not make sense for OverScroller and could
cause misbehaving edge cases have been removed or hidden and
deprecated.

Change-Id: Ie055b607bd3b36c47ab9798d5c9518aef686b474
2010-03-25 16:02:27 -07:00
Gilles Debunne
478a745e84 null header and footer allowed in HeaderViewListAdapter.
The view infos should never be null since they are created by ListView, which is
the natural and only use of this class.
However, some tests in CTS pass null pointers. Replace null by a static empty list.

http://b/issue?id=2527753

Change-Id: I9b92fa018c89007f12be899285f75130b2c8ac40
2010-03-24 15:27:41 -07:00
Adam Powell
26295d20e3 Merge "Fix some bugs/edge cases in ScrollView/HorizontalScrollView" 2010-03-24 15:11:45 -07:00
Gilles Debunne
34783aac26 Fixes for HeaderViewListAdapter.
Null header and footer, as used by CTS tests, were no longer supported.
Added a static empty list to avoid repetitive null tests in that case.
Fixed getItem/getItemId/getView to handle corner cases.
Changed ListAdapter isEnabled documentation for invalid positions.

http://b/issue?id=2527753
Change-Id: I55e5bf21cb0673d906caa7c669987a6ae869d90f
2010-03-24 15:09:50 -07:00
Adam Powell
352b978fa8 Fix some bugs/edge cases in ScrollView/HorizontalScrollView
Handle ACTION_CANCEL, fix edge cases related to grabbing content and
beginning a new scroll during overfling/springback. Will prevent
some cases where a view could get stuck overscrolled.

Change-Id: I7e89d9de9b7dc685d2ea278e6b2bd2c794364204
2010-03-24 14:23:43 -07:00
Adam Powell
9d0335b1e3 Fix for bug 2502886 - stupid monkeys.
Plugged a possible edge case with ScrollView/HorizontalScrollView that
could cause this error.

Change-Id: I509004189b9f5e536d6213c9fdfff598d9f958ca
2010-03-24 13:42:51 -07:00
Adam Powell
f3311c940a Fix bug 2531732 - DateTimeView explodes on bad system date format.
Fall back to a default date format instead of throwing an exception.

Change-Id: I827a81d9610ea7f9243c1c33579e7a5d3b423692
2010-03-23 17:32:41 -07:00
Adam Powell
3daa6a557a Merge "Fix bug 2537626." 2010-03-23 14:10:50 -07:00
Adam Powell
886df67b3d Merge "Fix bug 2495033." 2010-03-23 14:10:00 -07:00
Adam Powell
83d570cb3f Fix bug 2537626.
Awaken scroll bars in onOverscrolled instead of based on the timing
reported by the Scroller's animation.

Change-Id: I8510b92b9fdf471fc8d6f8f089681eb23d10f190
2010-03-23 13:47:19 -07:00
Adam Powell
387d8f8a62 Fix bug 2495033.
AutoCompleteTextView now uses different logic to expand the dropdown
list of completion choices to cover the IME if present. Previously
this would happen whenever a touch down event occurred. Resizing the
dropdown could cause the parent view to animate a scroll and thereby
move the completion list up the screen. When this happened with a
finger down it would initiate a touch scroll on the completion
list. Prior to froyo this wasn't a problem since a list positioned at
the top could not scroll up, but with the addition of overscroll this
caused undesired behavior.

The completion list now will not expand to cover the IME on initial
touch down. Instead it will only expand if the user leaves a finger in
place for the duration of a timeout (currently 250ms) or if the user
explicitly begins a touch scroll on the completion list. This also has
a nice side effect where tapping a completion choice in the initial,
smaller list does not cause a split-second list expansion before the
list is dismissed.

Change-Id: If0994c68a91b3bfc3dcef660c67fde667a9727f9
2010-03-23 13:29:34 -07:00
Romain Guy
a961dc5ae2 Merge "Correctly bind spinner data to TextView. Bug http://code.google.com/p/android/issues/detail?id=7251" 2010-03-23 12:44:13 -07:00
Romain Guy
b187a847a5 Correctly bind spinner data to TextView.
Bug http://code.google.com/p/android/issues/detail?id=7251

Previously, a spinner using checkable list items would try to bind data as booleans
instead of text. This change takes this use case into account.

Change-Id: Ie4ced01e3c0235138e1dd68426d6a748c2843a9c
2010-03-23 12:42:51 -07:00
Gilles Debunne
0ee0a2ea57 New edge effect when OverScrolled.
The constant force that was applied has been replaced by a spring force
when the OverScroller goes beyond valid position values.

Bounce coefficient can be set for each directions.

Change-Id: If7d506d3f35b3451f590c54d6c04a1deb8d9ca95
2010-03-23 12:25:11 -07:00