Commit Graph

2001 Commits

Author SHA1 Message Date
Philip Milne
c218cacee0 Merge "Remove call to setPadding() in setUseDefaultMargins()." 2011-08-05 11:32:20 -07:00
Philip Milne
b559976a50 Remove call to setPadding() in setUseDefaultMargins().
It is not possible for teh user to override the assigned padding values
because the XML attributes are processed in the opposite order.

Also, make the XML and Java examples grid3.xml and Activity2.java
consistent in preparation for a move to API demos.

Change-Id: I47334f9f5a46a8a528067d88350dd70eaa38ff33
2011-08-05 11:24:55 -07:00
Adam Powell
f14f8ddd95 Merge "Fix bug 5118908 - ImageView.setImageDrawable always requests layout" 2011-08-04 18:32:18 -07:00
Adam Powell
2a0e99da03 Fix bug 5118908 - ImageView.setImageDrawable always requests layout
Make ImageView a bit more conservative about when it requests a
layout. This improves performance for ListViews where apps
asynchronously load images and replace placeholders outside of the
optimized getView path.

Change-Id: I564a4a343ab9c8c2d5baf907b5f573b5ee02c87a
2011-08-04 18:30:46 -07:00
Amith Yamasani
f88f8c92df Merge "Don't call onQueryTextChanged more often than necessary." 2011-08-04 18:25:32 -07:00
Amith Yamasani
b47c4fd206 Don't call onQueryTextChanged more often than necessary.
Also update the hint text if iconifiedByDefault changes.

Bug: 5097238
Change-Id: I876b3f3e74c30230f68d6bc88a95e182e4cc652b
2011-08-04 14:30:07 -07:00
Adam Powell
0a2a287987 Merge "Fix bug 5073637 - Market apps crashing FastScroller" 2011-08-04 10:51:57 -07:00
Adam Powell
568ccd88d7 Fix bug 5073637 - Market apps crashing FastScroller
It seems that some popular Market apps do not properly implement
SectionIndexer#getSectionForPosition and the framework did not
previously call it. Revert to more simplistic scrollbar behavior for
apps targeting sdk < Honeycomb.

Change-Id: If0b1f2b4db540de4bb8ba45798e498c09cddb42f
2011-08-04 10:36:37 -07:00
Svetoslav Ganov
7abaecc3db Merge "Removing firing of spurious scroll accesibility events." 2011-08-04 05:55:46 -07:00
Svetoslav Ganov
2c44b9221b Merge "No selection or click accessibility events are fired when a list item is tapped." 2011-08-04 05:55:26 -07:00
Philip Milne
271865565a Merge "Tidy." 2011-08-03 16:01:59 -07:00
Philip Milne
4c8cf4c933 Tidy.
Simplify logic for alignment modes.
Simplify drawing of rectangles.
Remove redundant code that was generating warnings in IDEA.
Remove the flexibility variable from Spec as it always has the value UNDEFINED.
Supress remaining inspection warning for clean (green) inspection status.

Change-Id: I2ddd80c68e7a6db0877648c2fdecefe9dbe7d32f
2011-08-03 15:37:05 -07:00
Gilles Debunne
eba69ac070 Merge "A tap on the insertion handle is only handled if it has not been moved" 2011-08-03 15:01:50 -07:00
Gilles Debunne
c0e74ca822 Merge "Bug 5050963: Suggestion popup moves with its associated TextView" 2011-08-03 13:58:49 -07:00
Gilles Debunne
040023a481 A tap on the insertion handle is only handled if it has not been moved
Without this test, an arbitrary drag of the handle that happens to end next to
where it started triggers the replace/paste action popup window, which is very
confusing.

Change-Id: Ib1f848147a1c12c231a28f2e730eccaf5321f85c
2011-08-02 20:16:32 -07:00
Gilles Debunne
21078e4349 Bug 5050963: Suggestion popup moves with its associated TextView
Generalisation of the onPreDraw listener pattern for all popup windows
(SuggestionsPopupWindow, ActionPopupWindow and HandleView).

Added a shared PositionListener class that tracks movements of the
parent's TextView and limit calls to hierarchy to get this position from
different places.

See also bug 5106062.

Change-Id: Ia2fe9509fa7df683acc859f9871bf4630c2da4dc
2011-08-02 18:00:48 -07:00
Romain Guy
04ee7956ea Merge "Add the ability to enable/disable marquee fading per device" 2011-08-02 17:03:22 -07:00
Dianne Hackborn
5857bceaea Merge "Clear the bitmap from the canvas in a lot of places." 2011-08-02 16:57:50 -07:00
Dianne Hackborn
6311d0a079 Clear the bitmap from the canvas in a lot of places.
Change-Id: I6b2071ac7b348c473b9bdd1b972d095aebbb4fb3
2011-08-02 16:37:58 -07:00
Romain Guy
6805545649 Add the ability to enable/disable marquee fading per device
Change-Id: I4211553455e87f0af598a2fac1d4f65f15c294fc
2011-08-02 16:33:02 -07:00
Philip Milne
e10bcdb37c Merge "Fix for http://b/issue?id=5081478" 2011-08-02 16:22:26 -07:00
Philip Milne
899d592287 Fix for http://b/issue?id=5081478
GridLayout needs to call measure on children after it knows how large children should be

