Commit Graph

1367 Commits

Author SHA1 Message Date
Romain Guy
7f3d515f5e Merge changes Ia8a15db8,I20ac5203
* changes:
  Don't enable hardware acceleration when the app owns the surface. Bug #3323096
  Make FrameLayout support mixed wrap_content/match_parent children. Bug #3259668
2011-01-05 10:32:15 -08:00
Dianne Hackborn
87121accdb Some new API cleanup.
- Tweak Fragment docs to match new sample code.
- Make some new attributes public.
- Hide all of the XmlAdapter stuff, since it is not actually being used.

Change-Id: Iae2062f91d1ca0c6b1d656ae948417d3d048482f
2011-01-04 17:42:01 -08:00
Romain Guy
9c95737211 Make FrameLayout support mixed wrap_content/match_parent children.
Bug #3259668

If a FrameLayout is measured with an UNSPECIFIED or AT_MOST spec,
it cannot correctly define the size of its children set to
match_parent. This change adds a second measurement pass similar
to what LinearLayout does in the same situation.

Change-Id: I20ac5203c2efc2e559f88b2c9573d4ad7df488b4
2011-01-04 17:39:43 -08:00
Gilles Debunne
87380bcaeb Added support for asian characters in text selection.
Inspired by https://review.source.android.com/#change,16606

Test class has been revamped to mimic new behavior: selectCurrentWord
is no longer used to add words to the dictionary. We rely on the suggestion
bar in the IME for that.

Change-Id: I1cb88df54dffb166c75f75fefb743ff55a33519b
2011-01-04 14:18:13 -08:00
Gilles Debunne
c0752ee7ce No spaces are inserted around pasted text when there are already new lines.
Bug 3304489

Change-Id: I3c1bf915a2e20f87ed3cec3c30dbcc884bf6b46f
2011-01-04 13:30:24 -08:00
Gilles Debunne
da0a3f03a1 Multi-line EditText background is set using a state. Step 2.
See change 86347 for Step 1.

New state_multiline state flag, handled in TextView drawable background drawables.

Change-Id: I230df16c7ddee3296da180fd80ef341a4ac17dc0
2011-01-04 09:21:22 -08:00
Gilles Debunne
b2316968cf Multi-line EditText background is set using a state.
Step 1/2: remove the previous code that relied on a specific theme attribute.

Bug 3214105

Change-Id: Ib4fc55a9093d64e69ac798ec56503ccdb284cbec
2011-01-04 09:19:35 -08:00
Gilles Debunne
c01f3feeb0 Text selection is preserved upon device rotation.
Note that this used to create problems with ExtractEditText. These potential issues
were not handled in that CL.

Bug 3236848

Change-Id: I4b83ce8f66eba04f34c2faa8e38b83eb992637f0
2011-01-04 09:16:23 -08:00
Svetoslav Ganov
34c0688cea Fixed the NumberPicker to adjust to the closest value while scrolling/flinging
Change-Id: I782603d9a187d0ce9196e3fc90f28e372637584c
2011-01-03 02:11:00 -08:00
Dianne Hackborn
7eab094722 Fix flicker issue in IME.
When IME is being moved as part of a window going away, it could flicker
as it immediately moves behind the window.  Fix this.

Also make the default soft input mode for PopupWindow to be to not change
the IME visibility, since it is a rare pop-up window that should cause your
IME to close.

Change-Id: I0b43e080ad012739e9a3e5842794c778c859ac1a
2011-01-01 13:32:30 -08:00
Svetoslav Ganov
25f84f323c 3316147 TimePicker and DatePicker is editable even after the first setEnabled(false).
Change-Id: If800b048973200d249b1f5c62af064392ed98d91
2010-12-29 22:39:54 -08:00
Svetoslav Ganov
e51f94cfe9 Updating the ColandarView javadoc to reflect public attributes
Change-Id: I6cea3af0c310ef8478e7ff9de23e5c40a7063c02
2010-12-28 15:21:43 -08:00
Svetoslav Ganov
3d99f5b6ef Merge "3313982 DatePicker/TimePicker allow users to scroll date/time even when disabled." 2010-12-28 15:06:34 -08:00
Svetoslav Ganov
51c52edad7 3313982 DatePicker/TimePicker allow users to scroll date/time even when disabled.
Change-Id: I8c28615bfc813dfdddf21c40d84cc7c36f1fd391
2010-12-28 15:05:43 -08:00
Dianne Hackborn
d173fa3b1c Possible fix to issue #3213749: NPE at...
...android.app.Fragment.startActivityForResult(Fragment.java)

Make sure to remove all pending messages when AbsListView is detached
from its window.

But...  that's not enough.

It turns out that when a fragment's views are animating away, they of
course don't get detached until after the animation is done.  However
the fragment itself is immediately destroyed, leaving its live views
still going after that.

Here's a possible solution: when fragment manager initiates an animation
on a fragment whose views are being removed, it makes note of that so
it can hold off on destroying the fragment until the animation is over.

