RelativeLayout, when measured with AT_MOST, was applying the gravity on its
children way too early. This caused the RL to set its measured size to
a value that was larger than necessary. This fixes the issue by deferring
the positioning of the gravity-dependent children until the dimensions
of the layout are known.
Merge commit 'eb3ec64a6a962aa48a46753c6e69ce24f889a4cc'
* commit 'eb3ec64a6a962aa48a46753c6e69ce24f889a4cc':
Fixes#1943915. Prevents circular dependency exception when using several NO_ID
Merge commit '0bcfc537e81b959a7d674deea4a5aee7f5c6eb2d'
* commit '0bcfc537e81b959a7d674deea4a5aee7f5c6eb2d':
Fixes#1940839. Prevents NPE in RelativeLayout when a non-existing View is
* changes:
* new screen resolution support impl. * use full window for activities, and shift & clip the content * refactored the compatibility code, and introdcued Translator class to handle cooridnate translations. * removed a workaround to handle an activity with configChagne=rotation in old implementation. * I'll fix background issue on rotation in next CL.
Merge commit '956070383945db5f842ec05e507fd0233705738c'
* commit '956070383945db5f842ec05e507fd0233705738c':
Reverse the order in which RelativeLayout measures and positions children.
This fixes a bug in ListView#setItemChecked(int, boolean). Calling the method
twice would cause the checked state to be toggled instead of remaining the
same.
* use full window for activities, and shift & clip the content
* refactored the compatibility code, and introdcued Translator class to handle cooridnate translations.
* removed a workaround to handle an activity with configChagne=rotation in old implementation.
* I'll fix background issue on rotation in next CL.
* removed unnecessary scaling code in SurfaceView, which I forgot to remove when I changed SurfaceView
not to scale the content.
Merge commit '4133751d51a04172aa65e24658b4207ef764de91'
* commit '4133751d51a04172aa65e24658b4207ef764de91':
Improve RelativeLayout by allowing dependencies to be declared in a random
order.
The new implementation uses a dually topologically sorted graph of the child
views. The graph of dependencies is sorted once for the rules that impact the
horizontal axis (toLeftOf, alignRight, etc.) and once for the rules that impact
the vertical axis (above, below, etc.)
Doing so gives the ability to declare dependencies in any order, allows for
partial cycles in the graph (given view1 and view2, view1 can be toRightOf=view2
and view2 can be above=view1) and probably gets rid of most surprising behaviors
of RelativeLayout.
These are all variations of needing to validate ranges on editing operations
coming from the IME, to account for the underlying text changing (usually being
deleted) asynchronously with the IME.
Merge commit 'ecfb9f91afa49df7b9b62526dcaca431b5ff1e01'
* commit 'ecfb9f91afa49df7b9b62526dcaca431b5ff1e01':
Fixes#1933585. Don't dismiss ACTV's drop down when it's set to alwaysVisible.
Merge commit '9e71b07cfe88cdb1abf4a01077ca263d7f957c94'
* commit '9e71b07cfe88cdb1abf4a01077ca263d7f957c94':
Fixes#1926784. Setting android:ellipsize on an EditText now ellipsizes the hint.
It doesn't make much sense to ellipsize the text entered by the user, so we
just ellipsize the hint. This avoids introducing a new XML attribute/Java API
just for the particular case of ellipsizing the hint.
Merge commit 'cff19c1a014284dce2577f82d931e4c65edd437e'
* commit 'cff19c1a014284dce2577f82d931e4c65edd437e':
Fixes#1925003. Make ListView honor the android:choiceMode XML attribute.
Merge commit '465dee4b4b491fdbb082218e5eb1010a416992f9'
* commit '465dee4b4b491fdbb082218e5eb1010a416992f9':
Fixes#1819572. Do not resurrect the list's selection when the user moved it away.
This is a workaround for a touch mode issue.
Touch mode is propagated lazily to windows. This causes problems in
the following scenario:
- Type something in the AutoCompleteTextView and get some results
- Move down with the d-pad to select an item in the list
- Move up with the d-pad until the selection disappears
- Type more text in the AutoCompleteTextView *using the soft keyboard*
and get new results; you are now in touch mode
- The selection comes back on the first item in the list, even though
the list is supposed to be in touch mode
Using the soft keyboard triggers the touch mode change but that change
is propagated to our window only after the first list layout, therefore
after the list attempts to resurrect the selection.
The trick to work around this issue is to pretend the list is in touch
mode when we know that the selection should not appear, that is when
we know the user moved the selection away from the list.
This boolean is set to true whenever we explicitely hide the list's
selection and reset to false whenver we know the user moved the
selection back to the list.
When this boolean is true, isInTouchMode() returns true, otherwise it
returns super.isInTouchMode().
There's nothing new here, just a clone of the ViewBinder API from
SimpleCursorAdapter. This provides a much more lightweight way to
override data mapping on an item-by-item basis.
Possibly to-do, but I would rather leave for another CL:
(1) Better handling of expanded/contracted group & last child (footer).
(2) Cached info map (see SimpleCursorAdapter) for performance
When debugging a problem with the search dialog drop-down
sometimes not showing up, I saw that the mAttachCount variable
in AutoCompleteTextView could get a negative value because
onDetachedFromWindow() was called multiple times. This lead to
the drop-down not being displayed on filtering.
Instead of the private attach count in ACTV, this change
uses View.getWindowVisibility().
Merge commit '6b4b50b8079aa274727c3120f858179eb6259351'
* commit '6b4b50b8079aa274727c3120f858179eb6259351':
Add support for custom tab views in TabHost and TabWidget.
This change adds the ability to specify an arbitrary view for a tab
indicator. It also adds support for specifying a drawable to use as
the divider between tab views.
Merge commit 'a32b5f3252a58416f328399680395aa5fa936640'
* commit 'a32b5f3252a58416f328399680395aa5fa936640':
Manual merge from cupcake_dcm. Need to be reviewed by enf.