In support of layout of paragraphs to non-rectangular regions, add
arrays for left and right indents to TextView, along with supporting
StaticLayout builder setters.
Bug: 20182243
Change-Id: I015bcef8f258c89001fcf8a54c179d2dfc0d7943
TextView.extractText crashes when null argument(s) is given. This patch
adds a null-check and prevents the crash.
Bug: 5762732
Change-Id: I945b6cde77f30cb5ee2944797732ec69890711bf
The gesture is: stylus touching screen + button pressed, the event
is recognized when the button is pressed, not when it's released.
It can be pressed during DOWN or MOVE.
Bug: 19620479
Change-Id: I4ce2cea4eb058e308ba88ef3dd3bed278bdca555
This CL makes sure the selection is not cleared when a text processing
intent starts, so that we can properly replace the selection when it
comes back.
It also fixes a related issue with the selection handles. The previous
code assumed a text selection mode starts from touch and enters drag
mode by default. This CL makes the code conscious of whether it should
show the selection cursors or enter drag mode.
BUG: 20148456
Change-Id: Ie8632e4a96f431dc6b2e4d0b4d3978eb55149172
Previous ActionBar animations didn't handle configuration changes
or other situations in which the view would get detached. listeners
would stay on the view and would attempt to do something nonsensical
in the new window. This new approach removes listeners on window
detach to avoid this problem.
Issue #20125407 Settings Crashes when changing orientation of device
Change-Id: I0b3bbd0f6fc23cdb4cbd646b0d2772d72d3d795d
The current firstStrong value of textDirection is locale-dependent,
and can create problems when consistent display of text across
locales of potentially different direction is desired.
This adds two new values for textDirection, firstStrongLtr and
firstStrongRtl, which don't use the locale or the view's direction as
fallback, but explicit values of LTR or RTL.
Using firstStrongLtr also guarantees the exact algorithm defined in
the Unicode Bidirectional Algorithm to be used for determining
direction.
Bug: 13428339
Change-Id: I450d4f6b5197763ace7f9506c72cf87a90da4218
This CL adds the Activities that support Intent.ACTION_PROCESS_TEXT
to the Text Selection Action Mode in Editor, and triggers an intent
with the currently selected text when they are selected.
It also adds the required mechanism to allow a View to request an
intent to be started, and return the activity result back to it.
Change-Id: I62ec618010edf01da41338c8c1a7dd4292a15227
In some cases, the cursor in a TextView is split. This happens with
RTL languages. For this case we need to ensure neither of the half
cursors is obscured by the Floating Toolbar, hence we take the
minimal rectangle that contains both cursors as the content rect.
Change-Id: I2ce411793fcba2140c4ad7fb7caaf03593620484
Real fix will come later, but this disables the animations to work
around the current crash.
Issue #20125407 Settings Crashes when changing orientation of device
Change-Id: I748e8889f72483c82cff084c5815322057f16f03
It turned out that text selection is unexpectedly cancelled by
InsertionPointController if it is visible. The InsertPointController
is not necessary if there is a selection, so just hiding before
performing set selection fixes this issue.
Bug: 19946192
Change-Id: I2afce1789d772a8d2ea368643cc7533561ee2bf0
Also ensures that ProgressBar doesn't create a tiled drawable when it
doesn't actually need to.
Bug: 19574820
Change-Id: Id3b9b00e05a56055ed4b19def7044a0bf38e8ec1
The same behavior can be achieved by using a predraw listener, which
can be removed while the callback is called, so it doesn't crash.
Change-Id: I3a7138ba49936159dc95b7758c9603366dcf808c
Chnages to the ActionBar are now tracked so that new items,
items that go away, and items that change location are now animated into
their new state.
Issue #10863316 action bar items don't fade in correctly
Change-Id: Ia956b2b76958f02108c756dab2d1c2617a5904dc
Cleans up verbose R package in GridView, accessibility action docs,
and some lint warnings in AccessibilityNodeInfo. Makes the action IDs
for SHOW_ON_SCREEN and SCROLL_TO_POSITION public so that we can
guarantee they won't change (and thus reference them in support lib).
Change-Id: Ica53b7be7a68b84054b9bac1fc7958a21a42e089