Commit Graph

5292 Commits

Author SHA1 Message Date
Mady Mellor
241e119679 Merge "Recognize stylus touch + press button as a longpress in AbsListView" 2015-04-16 16:54:41 +00:00
Clara Bayarri
1809427647 Merge "Editor: keep text selection when starting a process text intent." 2015-04-16 10:14:37 +00:00
Raph Levien
e319d5a362 Add left and right indent arrays to TextView
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
2015-04-15 18:57:53 -07:00
Yoshiki Iguchi
b1a3946712 Merge "TextView.extractText should not crash with null arguments" 2015-04-16 00:19:03 +00:00
Yoshiki Iguchi
ee14772531 TextView.extractText should not crash with null arguments
TextView.extractText crashes when null argument(s) is given. This patch
adds a null-check and prevents the crash.

Bug: 5762732

Change-Id: I945b6cde77f30cb5ee2944797732ec69890711bf
2015-04-15 18:09:52 +09:00
Chris Banes
5c1405e10c Merge "Unhide PopupWindow window layout type calls" 2015-04-15 07:05:51 +00:00
Mady Mellor
e556198495 Recognize stylus touch + press button as a longpress in AbsListView
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
2015-04-14 15:06:40 -07:00
Roozbeh Pournader
80003c6e9e Merge "Add more firstStrong alternatives for textDirection." 2015-04-14 17:41:18 +00:00
Mady Mellor
b3a0660eab Merge "Use HandleView's previous offset for text selection handles" 2015-04-14 16:52:06 +00:00
Clara Bayarri
578286fb32 Editor: keep text selection when starting a process text intent.
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
2015-04-14 16:49:25 +01:00
Chet Haase
575217fc3d Make ActionBar animations work correctly
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
2015-04-14 14:09:26 +00:00
Chris Banes
36344a90c2 Unhide PopupWindow window layout type calls
BUG: 20172711

Change-Id: I31bacf840908f77d2be96a6b10df495e30f0af07
2015-04-14 10:44:14 +01:00
Roozbeh Pournader
b51222a301 Add more firstStrong alternatives for textDirection.
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
2015-04-13 15:01:43 -07:00
Alan Viverette
147931e3f9 Merge "Fix date picker dialog size" 2015-04-13 18:13:48 +00:00
Clara Bayarri
28e7ba6644 Merge "Show and trigger activities that implement Text Processing actions" 2015-04-12 19:46:42 +00:00
Alan Viverette
816aa14202 Fix date picker dialog size
Also fixes date picker instance state restore and cleans up the fade
animations.

Bug: 20110268
Change-Id: I503e2f81253077f22f1619834dc2f2634138ae4e
2015-04-10 15:41:10 -07:00
Alan Viverette
9aac7f7038 Merge "Update rating bar assets for Material" 2015-04-10 21:56:27 +00:00
Clara Bayarri
94bf0d9157 Merge "Editor: Account for a split cursor in the content rect calculation" 2015-04-10 17:22:42 +00:00
Clara Bayarri
d5bf3ed9b0 Show and trigger activities that implement Text Processing actions
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
2015-04-10 16:28:35 +01:00
Clara Bayarri
b7419dd76e Editor: Account for a split cursor in the content rect calculation
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
2015-04-10 15:45:07 +01:00
Clara Bayarri
4c42bc045d Merge "Editor: Allow invalidation of the Text Selection Action Mode" 2015-04-10 10:02:21 +00:00
Seigo Nonaka
7bfcad3427 Merge "Fix unexpected selection cancellation" 2015-04-10 04:35:38 +00:00
Clara Bayarri
32b7f9fbcc Merge "Editor: Turn on Floating Toolbar Action Mode for Text Selection" 2015-04-09 21:31:51 +00:00
Chet Haase
6498506330 Merge "Fix breakage from ActionBar animations" 2015-04-09 20:38:07 +00:00
Chet Haase
1ae7c28440 Fix breakage from ActionBar animations
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
2015-04-09 11:42:30 -07:00
Seigo Nonaka
bb6a62c2be Fix unexpected selection cancellation
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
2015-04-09 17:55:00 +00:00
Alan Viverette
d278a3f092 Merge "Fix fast scroller thumb and track margins for Material" 2015-04-09 16:44:23 +00:00
Clara Bayarri
b8ed5b75da Editor: Turn on Floating Toolbar Action Mode for Text Selection
Change-Id: I267809e8cd5f10a3f9efd8f555ad24c7a935fdb8
2015-04-09 17:16:53 +01:00
Clara Bayarri
13152d1c72 Editor: Allow invalidation of the Text Selection Action Mode
This allow us to add/remove the "replace" item, which depends on
having a replacement span.

