Commit Graph

5601 Commits

Author SHA1 Message Date
Mady Mellor
c0c307d83a am 2a8f0ca4: am 29f37e15: Merge "Text selection: When user reaches midpoint jump to end of word" into mnc-dev
* commit '2a8f0ca4579aa3ee610d63ce5b0c6e4fb12f851a':
  Text selection: When user reaches midpoint jump to end of word
2015-06-26 18:01:31 +00:00
Mady Mellor
130d8638d5 am 3dc688c8: am 10f92517: Merge "Text selection: Fix word boundaries for languages without spaces" into mnc-dev
* commit '3dc688c85f223cb0ef184d451255120e82f52ea2':
  Text selection: Fix word boundaries for languages without spaces
2015-06-26 18:01:25 +00:00
Mady Mellor
29f37e1597 Merge "Text selection: When user reaches midpoint jump to end of word" into mnc-dev 2015-06-26 17:38:08 +00:00
Mady Mellor
10f9251736 Merge "Text selection: Fix word boundaries for languages without spaces" into mnc-dev 2015-06-26 17:33:22 +00:00
Seigo Nonaka
4ce47333d0 am 3178da6b: am 084b7a15: Merge "Do not show selection action mode when the TextView is not shown." into mnc-dev
* commit '3178da6b57a44e137e5f2b904709d35467a64f82':
  Do not show selection action mode when the TextView is not shown.
2015-06-26 15:09:33 +00:00
Seigo Nonaka
084b7a15c9 Merge "Do not show selection action mode when the TextView is not shown." into mnc-dev 2015-06-26 05:10:35 +00:00
Doris Liu
c9ea383498 am 8fc84d73: am 9206d6a0: Merge "Fix logic for whether beginning/end divider should be drawn" into mnc-dev
* commit '8fc84d733c992e361f542eddf3f0770be2ba27a1':
  Fix logic for whether beginning/end divider should be drawn
2015-06-25 22:55:28 +00:00
Doris Liu
9206d6a0e6 Merge "Fix logic for whether beginning/end divider should be drawn" into mnc-dev 2015-06-25 22:43:14 +00:00
Alan Viverette
1ffeb7bf9e am 77f9e5dc: am d5b18387: Merge "Ensure partially-detached AbsListView children are removed" into mnc-dev
* commit '77f9e5dcbbb02957a39d62971aa0a44acea2d7c0':
  Ensure partially-detached AbsListView children are removed
2015-06-25 22:42:07 +00:00
Doris Liu
ec6a4cdeda Fix logic for whether beginning/end divider should be drawn
Bug: 18945384
Change-Id: Ib8e785cb97d288e39a39b968bcb9c05410acbe34
2015-06-25 15:29:41 -07:00
Alan Viverette
8bbae343d2 Ensure partially-detached AbsListView children are removed
Bug: 22052083
Change-Id: If8c30c622206257587441bbd4f02c83eb3a62b60
2015-06-25 14:49:29 -07:00
Alan Viverette
a812772235 am 0049338b: am e71c6e38: Merge "Constrain ListPopupWindow hint width spec to >= 0" into mnc-dev
* commit '0049338bf632ae1f602c6a2f888ec21af1895999':
  Constrain ListPopupWindow hint width spec to >= 0
2015-06-25 20:21:38 +00:00
Alan Viverette
113173d5a4 am 386dbb89: am fdf102e6: Merge "Constrain child width and height to >= 0 in FrameLayout.onMeasure()" into mnc-dev
* commit '386dbb894577783235788786cf296f14e78f69ec':
  Constrain child width and height to >= 0 in FrameLayout.onMeasure()
2015-06-25 20:21:32 +00:00
Yohei Yukawa
6a402ca629 am d408d293: am ab142f7f: Merge "Handle back key to cancel text action mode in full-screen IME." into mnc-dev
* commit 'd408d293a516a3022c0f80d54a93a2f83288af46':
  Handle back key to cancel text action mode in full-screen IME.
2015-06-25 20:07:50 +00:00
Alan Viverette
e71c6e3832 Merge "Constrain ListPopupWindow hint width spec to >= 0" into mnc-dev 2015-06-25 20:00:56 +00:00
Jun Mukai
08b643ddcc am cc45eeff: am 46f087c4: Merge "Apply thumbTint and trackTint styles to Switch from xml." into mnc-dev
* commit 'cc45eeff204235e769272f443194a5606bc13343':
  Apply thumbTint and trackTint styles to Switch from xml.