Also:

. Remove deprecated methods and XML attributes.
. Stop Spaces having margins by default.
. Remove getSpacers() and findUsed()
. Change default for row/columnOrderPreserved() from false to true.
. Improve automatic index allocation mechanism to use individual maxima.

Change-Id: Id79fbb2e70a0bf2002191ec2a9746547d896de72
2011-08-02 16:01:28 -07:00
Bjorn Bringert
dbe55b722c Merge "Fix exception when a focused item is detached." 2011-08-01 13:39:30 -07:00
Mark Brophy
1ea6889136 Fix exception when a focused item is detached.
When a ListView has itemsCanFocus set, and scrolling moves the currently
focused item off the display, its focus is cleared. This is checked by
calling getDistanceToView().

However, it's possible that the view will have been recycled.  If so, it
will have been detached from the parent by calling
ViewGroup.detachViewFromParent.  Since this doesn't clear the view's
focus, we'll still try to call getDistanceFromView(), causing an
IllegalArgumentException since the view is not a descendant of the
ListView anymore.

Check whether the view is still a descendant before calling
getDistanceToView(). If it's not, we also need to clear the focus.

Bug: 4556022
Change-Id: Iebee56032223b70d714e2ec3bb7a19093ab5f81c
2011-08-01 16:32:03 +01:00
Luca Zanolin
e3f89c08f2 Sort the suggestions based based on the length of the text they are attached too.
When the suggestions are displayed, the shortest one will be at the top of the list, as they are the most relevant one.

Bug: 5006130

Change-Id: Id3ac3accce5198a6a58a0c3028ee5f77957ceac6
2011-08-01 09:57:25 +01:00
Svetoslav Ganov
4e03f5910c Removing firing of spurious scroll accesibility events.
1. Adding a TextView to a layout fires an accessibility scroll event
   with mScrollX = 8144. Now TextView does not fire scroll events
   since they are not interesting for accessibility and also the
   implementation fires scroll to frequently - though correctly.

2. AbsListView was firing accessibility events for the same location.
   Here the caveat is that this class does not know its height and
   calls onScrollChange every time is scroll as seen by the user
   may have changed but for accessibility purposes we care for the
   start and end indices of visible views. The fix is to avoid
   sending access events with duplicate data.

bug:5097467

Change-Id: I7bf11efd638ea3673843f1095a03f518e57cfe9d
2011-07-29 22:20:44 -07:00
Svetoslav Ganov
9ea764f159 No selection or click accessibility events are fired when a list item is tapped.
1. It appears that this was never working!?

bug:5098631

Change-Id: I37cd93e6e94137918a2cade13f24846563b23633
2011-07-29 22:14:41 -07:00
Svetoslav Ganov
0ef92056b7 Merge "Improving accessibility feedback for two state widgets." 2011-07-29 14:06:44 -07:00
Gilles Debunne
9ba79560bf Merge "New interaction model for suggestions" 2011-07-29 11:47:12 -07:00
Amith Yamasani
44df62c441 Merge "Don't submit a query if it's whitespace only." 2011-07-29 11:28:37 -07:00
Svetoslav Ganov
7650259a59 Improving accessibility feedback for two state widgets.
1. Added population of sensible text for the state of the
   two state controls such as CheckBox, Switch, etc. This
   is important since if they are in a layout manager which
   fires an accessibility event there should be a description
   of the widget.

bug:5092552

Change-Id: Ie3ca955653563496b84db379ae23a23fe88089a8
2011-07-29 10:45:05 -07:00
Adam Cohen
c9c4c2dad6 Merge "Fixing widget notifyDataSetChanged() not getting called, issue 5092676" 2011-07-28 15:36:19 -07:00
Adam Cohen
2148d43eb2 Fixing widget notifyDataSetChanged() not getting called, issue 5092676
Change-Id: I61a034a77c0c9d07aba71bfabe7a0864ce92c2e9
2011-07-28 15:00:38 -07:00
Gilles Debunne
646f856ec8 New interaction model for suggestions
Double tap and long press both start a text selection mode. The previous 'Paste'
popup window associated with insertion handle is now also used in selection mode.
It offers a new 'Replace' option that will popup the suggestion list.

The HC paste/side/nopaste layout are no longer used. For the new action popup
window, I also chose not to make the new background / text appearance styles
themable in order to avoid the same problem in case this design evolves again.

