Commit Graph

609 Commits

Author SHA1 Message Date
Gloria Wang
3b7991efec Merge "Release mediaplayer if the current state is not suspending. Fix for bug 2480093." 2010-03-05 10:22:04 -08:00
Gloria Wang
efb882cf75 Release mediaplayer if the current state is not suspending. Fix for bug 2480093. 2010-03-05 10:14:33 -08:00
Romain Guy
090e0f08b9 Do not select any item when the user clicks outside of the list content.
Bug #2485544
2010-03-04 18:29:15 -08:00
Adam Powell
ca8faae6b9 Awaken ListView scroll bars for overscroll 2010-03-03 20:55:07 -08:00
Gilles Debunne
e58aa0d964 Merge "More ExpandableListView fixes to take headers into account." 2010-03-03 16:49:05 -08:00
Gilles Debunne
272f3a9474 More ExpandableListView fixes to take headers into account.
All direct calls to mConnector in ExpandableListView should convert group/child flat positions
to/from absolute flat positions (that take header count into account).
Two conversion methods were added to do that.
2010-03-03 15:55:13 -08:00
Adam Powell
d93b998c92 Fix a bug in OverScroller.setFinalX/Y 2010-03-02 18:04:43 -08:00
Adam Powell
9d5b488abe Added Scroller compatibility methods to OverScroller 2010-03-02 17:09:38 -08:00
Romain Guy
0bf88594c4 Make sure all list items know they are in a window.
Bug #2476671

If you had a ListView with a layout_height equals to WRAP_CONTENT, you would
get list children with a parent but not attached to the window. This was caused
by the onMeasure() code: that code was obtaining views from the adapter to
measure them and putting them in the recyler for later reuse. Unfortunately
the recycler assumes that views have been attached to the window but detached
from the parent, thus causing much grief. The fix simply forces measured views
to be added to the window the first time they come out of the recycler.

ListView, bow before me for I am your master!
2010-03-02 13:41:46 -08:00
Gilles Debunne
c4fc2cc47f Merge "Null pointer tests removed from HeaderViewListAdapter." 2010-03-02 11:41:49 -08:00
Gilles Debunne
176f9fc215 Null pointer tests removed from HeaderViewListAdapter.
The mHeaderViewInfos and mFooterViewInfos lists were sometimes tested for nullity
and sometimes not. Should these values be null, some conditionnal code was actually
flawed in getView() and getItem() because of too strong 'and' conditionnals.

These lists are created upon declaration in ListView and are then shared and hence
cannot be null. Null tests were hence removed. getView() and getItem() get simpler
and work as before.

Change-Id: I279e482730ce6148a559d15a9863afc8f6b67780
2010-03-02 11:00:50 -08:00
Romain Guy
42c79880b0 Apply alpha animations on ImageView instances.
Bug #2479570
2010-03-01 17:21:59 -08:00
Romain Guy
7883c975dd Prevent crash in Dialog.
Bug #2249637
2010-03-01 16:39:17 -08:00
Romain Guy
61c9d4b450 Let apps change the bottom strip in TabWidget.
Bug #2478088

Also expose a few useful APIs.
2010-03-01 14:23:23 -08:00
Gilles Debunne
52b65d39aa Take headers into account when expanding a ExpListView group.
The possible scroll that happen after expanding a group did not take the possible
existing headers into account.

Change-Id: I5dc381baa7c54580e992e26a1ed55102afcb16b0
2010-03-01 11:04:28 -08:00
Gilles Debunne
7628fbe031 Merge "Fixes for ExpandableListView with headers/footers" 2010-02-27 13:13:11 -08:00
Adam Powell
ccea766217 Merge "ListView now tries to keep the position containing focused child views on-screen." 2010-02-26 17:06:50 -08:00
Adam Powell
9bf3c12850 ListView now tries to keep the position containing focused child views on-screen. 2010-02-26 17:05:21 -08:00
Adam Powell
d43bd48fe3 FastScroller now reports scroll state changes for its associated AbsListView 2010-02-26 16:29:09 -08:00
Gilles Debunne
47ccdf3760 Fixes for ExpandableListView with headers/footers
Patches in ExpandableListView to correctly handle header/footer shifter flat positions.
Make tests added in https://android-git.corp.google.com/g/#change,42312 pass.

Change-Id: I0d7823f5ae290e855bfdfb8d33c18bd34661077c
2010-02-26 14:59:44 -08:00
Romain Guy
9b1bb81fe2 Do not detach headers and footers from the list view. 2010-02-26 14:14:13 -08:00
Romain Guy
9c3184cc16 Do not recyle headers and footers when measuring the ListView.
Bug #2461893

This was causing headers and footers to be in a wrong state after the first
recycling pass, which would cause them to be detached from the window. This
was in turn preventing invalidate operations from performing successfully.
2010-02-25 17:34:59 -08:00
Adam Powell
4bb79db462 Merge "HorizontalScrollView multitouch scroll and only grip on content AbsListView multitouch scroll and only grip on content" 2010-02-25 16:29:42 -08:00
Adam Powell
4cd47702f0 HorizontalScrollView multitouch scroll and only grip on content
AbsListView multitouch scroll and only grip on content
2010-02-25 16:05:26 -08:00
Kenny Root
2a4f254d53 Remove misleading method comment on TextView#setHint
Comment incorrectly specified that the setHint(...) methods were
deprecated and suggested instead using different methods that did not
exist.