Change-Id: I47b6487fc91f80b9dab13e90b8d630194b3f9beb
2015-04-09 13:40:20 +01:00
Alan Viverette
ff9f7b9646 Update rating bar assets for Material
Also ensures that ProgressBar doesn't create a tiled drawable when it
doesn't actually need to.

Bug: 19574820
Change-Id: Id3b9b00e05a56055ed4b19def7044a0bf38e8ec1
2015-04-08 10:49:26 -07:00
Jorim Jaggi
74a94059c6 Fix crash when removing draw listener
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
2015-04-08 10:47:22 -07:00
Chet Haase
81b924fcb6 Merge "Animate ActionBar items" 2015-04-08 14:11:38 +00:00
Chet Haase
952cba2e07 Animate ActionBar items
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
2015-04-07 16:26:32 -07:00
Alan Viverette
7f9f68f8a0 Merge "Fix hours in clock" 2015-04-07 22:54:49 +00:00
Alan Viverette
fc76a64be7 Fix hours in clock
Bug: 20096871
Change-Id: Ib4f155f6b6221bd2a41af86a018d42ddea372950
2015-04-07 15:37:30 -07:00
Adam Powell
20a2ef45e1 am f401d637: am 947b5029: am 8391e03b: Merge "ProgressBar: Fix error of process bar cannot update on some condition."
* commit 'f401d63796d9a7f81e8d1a4adf6ae2615faa7d91':
  ProgressBar: Fix error of process bar cannot update on some condition.
2015-04-07 22:02:38 +00:00
Alan Viverette
e5f1fff6db Fix fast scroller thumb and track margins for Material
Bug: 20091610
Change-Id: Iab023872381aee16be2c83fcf1a622a20619ca49
2015-04-07 14:39:04 -07:00
Adam Powell
947b5029e5 am 8391e03b: Merge "ProgressBar: Fix error of process bar cannot update on some condition."
* commit '8391e03b7ef20f22ffc31da43e01b2fb8d1ec00a':
  ProgressBar: Fix error of process bar cannot update on some condition.
2015-04-07 21:23:50 +00:00
Adam Powell
8391e03b7e Merge "ProgressBar: Fix error of process bar cannot update on some condition." 2015-04-07 20:56:36 +00:00
Alan Viverette
61cbc1f74f Merge "Add accessibility action for scrolling to a collection position" 2015-04-07 17:21:08 +00:00
Alan Viverette
6c6d266c40 Merge "Fix progress tint attributes" 2015-04-06 23:11:51 +00:00
Alan Viverette
23f4432437 Add accessibility action for scrolling to a collection position
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
2015-04-06 16:04:56 -07:00
Alan Viverette
dbc401888d Fix progress tint attributes
Change-Id: Ie22f5177144ecbe981f6b342236714a3ce520cbc
2015-04-06 15:01:23 -07:00
Alan Viverette
88e5103232 Fix inner/outer circle swap and dot color in RadialTimePickerView
Bug: 20041669
Change-Id: Iefdd477136970efe1638982c1f659fbb4f452676
2015-04-06 14:38:37 -07:00
Joseph Cooper
88dc5ba692 Merge "Documents the ImageView.ScaleType attributes" 2015-04-03 23:35:40 +00:00
Joseph Cooper
d96fdbd0cd Documents the ImageView.ScaleType attributes
Although the ImageView.ScaleType enum is documented, that
documentation was not reproduced in the xml attributes.  Copying the
documentation across should fill the previously empty 'Description'
column in
http://developer.android.com/reference/android/R.attr.html#scaleType
and
http://developer.android.com/reference/android/widget/ImageView.html#attr_android:scaleType

Also adds javadocs to ImageView.setImageMatrix(Matrix) because the
ScaleType documentation refers to it and it was also empty.

Change-Id: I7768549970eab2ebfe38cc4677a58dc91e104588
2015-04-03 15:16:38 -07:00
Dianne Hackborn
9e57a25495 Merge "Rework assist to walk down the view hierarchy." 2015-04-02 18:18:42 +00:00
Elliott Hughes
d14f7f12a1 am 095428d2: am d15958f6: am 64c8a073: Merge "Early return in RemoteViewsAdapter is too late"
* commit '095428d262f1cb0cf09d8722fdd9a53661d7513b':
  Early return in RemoteViewsAdapter is too late
2015-04-02 02:58:34 +00:00
Alan Viverette
0048b6e629 Merge "Scale month view for small screens, use verbatim span for AM/PM label" 2015-04-02 02:51:24 +00:00
Elliott Hughes
d15958f661 am 64c8a073: Merge "Early return in RemoteViewsAdapter is too late"
* commit '64c8a07345cb7cb01b3e98442b52c51d473fbf2d':
  Early return in RemoteViewsAdapter is too late
2015-04-02 01:13:09 +00:00