2015-06-25 20:00:21 +00:00
Alan Viverette
ba4332d9cf Constrain ListPopupWindow hint width spec to >= 0
Bug: 22092169
Change-Id: Ia05302cf8d167aae26eccbf53dd3fd21d09b326d
2015-06-25 13:00:03 -07:00
Alan Viverette
fdf102e62d Merge "Constrain child width and height to >= 0 in FrameLayout.onMeasure()" into mnc-dev 2015-06-25 19:57:03 +00:00
Yohei Yukawa
ab142f7f57 Merge "Handle back key to cancel text action mode in full-screen IME." into mnc-dev 2015-06-25 19:39:36 +00:00
Alan Viverette
39fd902bdb Constrain child width and height to >= 0 in FrameLayout.onMeasure()
Bug: 22093669
Change-Id: I55e8a0289f871b73ed07f3d73e8297786f9acac1
2015-06-25 12:24:27 -07:00
Jun Mukai
46f087c43b Merge "Apply thumbTint and trackTint styles to Switch from xml." into mnc-dev 2015-06-25 18:16:57 +00:00
Alan Viverette
81979f8cee am df6ca3cd: am efb49bd8: Merge "Constrain width and height to >= 0 in FastScroller layout" into mnc-dev
* commit 'df6ca3cdae40ff8a0ea93c570406a969a9602aca':
  Constrain width and height to >= 0 in FastScroller layout
2015-06-25 17:28:32 +00:00
Alan Viverette
efb49bd811 Merge "Constrain width and height to >= 0 in FastScroller layout" into mnc-dev 2015-06-25 17:08:42 +00:00
Alan Viverette
de14ad55f6 Constrain width and height to >= 0 in FastScroller layout
Bug: 22071990
Change-Id: I9dcb2066ee069a3764b7d711cb341a4dfdc4445e
2015-06-25 09:57:30 -07:00
Seigo Nonaka
145252f840 Do not show selection action mode when the TextView is not shown.
OnPreDraw is called even if the View is not visible.
So need to check isShown() and hasWindowFocus() before calling
starting selection action mode.

This hack is originally introduced for keeping selection on device rotation.
I manually verified this issue does not revive with this CL.

Bug: 22036870
Change-Id: I814db6165e2345fcacedcbd399c1a3985501c8fd
2015-06-26 01:30:40 +09:00
Mady Mellor
e72764f8bb am 9fc12583: am d4d802be: Merge "Fix: Don\'t display the drag handles when focus is lost" into mnc-dev
* commit '9fc1258344e30590abcb664942510f4dab8e06ba':
  Fix: Don't display the drag handles when focus is lost
2015-06-25 16:18:52 +00:00
Andrei Stingaceanu
ede6cfa5ed am 705a9abc: am 3d7109a1: Merge "EditText - can not drag handles in extracted mode" into mnc-dev
* commit '705a9abcd4e4c61e72821f3c5f58271f77d93882':
  EditText - can not drag handles in extracted mode
2015-06-25 16:18:47 +00:00
Mady Mellor
d4d802be39 Merge "Fix: Don't display the drag handles when focus is lost" into mnc-dev 2015-06-25 15:54:03 +00:00
Andrei Stingaceanu
3d7109a1f6 Merge "EditText - can not drag handles in extracted mode" into mnc-dev 2015-06-25 15:52:51 +00:00
Mady Mellor
a2861454aa Fix: Don't display the drag handles when focus is lost
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
2015-06-25 08:40:27 -07:00
Andrei Stingaceanu
1cb1f1523a EditText - can not drag handles in extracted mode
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
2015-06-25 11:54:43 +01:00
Jun Mukai
9fb302cfbc Apply thumbTint and trackTint styles to Switch from xml.
Bug: 21664957
Change-Id: Id08ae89fb1586968df4b901816a8e108bb8570af
2015-06-24 18:31:06 -07:00
Alan Viverette
a54e28865a am 1983fdca: am 10bf27e2: Merge "Avoid negative childSpecSize in RelativeLayout" into mnc-dev
* commit '1983fdca61eecfd964cc8b7842e2b19806fd4d1c':
  Avoid negative childSpecSize in RelativeLayout
