Commit Graph

6079 Commits

Author SHA1 Message Date
Selim Cinek
7943316678 Merge changes I2af07b57,Ic0a774e8,Ica3d21ff,Id4c3c901
* changes:
  FalsingManager Quick settings fix
  Fixed a bug where the panel could be too small in certain cases
  Fixed a bug where the margins where not updated correctly
  Fixed the handling of the expand on the lockscreen
2015-12-02 19:08:58 +00:00
Keisuke Kuroyanagi
5d7657e99b Refactoring: SelectionHandleView.
Remove code duplication in SelectionStartHandleView and
SelectionEndHandleView by introducing SelectionHandleView.

Change-Id: I4486019714b13d184a72cf7ee60c346c4d8b5f5a
2015-12-01 17:30:51 -08:00
Selim Cinek
a89ef23e8c Fixed a bug where the margins where not updated correctly
When updating a notification, the end margin was not
correctly updating, leading to overlapping text with
the image.

Change-Id: Ica3d21ff0268105d0a8a73527b8dad0225e12d5a
2015-12-01 13:04:31 -08:00
Selim Cinek
4fb12d3f8e Made the bigtext now nicely float around the image
If there is an image instead of applying the same
margin everywhere, the text now floats around the
image.

Change-Id: I87f9ca9f51fb270b0732a99374544381bd1fc4e0
2015-11-30 17:45:15 -08:00
Selim Cinek
65b2e7c6cb Update the notification templates
Most of the notification templates have been updated.
Some cases like media notifications don't yet work well
but will be fixed in a later CL.

Bug: 25376106
Change-Id: I26c366e58ebba3852cea20de6fca311bd302bb24
2015-11-30 17:45:15 -08:00
Raph Levien
f9b40659e6 Merge "Always invalidate TextView on checkForRelayout" 2015-11-30 21:07:07 +00:00
Alan Viverette
5ac42c92fa Always invalidate TextView on checkForRelayout
Previously we would check whether relayout was required and optionally
invalidate; however, with partial layout we leave this work for the
makeNewLayout() method. We still need to manually invalidate, though,
since makeNewLayout() does not handle invalidation.

Bug: 25857300
Change-Id: I81ef9062c9fb4964d5e42a3562e6c782492ad65f
2015-11-30 13:03:00 -08:00
Yohei Yukawa
777ef95ebf Use Context.getSystemService(Class<T>) for InputMethodManager.
This is a mechanical replacement of Context.getSystemService(String)
with Context.getSystemService(Class<T>) when retrieving
InputMethodManager.  Note those are bundled code.  Hence we don't need
to make sure Build.VERSION.SDK_INT >= 23.

Change-Id: Icc64942ad8f11e44bf84f8d4fe476b2fdd1257f3
2015-11-26 00:02:05 -08:00
Keisuke Kuroyanagi
d3c48931ea Merge "Add selection handle dragging tests." 2015-11-25 07:24:17 +00:00
Keisuke Kuroyanagi
da79ee683d Add selection handle dragging tests.
- Set an id for each HandleView to access the hanlde.
- Rename DragOnTextViewActions to DragAction to use it for
dragging handles.
- Introduce HandleCoordinates to provide proper coordinates
for handles.

More tests will be added in following CLs.

Bug: 25730231
Change-Id: I9276bf2f983983ec9aae0ddcf674d3dcee566892
2015-11-25 16:15:15 +09:00
Seigo Nonaka
a71a244ec6 Make suggestion window style material.
To make suggestion window style Material, this CL does following things:
1. Introduce LinearLayout to be able to split suggestion item and menu.
 Currently suggestion menus, "Add to Dictionary" and "Delete" buttons
 are children of ListView. It is necessary to introduce LinearLayout
 and move these two menus from ListView to this LinearLayout to have a
 divider between suggestion items and menus.

2. Extract suggestion window layout definition from Java.
 Currently almost all layout of suggestion popup window is done by
 Editor.java. By extracting this logic from Java and move it to XML
 files, it becomes easy to support both Holo and Material theme.

3. Introduce Material Design.
 Suggestion window should respect the running application's theme since
 suggestion window is shown as the part of the application.
 This patch introduces Material themed suggestion window, and at the
 same time, the old window is also kept as the Holo themed suggestion
 window.