There are a lot of interesting race conditions here, if further operations
happen on the fragment while it is being animated.  I think the code here
does something sensible, and it does seem to work for the situations I
have tested, but it is hard to know all of the edge cases that may happen.

Change-Id: I4490ce8862a9bb714c7ea54baca3072c62126388
2010-12-28 14:01:20 -08:00
Svetoslav Ganov
e9730bf3d2 Adding APIs for setting whether to show week number and setting the start day of week. Cleaned up the code a bit.
Change-Id: Iaa7154c6912a68cd91df3ac881c324096394ea24
2010-12-28 02:40:23 -08:00
Ken Wakasa
82d731ac5d Add TYPE_NUMBER_VARIATION_PASSWORD for entering a numeric password.
Also, bug fix in EditoInfo.makeCompatible().

bug: 3296883
Change-Id: Icc663b375cffbe1f4506d1758d624a1acca3576b
2010-12-25 01:22:53 +09:00
Dianne Hackborn
dd830c2114 am 60238734: am 2dda21b9: Merge "Another stab at fixing issue #3149290 java.lang.RuntimeException:..." into gingerbread
* commit '6023873463331d30b7ed12942c3323f1b6975ed8':
  Another stab at fixing issue #3149290 java.lang.RuntimeException:...
2010-12-22 18:40:56 -08:00
Dianne Hackborn
6023873463 am 2dda21b9: Merge "Another stab at fixing issue #3149290 java.lang.RuntimeException:..." into gingerbread
* commit '2dda21b93f8a8e0fb70de44eae826bc68349813c':
  Another stab at fixing issue #3149290 java.lang.RuntimeException:...
2010-12-22 18:37:08 -08:00
Dianne Hackborn
7becaeea7b Another stab at fixing issue #3149290 java.lang.RuntimeException:...
...Unable to pause activity
{com.android.settings/com.android.settings.applications.StorageUse}

Change-Id: Ibfa28a1c5af50dd150dfcafe71e905426d312643
2010-12-22 18:29:32 -08:00
Svetoslav Ganov
28104e1de5 3298147 DatePicker dialog does not provide mechanism for specifying range from which to select
Change-Id: Ib5dd7db90ccc5b4d984914c481118049ac3648fe
2010-12-22 03:29:29 -08:00
Jeff Brown
c1df907e39 Support invoking key shortcuts using Control.
This enables Select All, Cut, Copy and Paste behavior in TextViews
and provides a general pattern for implementing additional keyboard
accelerators based on Control key shortcuts.  The same shortcuts
also apply to menu accelerators.

Bug: 3286262
Change-Id: I7d458ee26abf51e0de1735ce490ce3baf504b471
2010-12-21 17:39:12 -08:00
Gilles Debunne
f3895edf4b Links are clickable in TextView when textIsSelectable.
Bug 3299410

Change-Id: I921c9eecbfef1d81b0d0e2ad2129400c58f165a1
2010-12-21 13:37:05 -08:00
Dianne Hackborn
0e3b8f421d Fix issue #3301572: onCreateLoader must not be a member class: VolumeMetadataLoader
Also some various cleanup.

Change-Id: I8e8616a86c50c86817f7ec9bb02a5954c1ccd84f
2010-12-21 11:12:09 -08:00
Adam Powell
50f784cf2d Measure spinner items for sizing the dropdown view.
Only a limited window of items will be measured around the currently
selected item.

Change-Id: Ie0431948fdd564fa4bbeb82dede9e2abebbaee55
2010-12-19 16:16:43 -08:00
Adam Cohen
fb1b2317ab Merge "Fixing leak in StackView" 2010-12-17 19:46:46 -08:00
Adam Cohen
c0b53be0c9 Fixing leak in StackView
Change-Id: I2a5f340906c38f87a4b280bedcd47624351da467
2010-12-17 19:32:43 -08:00
Jeff Brown
4e6319b73c Add initial support for TAB navigation.
Bug: 3286652
Change-Id: I813a0318b3b8d9c9bc791ea6a2427be11c08de00
2010-12-17 18:51:04 -08:00
Gilles Debunne
202ef9e851 Merge "AutoLink identified spans are selected when long pressed." 2010-12-17 17:42:32 -08:00
Gilles Debunne
4dfe08632f AutoLink identified spans are selected when long pressed.
Do not rely on standard word detection for these (which does not work because
of / or . in URL or - in phone numbers).

Various other bug fixes for text selection with autolinks.

