The text selection handles should be hidden / shown when the window
loses / regains focus.
Additionally renames method to make more sense.
Bug: 22062480
Change-Id: I6e160234cf112ee285367637e2f1c14defd82e89
In TextView's onPreDraw method, startSelectionActionMode()
is called, but the selection has already been started so
in startSelectionActionMode() it shows the
insertionController which hides the selectionController.
Fix this by adding a check to start the action mode only
if it is not already started.
Bug: 22028858
Change-Id: I2999423155b7a63a7d879bc8ea5032e17dff459f
This CL is a follow up to I7998c8ee2162a0e01525a0cd66ec14fa505,
which completely removed ExtractActionMode including back key
handling in InputMethodService when full-screen mode is enabled.
It turns out that back key events still need to be handled in
InputMethodService when full-screen mode is enabled so that
users can still cancel floating text action mode with back key.
Bug: 22034992
Change-Id: I5f8db34f7425eef343d40d9820925ea6aaf9fccc
Do not start the floating toolbar action mode and
do not show the handles if after a rotation when the
extract mode will be started. This fixes an issue where
onTouch after rotate duplicates the handles in extracted
mode.
Note: if NO_EXTRACT_UI flag is set then the toolbar,
selection and handles preserve their state.
Bug: 21960251
Change-Id: I1c7881bf2f40d8877fa0ce26e27a29398edc1296
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