Bug: 15347319
Change-Id: Ieccea12db95c0a040b38680ae794b1cf6971736f
2015-11-24 12:05:48 +09:00
Adrian Roos
10613a9472 Merge "Visuals for Inline Reply" 2015-11-23 22:19:09 +00:00
Adrian Roos
fe84e1f436 Visuals for Inline Reply
Change-Id: I374a7ec82795f95fe2f3ce8c9e6b02c1479433af
2015-11-23 20:07:49 +00:00
Alan Viverette
12209b9afe Merge "Only look for nearest child View in ViewGroup" 2015-11-23 17:26:38 +00:00
Alan Viverette
708aa9d964 Dispatch the actual PopupWindow dismiss callback to PopupMenu
Previously the dismiss callback was called immediately after the menu
received a close request; however, the dismiss callback implies that
the menu's window has finished animating and been removed from the
window manager.

Also cleans up handling of mPopup in MenuPopupHelper to prevent
unnecessary MenuPopup allocations and convert unnecessary fields into
method arguments.

Bug: 25323707
Change-Id: I8e3877ae6c40b4d0f1df23a4ff4fa48a7df34e0d
2015-11-20 15:21:30 -05:00
Alan Viverette
7add7e0496 Only look for nearest child View in ViewGroup
NearestTouchDelegate may still be assigned to non-ViewGroup views, but
we won't attempt to find a target child View until the touch moves into
a ViewGroup.

Bug: 25813455
Change-Id: I570f88fee63623110e3463e8d4579cca8113fd5e
2015-11-20 14:19:39 -05:00
Alan Viverette
68016a66f6 Set mTempCalendar in TimePickerSpinnerDelegate
A previous CL removed setLocale(), which had been initializing the temp
calendar. This CL also makes the calendar final, since the locale is only
set once during construction.

Bug: 25776094
Change-Id: If0af34df3120a7c4b1667129a553b9f8b7ec1999
2015-11-19 17:10:54 -05:00
Adam Powell
c55d5072ac Add support for partial view layouts
Traditionally, when a view called requestLayout it would force
recursive requestLayout calls for all parent views up the
hierarchy. This meant that there was no way to determine at traversal
time whether a parent view itself needed layout, or if just one of its
descendants did.

Add a ViewParent method requestPartialLayoutForChild(View). This lets
a caller state that a particular child of a given parent needs a
remeasure and relayout at its current measured size and position
within that parent. This can help prevent the full-tree relayout often
caused by otherwise trivial changes. Partial layouts are processed
after any pending "full" relayout during ViewRoot traversals, but
before drawing.

Add a ViewGroup method requestLayoutForChild(View). This lets a
ViewGroup decide whether it is more appropriate to request a
traditional relayout or a partial layout for itself or just the child
that changed.

Add a ViewParent method findDependentLayoutAxes. This allows a caller
to check if the ViewParent's layout is dependent on a specific direct
child view along one or both axes. Called recursively, this can be
used to determine if a change in a child view can be isolated to a
partial layout, even if its direct parent's own layout is tied to its
other ancestors. (e.g. MATCH_PARENT, LinearLayout weights)

Implement ViewGroup#requestPartialLayoutForChild to call new
ViewParent method findDependentLayoutAxes and based on the result,
either request a full layout for itself or a partial layout for the
child in question.

Implement findDependentLayoutAxes for common framework ViewGroups. A
private implementation in ViewGroup is available for use by framework
classes that will deal with basic LayoutParams. These implementations
specifically check for derived LayoutParams classes and abort the
optimization if they find something beyond their expected parameter
types.

Change-Id: I0a1a9b79293d17d4fae8d9892b96d3586f9401ae
2015-11-19 09:31:56 -08:00
Aurimas Liutikas
664e040f7b Merge "Start saving CheckedTextView checked state." 2015-11-18 21:06:14 +00:00
Siyamed Sinir
6fbb5c1ca4 Merge "TextView setText/append methods set movement method" 2015-11-18 18:32:22 +00:00
Siyamed Sinir
4ba0aa598e TextView setText/append methods set movement method
Previously, TextView setText and append methods set the movement
method to LinkMovementMethod only when autoLink was enabled and
Linkify was able to find links in the input text. This CL adds the
case where autoLink is false, linksClickable is true, and the input
text contains ClickableSpans.