Change-Id: I482e99efa980281086ce761b27b3a36579e7cf76
2010-12-17 16:32:19 -08:00
Svetoslav Ganov
9e780c66e9 Merge "Bug 3191746. atePicker TimePicker: Dark theme is used in a Light theme app" 2010-12-17 16:32:07 -08:00
Svetoslav Ganov
bf80562d22 Bug 3191746. atePicker TimePicker: Dark theme is used in a Light theme app
Change-Id: I20d0cca3b78af9db80854a57c88d6cab3b00f555
2010-12-17 16:00:18 -08:00
Gilles Debunne
fdcd4084f3 Merge "Made text selectable even when autolinks are activated." 2010-12-17 15:48:43 -08:00
Svetoslav Ganov
6ad986419d Merge "Bug 3293819. Timepicker is showing single digit for 0, 1, 2 minutes (the rest are fine)" 2010-12-17 15:45:41 -08:00
Svetoslav Ganov
2b9484f453 Bug 3293819. Timepicker is showing single digit for 0, 1, 2 minutes (the rest are fine)
Change-Id: I55c50857740fc1210c45e9b7fc8905ec2266ed8c
2010-12-17 15:42:21 -08:00
Gilles Debunne
cbcb345ccd Made text selectable even when autolinks are activated.
Refactor for canSelectText.

Moved test from onCreate to startTextSelection.

Restored setFocusableInTouchMode needed to start a selection in touch mode.

Bug 3296490

Change-Id: I5c0c31dbebed79fd1f9d80f930cba1019d74f710
2010-12-17 15:31:02 -08:00
Adam Cohen
5eb40a85fb Merge "Addressing issues associated RemoteViewsAdapter's service crashes / disconnects" 2010-12-17 12:19:46 -08:00
Adam Cohen
fb60386b46 Addressing issues associated RemoteViewsAdapter's service crashes / disconnects
-See issue: 3052667

Change-Id: I95f1cac3defeadc38ac75453d9d59cd1b3cbcc83
2010-12-17 12:09:50 -08:00
Gilles Debunne
73d032eea9 Merge "Removed focusableInTouchMode flag for selectable text." 2010-12-17 11:31:00 -08:00
Chet Haase
d4bbcbd2dd Merge "Fix for TimePicker not redrawing itself." 2010-12-17 11:30:17 -08:00
Gilles Debunne
e12f99984e Removed focusableInTouchMode flag for selectable text.
Change-Id: I7aaa08328cc22d6cd920b3bc2661de79c5fb1402
2010-12-17 11:04:55 -08:00
Chet Haase
c75ec3324e Fix for TimePicker not redrawing itself.
The problem was that NumberPicker override View.draw(), but did not
call the superclass version of the method in some situations. This
resulted in the DIRTY flag for the view not getting cleared properly,
and future invalidations not propagating correctly.

The fix was to call super.draw() from NumberPicker.draw().

Change-Id: Ic17215dea86d54b77375494ada124dd6970e3ad6
2010-12-17 07:44:30 -08:00
Dianne Hackborn
c91893511d Fix issue #3272082: Contacts: when going back from edit view,
list UI is not ready yet

This involves some reworking of Loaders.

Loaders, in particular CursorLoader, are now expected to retain
their current data after being stopped.  This allows applications
to keep that data across onStop() -> onStart(), so when the user
returns to the app it doesn't have to wait for the data to reload
and thus cause flicker.

This includes various API changes to better reflect the new
semantics, plus a new LoaderCallbacks method to tell the application
when it is actually time to stop their use of a loader's data.

Note this is somewhat half-done, to help checking in the extensive
application changes that are required without causing build breakage.

Change-Id: Ib4b3bf8185a6da46e7f06ca125521d65e2e380a1
2010-12-16 20:09:13 -08:00
Amith Yamasani
73e00df15e Fix SearchView collapse on text input.
Bug: 3291919
Change-Id: I2e510c3f8c4fa520dd100e722896f725ef70b79e
2010-12-16 16:31:29 -08:00
Adam Cohen
36f43908ae Changing StackView layout to space items differently
Change-Id: Ia46d28312321b338b4a3aec1df9fa00c645f5b73
2010-12-16 00:24:58 -08:00
Amith Yamasani
4aedb39a49 New SearchView assets and close-button behavior change.
Hide the close button in SearchView when there's no text in it and it's not iconified by default.

Bug: 3275206

Adds Holo.Light theme and fixes the query refinement icon.
2010-12-15 20:09:33 -08:00
Gilles Debunne
066460f3ba Fix for testAccessTransformationMethod cts test.
Single line textView should impose their number of lines and their
transformation method.

Bug 3289818

Change-Id: If1f1252ded1250e2aff85f1c615cc2e17026ba1d
2010-12-15 18:28:05 -08:00
Gilles Debunne
33a8cfb0af Show keyboard when user starts a text selection.
Bug 3266297

Change-Id: I1985ab52ae867c4a6c92279986cd6d0654614118
2010-12-15 16:52:51 -08:00
Gilles Debunne
39be4bdd59 Merge "Support custom themes in TabHost." 2010-12-15 16:01:47 -08:00
Svetoslav Ganov
f02d4e36d7 Merge "Updating the light Date picker theme. Some UI fixes." 2010-12-15 15:13:49 -08:00