Change-Id: I5e7a1570beb8f1cd807853c6d9de8072afa5123e
2010-02-25 15:46:55 -08:00
Romain Guy
ac68d81ce1 Merge "Prevent ProgressBar from updating itself when hidden. Bug #2470737" 2010-02-25 14:33:32 -08:00
Romain Guy
a05e8a5869 Prevent ProgressBar from updating itself when hidden.
Bug #2470737
2010-02-25 14:32:39 -08:00
Gilles Debunne
aa635db5c6 Merge "New test on ContextMenuInfo packed positions." 2010-02-25 13:49:53 -08:00
Gilles Debunne
192ab90388 New test on ContextMenuInfo packed positions.
With and without headers.
Non regression test for bug
http://b/issue?id=1778239

Change-Id: I0235528ac6f8394292bac35f2350f3d5be1e4df7
2010-02-25 13:46:50 -08:00
Romain Guy
c352090c49 Correctly handle negative margins in horizontal linear layouts.
When LinearLayout is measured in EXACTLY mode, we handle the negative margins
a bit differently. This is to support the use case of the current tab design.
2010-02-25 11:01:01 -08:00
Romain Guy
8cebbfd5fb Merge "Fix tabs." 2010-02-24 18:55:59 -08:00
Romain Guy
6c5664ac58 Fix tabs. 2010-02-24 18:55:22 -08:00
Adam Powell
9d6e45ad92 Merge "ScrollView multiple pointer support. Fixed a bug where ScrollView wouldn't scroll if the initially tapped child ignores the down event." 2010-02-24 18:30:14 -08:00
Adam Powell
bc4e7533b9 ScrollView multiple pointer support. Fixed a bug where ScrollView
wouldn't scroll if the initially tapped child ignores the down event.
2010-02-24 18:22:08 -08:00
Romain Guy
dcc490f201 Fix the build. 2010-02-24 17:59:35 -08:00
Romain Guy
a440b002aa Prevents ListView items children to modify properties of other children.
Bug #2464502

This fix introduce a new dispatch mechanism to tell views when they are temporary
detached/reattached from/to a ListView. This is very important to remove pending
callbacks or cleanup temporary states.

This change also modifies TextView which was relying on that callback in a very
particular case: a focused EditText in a ListView. The modified code acts only
when in that case, not if onStart/FinishTemporaryDetach() is called via
dispatch*() (== recycled views in ListView.)
2010-02-24 17:15:40 -08:00
Joe Onorato
618c8f1ede Merge "Make ScrollView only do overscroll if you're grabbing the child view." 2010-02-24 16:30:00 -08:00
Joe Onorato
9f0e8eeab2 Make ScrollView only do overscroll if you're grabbing the child view. 2010-02-24 16:20:33 -08:00
The Android Open Source Project
2a399f066d am 563d3a62: merge from open-source master
Merge commit '563d3a62f3762b312a4c0a9d9af15a2333beaede'

* commit '563d3a62f3762b312a4c0a9d9af15a2333beaede':
  These changes add access to some status values in widgets listed below:
2010-02-24 11:19:12 -08:00
The Android Open Source Project
9a352305f8 merge from open-source master 2010-02-24 09:11:10 -08:00
Gloria Wang
2e1818a4d1 New API on VideoView widget to suspend/resume a session. Do not release the MediaPlayer client for video suspending/resuming. 2010-02-23 17:05:44 -08:00
Steve Zeigler
7a36788f4a These changes add access to some status values in widgets listed below:
widget/CheckedTextView.java:  report if the item is checked or not.

widget/CompoundButton.java:  report if the item is checked or not.

widget/ProgressBar.java:  isIndeterminate(), getProgress(), getSecondaryProgress(), and getMax() report what
sliders and progress bars are showing

widget/TextView.java: report the current selection:  getSelectionStart() and getSelectionEnd()
2010-02-23 16:39:08 -08:00
Romain Guy
afc0155718 Prevent crash in AbsSpinner when the selection is out of sync.
Bug #196253

Also do a little bit of syntax cleanup, remove unused code, etc.
2010-02-22 16:48:47 -08:00
Adam Powell
ab3e105282 Don't switch layout modes in AbsListView#onTouchModeChanged()
Don't stomp mResurrectToPosition for LAYOUT_SPECIFIC in AbsListView#hideSelector()
2010-02-22 11:22:31 -08:00
Adam Powell
1f09c83147 Spinner now allows disabled adapter items 2010-02-19 12:01:57 -08:00
Adam Powell
d7507834e7 Don't cache mFirstPosition before a layoutChildren in ListView.onFocusChanged 2010-02-18 15:40:33 -08:00
Gilles Debunne
d651629478 Merge "List.GetCheckItemIds no longer includes unchecked items." 2010-02-18 10:26:34 -08:00
Gilles Debunne
fd3ddfa6f0 List.GetCheckItemIds no longer includes unchecked items.
Unchecked items remain in the mCheckStates with an associated false value.
Now filtered out.

Added a unit test to ensure non regression.

Change-Id: If0b1a38aa06881055c87a97b3afb2c7fb48656f1
http://b/issue?id=2440815
2010-02-18 10:24:09 -08:00
Adam Powell
c6a0a9cb67 Merge "Don't move the fast scroll thumb with a list on overscroll." 2010-02-17 15:16:08 -08:00
Jeff Sharkey
2b95c24138 Added more @RemotableViewMethod methods, mutate ImageView.
Catch some View methods missed during the first pass of
marking with @RemotableViewMethod annotation.  Also adds new
ImageView.setColorFilter(int) to match the android:tint XML
attribute.

When ImageView touches ColorFilter or alpha, mutate the
underlying Drawable. Fix NPE in StateListDrawable.mutate().
2010-02-17 15:03:32 -08:00