Fixes https://code.google.com/p/android/issues/detail?id=2219

Bug: 1712837
Change-Id: Ife4e35bac7f6cb48ad0dac6ecb4b90aec126fc73
2015-11-17 17:56:03 -08:00
Aurimas Liutikas
e3fa176472 Start saving CheckedTextView checked state.
Match the behavior of other widgets and start saving
CheckedTextView checked state.

Bug: 25720678

Change-Id: I8c3df3a67f4cea848320e6075066516857d8cddf
2015-11-17 14:52:44 -08:00
Filip Gruszczynski
6c54e72892 Swtich from max_action_buttons resource to a method.
We want to limit the number of size thresholds that an application will
report. Instead of using a dimen resource that will increase the number
of thresholds, we calculate the max number of action buttons dynamically
in code.

Bug: 25394588
Change-Id: I8ece331cd02fb116b49734003cec112708d27f85
2015-11-17 12:56:08 -08:00
Alan Viverette
3f7191962d Merge "Update the TimePicker hour format when toggling 24-hour mode" 2015-11-17 19:47:31 +00:00
Alan Viverette
1ca1860f97 Merge "Clean up PopupMenu" 2015-11-16 22:24:29 +00:00
Alan Viverette
7323810898 Clean up PopupMenu
No functional changes, only refactoring:
- remove unused mShowCascadingMenus member variable
- move private interface implementations to anonymous inner classes
- move interfaces to end of class
- clean up docs formatting

Change-Id: Ib82ca0d3a3ff49207959a17b77c4ff4f11a1afc2
2015-11-16 16:55:58 -05:00
Alan Viverette
3b7e2b9102 Update the TimePicker hour format when toggling 24-hour mode
Bug: 25615007
Change-Id: I47a9f6b07e0cf7c86ca6d25c835a06878878d483
2015-11-16 16:38:38 -05:00
Alan Viverette
4420ae875d Clean up TimePicker
No functional changes, only refactoring:
- shorten method and variable names
- remove unused validation callback
- avoid using return in setters

Change-Id: Ie7c19cfe3c5cb515695f943c534899d37ad032bb
2015-11-16 16:10:56 -05:00
Siyamed Sinir
a0db63f6ef TextView.append() honors autoLink attribute
The append() method now checks if autoLink is set and adds the
URLSpans to given text before appending to the existing text.

Fixes https://code.google.com/p/android/issues/detail?id=1244
Fixes https://code.google.com/p/android/issues/detail?id=191353

Bug: 1404366
Bug: 25222125
Change-Id: I47a8beec9799e4f92ce266ceed41a634b7f7cc96
2015-11-12 15:25:31 -08:00
Seigo Nonaka
a17d8766d4 Merge "Clear suggestionSpan reference once popup window is closing." 2015-11-12 06:55:34 +00:00
Svetoslav Ganov
d07d7aff0b Merge "Add the set_test a11y action to EditText's action list" 2015-11-11 18:41:37 +00:00
George Mount
0af35b44f7 Merge "Improve DatePicker focus for keyboards." 2015-11-11 15:33:00 +00:00
Keisuke Kuroyanagi
6b814d8aed Merge "Use constants for return value of TextView#doKeyDown" 2015-11-11 02:35:18 +00:00
Keisuke Kuroyanagi
a08a48cb98 Merge "Support KEYCODE_{CUT, COPY, PASTE} in TextView." 2015-11-10 07:46:51 +00:00
Svetoslav
f4b1adad9c Add the set_test a11y action to EditText's action list
bug:25486055

Change-Id: Ibbc8acbc98d38e903bc65b4032ca12de7c50ba62
2015-11-09 19:59:23 +00:00
George Mount
e998c3f5f6 Improve DatePicker focus for keyboards.
Bug 24873983

Focus moves properly within the SimpleMonthView and between
components of the DatePicker.

Change-Id: I61778f9b4f19536ff6c7a512f9b4faf7bf4447a7
2015-11-06 15:48:52 -08:00
Alan Viverette
00aa5103e2 Reduce CascadingMenuPopup's reliance on internal ListView state
Bundles cascading menu information and stores it in a stack representing
the hierarchy of added menus.