2015-06-25 00:31:43 +00:00
Alan Viverette
39310d3606 Avoid negative childSpecSize in RelativeLayout
Bug: 22071351
Change-Id: I951fd7c7973c49581d3ea30bae64d6c20bc362be
2015-06-24 17:03:48 -07:00
Alan Viverette
ff9b80d3be am 44863749: am 9bf9a3a9: Merge "Constrain FastScroller max width to be >= 0" into mnc-dev
* commit '448637498e66a8b5d2914ed0a99238c0a95c1133':
  Constrain FastScroller max width to be >= 0
2015-06-24 18:49:35 +00:00
Alan Viverette
9bf9a3a99e Merge "Constrain FastScroller max width to be >= 0" into mnc-dev 2015-06-24 18:22:33 +00:00
Alan Viverette
c98922ba2f Constrain FastScroller max width to be >= 0
Bug: 22055552
Change-Id: Ib0bba93e5490ad9d8668c9532f23654a8cb702d9
2015-06-24 10:22:02 -07:00
Andrei Stingaceanu
6517e67c1b am f7ed99e6: am 2e561546: Merge "Floating toolbar shown after rotation in extract mode" into mnc-dev
* commit 'f7ed99e6bc20f4692b0564b3eb18b1de2cd47129':
  Floating toolbar shown after rotation in extract mode
2015-06-24 09:58:04 +00:00
Andrei Stingaceanu
2e5615467e Merge "Floating toolbar shown after rotation in extract mode" into mnc-dev 2015-06-24 09:16:36 +00:00
Yohei Yukawa
38940aab69 Handle back key to cancel text action mode in full-screen IME.
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
2015-06-24 00:20:24 -07:00
Dianne Hackborn
3eb5480b34 am 4401943e: am a6fb1e70: Merge "Fix issue #20654534: API Review: android.app.assist" into mnc-dev
* commit '4401943e7723e1ba09469df72db1f4e5b0306016':
  Fix issue #20654534: API Review: android.app.assist
2015-06-23 21:06:39 +00:00
Keisuke Kuroyanagi
da0b7033e6 am 30e7f79b: am 1384d1d9: Merge "Fix: TextView makes new layouts too frequently." into mnc-dev
* commit '30e7f79bd0a5ab7cdf6c543668dfbda89c2b054e':
  Fix: TextView makes new layouts too frequently.
2015-06-23 20:46:24 +00:00
Dianne Hackborn
a6fb1e70ff Merge "Fix issue #20654534: API Review: android.app.assist" into mnc-dev 2015-06-23 19:33:04 +00:00
Keisuke Kuroyanagi
1384d1d900 Merge "Fix: TextView makes new layouts too frequently." into mnc-dev 2015-06-23 17:56:48 +00:00
Wale Ogunwale
ca1ce9382b am 781ec7e9: am e6734b6b: Merge "Fix javadoc for Adapter.getViewTypeCount()"
* commit '781ec7e9d408dacfab761c02d6e4b1345c5dfd87':
  Fix javadoc for Adapter.getViewTypeCount()
2015-06-23 17:28:30 +00:00
Andrei Stingaceanu
8383072752 Floating toolbar shown after rotation in extract mode
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
2015-06-23 13:31:35 +01:00
Mady Mellor
e264ac392a Text selection: Fix word boundaries for languages without spaces
WordIterator's getEnd/getBeginning methods does not support the needs
for word boundary detection in text selection. Consider the words
AABB (where AA and BB are each words). If getEnd is given the offset
on the boundary between AA and BB, it would return that offset since
it is the end of AA. For text selection we always want the "next end"
if available.

This CL adds two methods to word iterator that return the next end
and previous beginning.

This CL also alters the code in Start/EndHandle to use the x value
and current / prev line positions to determine if the user is
expanding or contracting the selection.

Bug: 21305292
Change-Id: I6e7a83e53e245d71e43d78f1957f844f2ed1cdfb
2015-06-22 16:46:29 -07:00
Alan Viverette
ed0e11a93a Merge "Ensure child is attached before performing measure/layout in Spinner" into mnc-dev 2015-06-22 23:07:33 +00:00
Alan Viverette
aeaa396cae Merge "Revert "Revert "Work around inconsistent views in RelativeLayout.onMeasure()""" into mnc-dev 2015-06-22 22:38:09 +00:00
Alan Viverette
9554f9fc9e Revert "Revert "Work around inconsistent views in RelativeLayout.onMeasure()""
Turns out this was actually fine.

This reverts commit 9355533bf6.

Change-Id: I30c66fd423b569958244685098511d4ba08fbf37
2015-06-22 22:37:58 +00:00