Known problems:
the popup is not moved when the TextView is scrolled.
the final visual style may change
the "ADD TO DICT" option is missing from the suggestion list
no interaction with the spell checker
- There are different bugs open for each of these

Change-Id: I167841f5ac017227fe4efa616eb935247250871a
2011-07-28 13:59:31 -07:00
Adam Powell
ccdd4ee44f Fix bug 5087980 - MenuItem#expandActionView should work from within
onCreateOptionsMenu

Initialize menu presenters early enough to respond to expanding an
action view within onCreateOptionsMenu.

Have SearchView show the IME as an async post to handle attempts to
show it while the UI is still in initial setup.

Change-Id: I77f3a94ed4397737edb5a7a15bf54993b6723f5e
2011-07-27 21:08:28 -07:00
Scott Main
812634c236 cherrypick Change-Id: I213711f4b5d867ba91c961a2f098b6cc415cfcb3
docs: clarify framelayout class summary, issue 5055437

Conflicts:

	core/java/android/view/View.java
	core/java/android/widget/FrameLayout.java

Change-Id: Ia446d2d4cc798757d7aea104cfaf75fc2315dc50
2011-07-27 13:22:35 -07:00
Amith Yamasani
6a7421ba94 Don't submit a query if it's whitespace only.
Just to maintain backward compatibility. It's not documented that a space
is not a valid query, but it does make sense to expect that.
Bug: 5079755

Also avoid showing an x by an empty query, by having the SearchDialog simulate an ActionBar.

Change-Id: I3a9332286a439b659e179a249587c491ef29e5c1
2011-07-27 11:55:53 -07:00
Amith Yamasani
84935dc2c0 Merge "Make sure that suggestions are queried on focus or tapping." 2011-07-27 10:54:15 -07:00
Amith Yamasani
377fe39329 Merge "Handle callbacks to CollapsibleActionViews that are in an actionLayout." 2011-07-27 10:53:25 -07:00
Gilles Debunne
a94b9ad23a Merge "Bug 4987014: a tap outside dismisses the text suggestion popup" 2011-07-27 09:31:02 -07:00
Svetoslav Ganov
05f0e1edb1 Merge "Updated the layout for the activity chooser view." 2011-07-26 20:09:44 -07:00
Adam Powell
523a1289af Merge "Fix bug 5051894 - drags/flings at the beginning/end of ListViews are often dropped" 2011-07-26 19:59:42 -07:00
Adam Powell
044a46bda5 Fix bug 5051894 - drags/flings at the beginning/end of ListViews are
often dropped

Fix some weirdness in transitioning between overscroll states.

Change-Id: Ie0c2ba75cc60c340e654df58dee675ed1426edb9
2011-07-26 18:41:53 -07:00
Svetoslav Ganov
bfbbcf5677 Updated the layout for the activity chooser view.
1. Updated the laoout to size the buttons properly.

Change-Id: I58f9beeca23af8b0471cf7f7ae9ca717223221aa
2011-07-26 18:36:56 -07:00
Amith Yamasani
10da590839 Handle callbacks to CollapsibleActionViews that are in an actionLayout.
Also, the onActionViewCollapsed needs to be called before detaching
the action view, so that the action view can dismiss the keyboard properly.

Fixes the Gmail search case where the keyboard doesn't disappear on hitting
the "up" affordance after a search.

Change-Id: I3c2f3f90f0edf6473404e6ceae3fa08866cad736
2011-07-26 18:15:08 -07:00
Amith Yamasani
f28d187574 Make sure that suggestions are queried on focus or tapping.
Bug: 3110831
Change-Id: Ic74a7eac1c5aa7d07c8a2e3f1ad19e026c990153
2011-07-26 12:21:03 -07:00
Gilles Debunne
2888524e03 Bug 4987014: a tap outside dismisses the text suggestion popup
Change-Id: I61f5a3c981770393aa861c88d989c653ea00a067
2011-07-25 18:59:06 -07:00
Adam Cohen
84e35d995f Merge "Fixing old bug with AdapterViewFlipper" 2011-07-25 13:54:02 -07:00
Philip Milne
496aa6d4d9 Merge "Fix for http://b/issue?id=5064532" 2011-07-25 13:43:09 -07:00
Philip Milne
5125e21bc0 Fix for http://b/issue?id=5064532
5064532: GridLayout with initial "stretchy" row and "gone" view in last row doesn't stretch properly

Also:

. Infer stretchibility from whether or not gravity is defined.
. Make algorithms for handling flexibility within cell groups consistent
  with those acting between cells groups (via constraint system).
. Hide and deprecate methods taking flexibility argument.
. Hide and deprecate CAN_STRETCH constant.

Both deprecated features will be removed after references are removed from platform.

Change-Id: Iabf2bf19f35cf30b8ec49c99b49a0550fd495125
2011-07-25 12:12:10 -07:00