Bug: 23970448
Change-Id: I1621d9eb30ff173767b6ebad2a1977127c42d0ad
2015-11-03 13:03:15 -05:00
Keisuke Kuroyanagi
2b46e657f9 Use constants for return value of TextView#doKeyDown
-1, 0, 1, and 2 were directly used for the return value of
TextView@doKeyDown. It's very hard to understand what each
value means.

Change-Id: I88dad15e2b68f652c8479a01f9f241c6638b5284
2015-10-30 15:56:33 +09:00
Keisuke Kuroyanagi
b3163ed118 Support KEYCODE_{CUT, COPY, PASTE} in TextView.
Bug: 25292652
Change-Id: I8e2c1986e45d9bfd09ab54dea6d2e3701f76df18
2015-10-28 14:27:00 +09:00
Alan Viverette
b3f2463990 Implement new keyboard interaction model in TimePicker
Also enlarges the touch targets for the AM/PM buttons by redirecting
unhandled touches within the containing view group.

Bug: 20257430
Change-Id: I28e8d8894a4702116bb68cc6a6d4115e5aa87a69
2015-10-22 16:01:48 -04:00
Yoshiki Iguchi
e0ee5d9657 Fix crash on calling removeSelection with showing selection handlers am: 9582e15196 am: 6649ee972b am: 6a5bb1534c
am: fb8343549a

* commit 'fb8343549a65bf65dab0fce6830b1b39ce62ddaa':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:53:41 +00:00
Yoshiki Iguchi
fb8343549a Fix crash on calling removeSelection with showing selection handlers am: 9582e15196 am: 6649ee972b
am: 6a5bb1534c

* commit '6a5bb1534c736c21260c5c488ff58e4d81972f92':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:49:00 +00:00
Yoshiki Iguchi
6649ee972b Fix crash on calling removeSelection with showing selection handlers
am: 9582e15196

* commit '9582e151964be60457d4abd712857fb1e8a4586d':
  Fix crash on calling removeSelection with showing selection handlers
2015-10-22 07:39:17 +00:00
Yoshiki Iguchi
9582e15196 Fix crash on calling removeSelection with showing selection handlers
A crash occured on updating after calling removeSelection with showing
selection handlers. This was because some selection-handler code didn't
consider the case the selection index was -1 (-1 means there is no selection).
This patch fixes this crash.

Bug: 23299977
Change-Id: I736d315e073f773aec597522203015205a8da42b
2015-10-22 07:28:47 +00:00
Andrei Stingaceanu
fa7834379f Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev am: ee4ab0a55b am: 24fc647e70 am: 509a74972a
am: fe622345b0

* commit 'fe622345b02656b9e049dde9936987f38984e97d':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 17:11:52 +00:00
Andrei Stingaceanu
fe622345b0 Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev am: ee4ab0a55b am: 24fc647e70
am: 509a74972a

* commit '509a74972af13c845a67ad9edddd8e413cc7884a':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 16:55:37 +00:00
Andrei Stingaceanu
24fc647e70 Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev
am: ee4ab0a55b

* commit 'ee4ab0a55b355b21168de0eb5615f2e321c2982f':
  Fix toolbar flickering in ExtractedMode when longpressing.
2015-10-21 16:03:52 +00:00
Andrei Stingaceanu
ee4ab0a55b Merge "Fix toolbar flickering in ExtractedMode when longpressing." into mnc-dr-dev 2015-10-21 15:56:26 +00:00
Andrei Stingaceanu
2aaeefec92 Fix toolbar flickering in ExtractedMode when longpressing.
onPreDraw starts an action mode in extract mode only which
does not consider the type of motion event and since extracted
mode never gets the focus event it never hides so it does not
need to show again.

Stop starting an action mode onPreDraw in extracted mode and
let the onTouchEvent handle starting the mode.

Also re-enabled dragging and dropping for ExtractedMode (most
of the issues were caused by starting the action mode
onPreDraw).

Bug: 25102276
Change-Id: I90d8e9f42f395b6b529e4d023ba6939e0dfb147f
2015-10-21 15:42:00 +01:00
John Reck
075f9ce097 Merge "Fix a few view ctors to not call Looper.myLooper" 2015-10-21 14:25:47 +00:00