Skip to content

Commit 3593fc4

Browse files
Romain GuyAndroid (Google) Code Review
authored andcommitted
Merge "Go faster!!!!"
2 parents fbab086 + 1ef3fdb commit 3593fc4

File tree

4 files changed

+36
-10
lines changed

4 files changed

+36
-10
lines changed

api/current.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ package android {
370370
field public static final int dialogTitle = 16843250; // 0x10101f2
371371
field public static final int digits = 16843110; // 0x1010166
372372
field public static final int direction = 16843217; // 0x10101d1
373-
field public static final int directionDescriptions = 16843695; // 0x10103af
373+
field public static final int directionDescriptions = 16843696; // 0x10103b0
374374
field public static final int directionPriority = 16843218; // 0x10101d2
375375
field public static final int disableDependentsState = 16843249; // 0x10101f1
376376
field public static final int disabledAlpha = 16842803; // 0x1010033
@@ -435,7 +435,7 @@ package android {
435435
field public static final int fadeEnabled = 16843390; // 0x101027e
436436
field public static final int fadeOffset = 16843383; // 0x1010277
437437
field public static final int fadeScrollbars = 16843434; // 0x10102aa
438-
field public static final int fadingEdge = 16842975; // 0x10100df
438+
field public static final deprecated int fadingEdge = 16842975; // 0x10100df
439439
field public static final int fadingEdgeLength = 16842976; // 0x10100e0
440440
field public static final int fastScrollAlwaysVisible = 16843573; // 0x1010335
441441
field public static final int fastScrollEnabled = 16843302; // 0x1010226
@@ -711,7 +711,7 @@ package android {
711711
field public static final int overScrollFooter = 16843459; // 0x10102c3
712712
field public static final int overScrollHeader = 16843458; // 0x10102c2
713713
field public static final int overScrollMode = 16843457; // 0x10102c1
714-
field public static final int overridesImplicitlyEnabledSubtype = 16843696; // 0x10103b0
714+
field public static final int overridesImplicitlyEnabledSubtype = 16843697; // 0x10103b1
715715
field public static final int packageNames = 16843649; // 0x1010381
716716
field public static final int padding = 16842965; // 0x10100d5
717717
field public static final int paddingBottom = 16842969; // 0x10100d9
@@ -790,6 +790,7 @@ package android {
790790
field public static final int reqNavigation = 16843306; // 0x101022a
791791
field public static final int reqTouchScreen = 16843303; // 0x1010227
792792
field public static final int required = 16843406; // 0x101028e
793+
field public static final int requiresFadingEdge = 16843694; // 0x10103ae
793794
field public static final int requiresSmallestWidthDp = 16843620; // 0x1010364
794795
field public static final int resizeMode = 16843619; // 0x1010363
795796
field public static final int resizeable = 16843405; // 0x101028d
@@ -942,7 +943,7 @@ package android {
942943
field public static final int tag = 16842961; // 0x10100d1
943944
field public static final int targetActivity = 16843266; // 0x1010202
944945
field public static final int targetClass = 16842799; // 0x101002f
945-
field public static final int targetDescriptions = 16843694; // 0x10103ae
946+
field public static final int targetDescriptions = 16843695; // 0x10103af
946947
field public static final int targetDrawables = 16843654; // 0x1010386
947948
field public static final int targetPackage = 16842785; // 0x1010021
948949
field public static final int targetSdkVersion = 16843376; // 0x1010270

core/java/android/view/View.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
import android.view.inputmethod.InputMethodManager;
7070
import android.widget.ScrollBarDrawable;
7171

72+
import static android.os.Build.VERSION_CODES.*;
73+
7274
import com.android.internal.R;
7375
import com.android.internal.util.Predicate;
7476
import com.android.internal.view.menu.MenuBuilder;
@@ -585,7 +587,7 @@
585587
* @attr ref android.R.styleable#View_drawingCacheQuality
586588
* @attr ref android.R.styleable#View_duplicateParentState
587589
* @attr ref android.R.styleable#View_id
588-
* @attr ref android.R.styleable#View_fadingEdge
590+
* @attr ref android.R.styleable#View_requiresFadingEdge
589591
* @attr ref android.R.styleable#View_fadingEdgeLength
590592
* @attr ref android.R.styleable#View_filterTouchesWhenObscured
591593
* @attr ref android.R.styleable#View_fitsSystemWindows
@@ -2895,6 +2897,12 @@ public View(Context context, AttributeSet attrs, int defStyle) {
28952897
}
28962898
break;
28972899
case R.styleable.View_fadingEdge:
2900+
if (context.getApplicationInfo().targetSdkVersion >= ICE_CREAM_SANDWICH) {
2901+
// Ignore the attribute starting with ICS
2902+
break;
2903+
}
2904+
// With builds < ICS, fall through and apply fading edges
2905+
case R.styleable.View_requiresFadingEdge:
28982906
final int fadingEdge = a.getInt(attr, FADING_EDGE_NONE);
28992907
if (fadingEdge != FADING_EDGE_NONE) {
29002908
viewFlagValues |= fadingEdge;
@@ -8642,7 +8650,7 @@ public void computeScroll() {
86428650
* otherwise
86438651
*
86448652
* @see #setHorizontalFadingEdgeEnabled(boolean)
8645-
* @attr ref android.R.styleable#View_fadingEdge
8653+
* @attr ref android.R.styleable#View_requiresFadingEdge
86468654
*/
86478655
public boolean isHorizontalFadingEdgeEnabled() {
86488656
return (mViewFlags & FADING_EDGE_HORIZONTAL) == FADING_EDGE_HORIZONTAL;
@@ -8657,7 +8665,7 @@ public boolean isHorizontalFadingEdgeEnabled() {
86578665
* horizontally
86588666
*
86598667
* @see #isHorizontalFadingEdgeEnabled()
8660-
* @attr ref android.R.styleable#View_fadingEdge
8668+
* @attr ref android.R.styleable#View_requiresFadingEdge
86618669
*/
86628670
public void setHorizontalFadingEdgeEnabled(boolean horizontalFadingEdgeEnabled) {
86638671
if (isHorizontalFadingEdgeEnabled() != horizontalFadingEdgeEnabled) {
@@ -8677,7 +8685,7 @@ public void setHorizontalFadingEdgeEnabled(boolean horizontalFadingEdgeEnabled)
86778685
* otherwise
86788686
*
86798687
* @see #setVerticalFadingEdgeEnabled(boolean)
8680-
* @attr ref android.R.styleable#View_fadingEdge
8688+
* @attr ref android.R.styleable#View_requiresFadingEdge
86818689
*/
86828690
public boolean isVerticalFadingEdgeEnabled() {
86838691
return (mViewFlags & FADING_EDGE_VERTICAL) == FADING_EDGE_VERTICAL;
@@ -8692,7 +8700,7 @@ public boolean isVerticalFadingEdgeEnabled() {
86928700
* vertically
86938701
*
86948702
* @see #isVerticalFadingEdgeEnabled()
8695-
* @attr ref android.R.styleable#View_fadingEdge
8703+
* @attr ref android.R.styleable#View_requiresFadingEdge
86968704
*/
86978705
public void setVerticalFadingEdgeEnabled(boolean verticalFadingEdgeEnabled) {
86988706
if (isVerticalFadingEdgeEnabled() != verticalFadingEdgeEnabled) {

core/res/res/values/attrs.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,13 @@
18041804
<!-- Defines whether the vertical scrollbar track should always be drawn. -->
18051805
<attr name="scrollbarAlwaysDrawVerticalTrack" format="boolean" />
18061806

1807-
<!-- Defines which edges should be fadeded on scrolling. -->
1807+
<!-- {@deprecated This attribute is deprecated and will be ignored as of
1808+
API level {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}.
1809+
Using fading edges may introduce noticeable performance
1810+
degradations and should be used only when required by the application's
1811+
visual design. To request fading edges with API level
1812+
{@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH} and above,
1813+
use the <code>requiresFadingEdge</code> attribute instead.} -->
18081814
<attr name="fadingEdge">
18091815
<!-- No edge is faded. -->
18101816
<flag name="none" value="0x00000000" />
@@ -1813,6 +1819,15 @@
18131819
<!-- Fades vertical edges only. -->
18141820
<flag name="vertical" value="0x00002000" />
18151821
</attr>
1822+
<!-- Defines which edges should be faded on scrolling. -->
1823+
<attr name="requiresFadingEdge">
1824+
<!-- No edge is faded. -->
1825+
<flag name="none" value="0x00000000" />
1826+
<!-- Fades horizontal edges only. -->
1827+
<flag name="horizontal" value="0x00001000" />
1828+
<!-- Fades vertical edges only. -->
1829+
<flag name="vertical" value="0x00002000" />
1830+
</attr>
18161831
<!-- Defines the length of the fading edges. -->
18171832
<attr name="fadingEdgeLength" format="dimension" />
18181833

core/res/res/values/public.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,6 +1806,8 @@
18061806
<public type="attr" name="listPreferredItemPaddingLeft" />
18071807
<public type="attr" name="listPreferredItemPaddingRight" />
18081808

1809+
<public type="attr" name="requiresFadingEdge" />
1810+
18091811
<public type="style" name="TextAppearance.SuggestionHighlight" />
18101812

18111813
<public type="style" name="Theme.Holo.Light.DarkActionBar" />

0 commit comments

Comments
 (0)