Otherwise, exposes the hint or the result of whatever transformation
method is set. This is consistent with what is displayed visually.
Bug: 23568127
Change-Id: Ib5c7fe78fb3b58feb36f0314638345bd40e401ab
Previously, the measurements obtained from LinearLayout when using
EXACTLY and AT_MOST modes would be different even if the resulting
height was the same. This was the result of non-EXACTLY measurement
accounting for the size of zero-dimension views and then redistrib-
uting space as though they had initally been set as AT_MOST, whereas
EXACTLY would always redistribute space as though they had initially
been set as zero-dimension.
Makes perfect sense, right?
This CL updates non-EXACTLY measurement to always calculate the
minimum dimensions requested by zero-dimension views, but then to
redistribute the space according to weight.
Bug: 22810327
Change-Id: Iba8a3d26f2724e5fa9a30457119b4564eb285edb
Only targets >M since developers may have already had workarounds in
place or been relying on the incorrect behavior.
Bug: 23383805
Change-Id: Ifa69b204b10b8084cf6486e41d5393969e197826
Refactors ImageView to use LOG_TAG constant, fixes indentation, trailing
whitespace, uses of final. No functional changes.
Change-Id: I9e67d9a152e1c6d646719afa5010c45868db9c6f
This CL introduces very simple test case for SuggestionPopupWindow.
I'm going to introduce more test cases for complex scenario once this
approach is accepted, e.g. multiple suggestion span and misspelled flag.
This CL is a part of groundwork for Bug 15347319 and no user visible
change is intended with this CL.
Bug: 15347319
Change-Id: Idf166cbecb3e33be213e4104cf1afd827906f2ad
This makes navigation asymmetrical, but that's preferable to navigation
straight-up not working at all.
Bug: 14392811
Change-Id: Ifbb41adabdc9e015c8ed7195cbfb92ec0d8458a0
Also removes a bunch of weird accessibility hacks that shouldn't have
been there in the first place.
Bug: 19382871
Change-Id: I8cbdfb6e2dab98cc88028dff5bc23376c98a077a
No functional changes, just refactoring and cleaning up comments.
Actually, just one functional change so that setting the tab strip to
@empty will actually remove the tab strip drawable. This makes it
consistent with passing null to the accessor method.
Change-Id: I6f5ba8bea4e8b30117de5f12a86957e995812cfe
This is a no risk optimization that minimizes the time when
strong references to SuggestionSpan and Integer instances are
hold in SuggestionsPopupWindow.mSpansLengths.
SuggestionsPopupWindow.mSpansLengths are used while the given
SuggestionSpans array is being sorted. We don't need to keep
object references there after the sort is completed.
No user visible change is intended with this CL.
Change-Id: I7882d741c08d07ad7f905ad1d171c0d13da39397
When long pressing on an empty Text field with the system language set
to RTL, the "paste" popup was not showing up.
The Floating Toolbar requires a content rect to determine where the
text is and place itself close to it. In the case of an empty field,
we create a "fake" content rect by taking the placement of the cursor
+1 pixel to the right. In RTL languages, this +1 causes the content
rect to be considered off the bounds of the view, as the cursor is
aligned to the right, and hence the Floating Toolbar is hidden.
After making the rect a 0 width rect, we ran into the issue that
it was considered out of bounds due to the calculation ignoring rects
that simply touch the edge of the view's bounds.
BUG: 22540083
Change-Id: I29c79b701f586970b2611178233eff082b802ec1
This is a small refactoring of using substring method.
Calling TextUtils.substring is more efficient than calling
toString and String.substring.
Change-Id: I0a740b2a2fdbfb6b6155c4e926e17889025082f5
We were always setting the background of the decor view when the
"above anchor" state changed, rather than the background view.
Bug: 22970244
Change-Id: I3cd7202767ee47cb415736bb3c07369801abccd8
An optimization in ImageView nulled out the internal bitmap of a cached
internal BitmapDrawable object created to wrap a bitmap set on the ImageView.
However, apps can get ahold of that cached object via Drawable.getBitmap(),
resulting in having the state of that object they may be using changing out
from under them.
The change is to null out the cached object when getDrawable() is called, to avoid
leaking internal state that we may change.
That way, the app can continue to use that object if they want to, but we are no longer
relying on it internally, and will create a new one when needed.
Issue #22930646 [1P Regression from L] ImageView is blanked out in Activity in Google Express
Change-Id: Ic86cb93be4897b6ba247c1fabcda507e4ba01300
Currently update() bails out early if it is called
too soon after mStartTime has been set. In this case
mCurrentPosition remains holding an obsolete value
from a previous animation. This causes some strange
behavior (see the referenced bug).
This patch makes sure that mCurrentPosition is
updated every time that mStart is updated.
Bug: 22950559
Change-Id: I07b92f30ebe29856f4e04dc19a4820123713fd7e
"Include non-zero dimension views in excess space calculation" and
"Always distribute excess space in LinearLayout measurement" changed
LinearLayout behavior significantly in a way that wasn't covered by
CTS tests.
This reverts commits da2f304409 and
4fabc02158.
Bug: 22862047
Change-Id: I8d37a525ccf295445d3239b80e5cacb10bf3c947