Select with double tap in extracted mode has suffered
a regression recently: flickers and it does not correctly
select. Found this fix after a lot of trials.
Bug: 20128047
Change-Id: I1bbe8c11982d37e5409bac2b648a31b0ca1f0bbc
The issue states that NumberPicker.setWrapSelectorWheel(false) only works
in a specific call order. The underlying problem is that NumberPicker
does not remember user's preference on whether the selector wheel should
be wrapped. Therefore, it only works when user sets their preference last,
after everything else that could affect the choice gets executed.
Bug: 19049714
Change-Id: Ic27d909cb3dd657993a4df9a04c819b6965ad11b
The bounce-back reliably happened when AbsListView.fling
was called with high enough velocity (>50000). Such values
caused integer overflow when squared in the course of some
ballistic calculations in OverScroller.fitOnBounceCurve.
Bug: 19056278
Change-Id: I35d5376c67bc6847955b44ee268e89bce2db81d0
TextView#checkForRelayout was almost always called in
TextView#onRtlPropertiesChanged.
However, #onRtlPropertiesChanged just checks if re-layout
can be skipped for when the text has changed. As a result,
TextView makes new layouts too frequently in that method.
With this patch, TextView#checkForRelayout is called only
when mTextDir has actually changed.
Bug: 17971103
Change-Id: I449d8c8fd7370495cd5af9e38cada942744ca801
These methods are generally useful for writing custom views, and by
exposing them we make it easier for custom view authors to still allow
app developers to use an OnHierarchyChangedListener since it will not
be occupied by a custom view's implementation.
Also move the actual dispatch to package-scoped dispatch methods so
that a developer forgetting to call super won't stop a listener from
functioning.
Bug 21866523
Change-Id: Ie2bb5e241d7c5a02a5033f33ecdaeb40aceb20b5
On more careful reflection, the "indents" feature was not ready for
inclusion in the public API. It is still available at a lower level
in StaticLayout.
Also fix a minor typo in the doc for breakStrategy.
Bug: 20641996
Change-Id: I5cd976a536c48615980860396b1564b51b19e14a
Changes to drawable dimensions were not propagated to cached dimension
values in ImageView. Now this is done when the drawable is invalidated.
Issue #18798152 ImageView caches wrong value of mDrawableWidth and mDrawableHeight
Change-Id: I8da7d82b0543fa02d8ef3d896595bd0e5ea2a61e
Previously, RelativeLayout's measure pass could crash if the view's
children were modified without calling requestLayout() prior to the
next measure pass. This avoids the issue by only looking at the most
recent set of sorted views and preserves the previous behavior where
onMeasure() could return incorrect data.
Bug: 21123292
Change-Id: If471d071d1d2e2729cf13854d95b1f517c1fe73a
Applying same method to insertion cursor as the text selection drag
handles to improve moving along lines.
Basically adds some slop above / below the current line and only
allows you to change lines if you move outside of that.
Bug: 21306433
Change-Id: I6c7f3a496fbd1ea66936832f96325736cea872aa
It's pretty easy to accidentally move to a different line when
selecting text. This CL makes an adjustment so that if the user
is on a line, they must move above the top of it + slop to move
up a line, and they must move below the bottom of it + slop to move
down a line. This applies the changes to the drag accelerator.
This CL also makes an adjustment to not apply the finger offset
to the drag accelerator until the user has moved lines, this was
causing an issue where it would immediately include the above line
when initiating the selection.
Bug: 21306433
Bug: 21303943
Change-Id: Id240136493f62524fe6445d8bd65479084fe8126
It's pretty easy to accidentally move to a different line when
selecting text. This CL makes an adjustment so that if the user
is on a line, they must move above the top of it + slop to move
up a line, and they must move below the bottom of it + slop to move
down a line.
This CL also makes a small modification to check if the layout is
null and return early which simplifies some of the following code.
Bug: 21306433
Change-Id: I4a854e644faafaf1e159201ae1f2838862f16b25
Button press events now occur in onGenericMotionEvent rather than
onTouch event, this alters the code to listen in onGenericMotionEvent.
Bug: 21148238
Change-Id: Idfbd61683f40a25964c14ec26b71042657e2aaeb
-Flicker was a side effect the delay in hiding the toolbar when
there is a down press on a TextView handle. The timing clashed
with the time it takes for the FloatingActionMode to release a
hide lock on a changing content rect. Extra flickers also happened
if the ActionMode happened to be invalidated at about the same time.
Since there was no longer a hide lock, the toolbar refreshed, getting
rid of the "Select all" menu item.
FIX. I believe we don't need the delayed hide on down press on a
TextView handle. I've removed this.
-I've also updated FloatingActionMode to ensure that hide locks
overlap one another if necessary. The toolbar can only be visible if
all locks are off.
Bug: 21793687
Change-Id: I290ea45ab17d5862b453cb319afb4c8ffe084cd0
ListView had a bug where it would pass wrong view to
the adapter if adapter is using HEADER or IGNORE types
for views.
This CL fixes that issue and ensures that ListView
will not try to search scrap view lists for these
views which are never recycled.
Bug: 19409057
Change-Id: I2653bbca93fbaf48567b47d10f273c8921d59bd2
The previous implementation of toggling visibility resulted
developer-set child visibility getting stomped. Fully detach child
views that shouldn't be shown instead. This is more consistent with
the coming and going of other system child views.
Bug 18156260
Change-Id: I8469d45eeb950dc0232f703efe8401233241c657
Issue #21039494: API Review: android.os.PowerManager.isDeviceIdleMode()
Issue #21347000: API Review: android.content.IntentFilter
Issue #20654534: API Review: android.app.assist
Also allow use of ActivityManager.setWatchHeapLimit on any platform
build as long as the calling app is debuggable.
Change-Id: Ic597e596fa772fcdf2553b64f444b3d9269e8b92
As of MNC stock widgets will pass a size in UNSPECIFIED MeasureSpec
values as a hint of the container size. This lets things like list items
size themselves at 1/3 the size of their container.
This breaks assumptions in a few existing applications, so maintain the
old expectation of 0 size in UNSPECIFIED MeasureSpecs for apps targeting
older SDK versions.
Bug 20975083
Change-Id: Ic7318e88854e00d96852dde2c0e10376b42bf77f
This fixes a crash that happened because mStartOffset
could point to an invalid offset after changing the text.
Bug: 21178876
Change-Id: I2fbb5ea3d6b8c5a97ca7248116b58ead673a8b0a
This reverts commit 259292ff3d.
This introduced another bug (Bug: 21687602) and this is no longer useful
for the original one (Bug: 21178876).
Change-Id: I59acc161e7d8cba633718a3d17292e68740ef79e
Reverts "MenuItem, navigation and overflow icon tinting" CL,
and adds getter and setter for the overflow icon to ActionMenuView
and Toolbar.
BUG: 21571899
Change-Id: I591f43650356443fa3256e4d74e28b6ddd8c2b33