Loading core/java/android/view/View.java +4 −0 Original line number Diff line number Diff line Loading @@ -12761,6 +12761,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mPrivateFlags &= ~PFLAG_CANCEL_NEXT_UP_EVENT; mPrivateFlags3 &= ~PFLAG3_IS_LAID_OUT; if (mBackground != null) { mBackground.clearHotspots(); } removeUnsetPressCallback(); removeLongPressCallback(); removePerformClickCallback(); Loading core/java/android/widget/AbsListView.java +19 −3 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te /** * The last CheckForTap runnable we posted, if any */ private Runnable mPendingCheckForTap; private CheckForTap mPendingCheckForTap; /** * The last CheckForKeyLongPress runnable we posted, if any Loading Loading @@ -2126,7 +2126,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); mInLayout = true; final int childCount = getChildCount(); if (changed) { for (int i = 0; i < childCount; i++) { Loading Loading @@ -3185,7 +3187,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te return INVALID_ROW_ID; } final class CheckForTap implements Runnable { private final class CheckForTap implements Runnable { float x; float y; @Override public void run() { if (mTouchMode == TOUCH_MODE_DOWN) { Loading @@ -3205,7 +3210,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final boolean longClickable = isLongClickable(); if (mSelector != null) { Drawable d = mSelector.getCurrent(); final Drawable d = mSelector.getCurrent(); if (d != null && d instanceof TransitionDrawable) { if (longClickable) { ((TransitionDrawable) d).startTransition(longPressTimeout); Loading @@ -3213,6 +3218,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te ((TransitionDrawable) d).resetTransition(); } } if (d.supportsHotspots()) { d.setHotspot(R.attr.state_pressed, x, y); } } if (longClickable) { Loading Loading @@ -3596,6 +3604,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mPendingCheckForTap = new CheckForTap(); } mPendingCheckForTap.x = ev.getX(); mPendingCheckForTap.y = ev.getY(); postDelayed(mPendingCheckForTap, ViewConfiguration.getTapTimeout()); } } Loading Loading @@ -3705,6 +3715,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (d != null && d instanceof TransitionDrawable) { ((TransitionDrawable) d).resetTransition(); } if (mSelector.supportsHotspots()) { mSelector.setHotspot(R.attr.state_pressed, x, ev.getY()); } } if (mTouchModeReset != null) { removeCallbacks(mTouchModeReset); Loading @@ -3716,6 +3729,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mTouchMode = TOUCH_MODE_REST; child.setPressed(false); setPressed(false); if (mSelector != null && mSelector.supportsHotspots()) { mSelector.removeHotspot(R.attr.state_pressed); } if (!mDataChanged && !mIsDetaching && isAttachedToWindow()) { performClick.run(); } Loading core/res/res/drawable/list_selector_quantum.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <touch-feedback xmlns:android="http://schemas.android.com/apk/res/android" android:tint="?attr/colorButtonPressed"> <item android:id="@id/mask"> <color android:color="@color/white" /> </item> </touch-feedback> core/res/res/layout/simple_list_item_2_single_choice.xml +6 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ android:gravity="center_vertical" android:paddingStart="16dip" android:paddingEnd="12dip" android:minHeight="?android:attr/listPreferredItemHeightSmall"> android:minHeight="?attr/listPreferredItemHeightSmall" android:background="@color/transparent"> <LinearLayout android:layout_width="wrap_content" Loading @@ -33,8 +34,8 @@ <TextView android:id="@android:id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorAlertDialogListItem" android:textAppearance="?attr/textAppearanceListItem" android:textColor="?attr/textColorAlertDialogListItem" android:gravity="center_vertical|start" android:singleLine="true" android:ellipsize="marquee" /> Loading @@ -42,8 +43,8 @@ <TextView android:id="@android:id/text2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceListItemSecondary" android:textColor="?android:attr/textColorAlertDialogListItem" android:textAppearance="?attr/textAppearanceListItemSecondary" android:textColor="?attr/textColorAlertDialogListItem" android:gravity="center_vertical|start" android:singleLine="true" android:ellipsize="marquee" /> Loading core/res/res/values/styles_quantum.xml +6 −6 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.AbsListView" parent="Widget.AbsListView"/> <style name="Widget.Quantum.AutoCompleteTextView" parent="Widget.AutoCompleteTextView"> <item name="dropDownSelector">@drawable/list_selector_holo_dark</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> </style> Loading Loading @@ -654,7 +654,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Spinner" parent="Widget.Spinner.DropDown"> <item name="background">@drawable/spinner_background_quantum</item> <item name="dropDownSelector">@drawable/list_selector_holo_dark</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading Loading @@ -713,7 +713,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.QuickContactBadgeSmall.WindowLarge" parent="Widget.QuickContactBadgeSmall.WindowLarge"/> <style name="Widget.Quantum.ListPopupWindow" parent="Widget.ListPopupWindow"> <item name="dropDownSelector">@drawable/list_selector_holo_dark</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading Loading @@ -851,7 +851,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Light.AbsListView" parent="Widget.Quantum.AbsListView"/> <style name="Widget.Quantum.Light.AutoCompleteTextView" parent="Widget.AutoCompleteTextView"> <item name="dropDownSelector">@drawable/list_selector_holo_light</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> </style> Loading Loading @@ -938,7 +938,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Light.Spinner" parent="Widget.Quantum.Spinner"> <item name="background">@drawable/spinner_background_quantum</item> <item name="dropDownSelector">@drawable/list_selector_holo_light</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading @@ -962,7 +962,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Light.QuickContactBadgeSmall.WindowLarge" parent="Widget.Quantum.QuickContactBadgeSmall.WindowLarge"/> <style name="Widget.Quantum.Light.ListPopupWindow" parent="Widget.ListPopupWindow"> <item name="dropDownSelector">@drawable/list_selector_holo_light</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading Loading
core/java/android/view/View.java +4 −0 Original line number Diff line number Diff line Loading @@ -12761,6 +12761,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mPrivateFlags &= ~PFLAG_CANCEL_NEXT_UP_EVENT; mPrivateFlags3 &= ~PFLAG3_IS_LAID_OUT; if (mBackground != null) { mBackground.clearHotspots(); } removeUnsetPressCallback(); removeLongPressCallback(); removePerformClickCallback(); Loading
core/java/android/widget/AbsListView.java +19 −3 Original line number Diff line number Diff line Loading @@ -543,7 +543,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te /** * The last CheckForTap runnable we posted, if any */ private Runnable mPendingCheckForTap; private CheckForTap mPendingCheckForTap; /** * The last CheckForKeyLongPress runnable we posted, if any Loading Loading @@ -2126,7 +2126,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); mInLayout = true; final int childCount = getChildCount(); if (changed) { for (int i = 0; i < childCount; i++) { Loading Loading @@ -3185,7 +3187,10 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te return INVALID_ROW_ID; } final class CheckForTap implements Runnable { private final class CheckForTap implements Runnable { float x; float y; @Override public void run() { if (mTouchMode == TOUCH_MODE_DOWN) { Loading @@ -3205,7 +3210,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final boolean longClickable = isLongClickable(); if (mSelector != null) { Drawable d = mSelector.getCurrent(); final Drawable d = mSelector.getCurrent(); if (d != null && d instanceof TransitionDrawable) { if (longClickable) { ((TransitionDrawable) d).startTransition(longPressTimeout); Loading @@ -3213,6 +3218,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te ((TransitionDrawable) d).resetTransition(); } } if (d.supportsHotspots()) { d.setHotspot(R.attr.state_pressed, x, y); } } if (longClickable) { Loading Loading @@ -3596,6 +3604,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mPendingCheckForTap = new CheckForTap(); } mPendingCheckForTap.x = ev.getX(); mPendingCheckForTap.y = ev.getY(); postDelayed(mPendingCheckForTap, ViewConfiguration.getTapTimeout()); } } Loading Loading @@ -3705,6 +3715,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (d != null && d instanceof TransitionDrawable) { ((TransitionDrawable) d).resetTransition(); } if (mSelector.supportsHotspots()) { mSelector.setHotspot(R.attr.state_pressed, x, ev.getY()); } } if (mTouchModeReset != null) { removeCallbacks(mTouchModeReset); Loading @@ -3716,6 +3729,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mTouchMode = TOUCH_MODE_REST; child.setPressed(false); setPressed(false); if (mSelector != null && mSelector.supportsHotspots()) { mSelector.removeHotspot(R.attr.state_pressed); } if (!mDataChanged && !mIsDetaching && isAttachedToWindow()) { performClick.run(); } Loading
core/res/res/drawable/list_selector_quantum.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <touch-feedback xmlns:android="http://schemas.android.com/apk/res/android" android:tint="?attr/colorButtonPressed"> <item android:id="@id/mask"> <color android:color="@color/white" /> </item> </touch-feedback>
core/res/res/layout/simple_list_item_2_single_choice.xml +6 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,8 @@ android:gravity="center_vertical" android:paddingStart="16dip" android:paddingEnd="12dip" android:minHeight="?android:attr/listPreferredItemHeightSmall"> android:minHeight="?attr/listPreferredItemHeightSmall" android:background="@color/transparent"> <LinearLayout android:layout_width="wrap_content" Loading @@ -33,8 +34,8 @@ <TextView android:id="@android:id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorAlertDialogListItem" android:textAppearance="?attr/textAppearanceListItem" android:textColor="?attr/textColorAlertDialogListItem" android:gravity="center_vertical|start" android:singleLine="true" android:ellipsize="marquee" /> Loading @@ -42,8 +43,8 @@ <TextView android:id="@android:id/text2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceListItemSecondary" android:textColor="?android:attr/textColorAlertDialogListItem" android:textAppearance="?attr/textAppearanceListItemSecondary" android:textColor="?attr/textColorAlertDialogListItem" android:gravity="center_vertical|start" android:singleLine="true" android:ellipsize="marquee" /> Loading
core/res/res/values/styles_quantum.xml +6 −6 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.AbsListView" parent="Widget.AbsListView"/> <style name="Widget.Quantum.AutoCompleteTextView" parent="Widget.AutoCompleteTextView"> <item name="dropDownSelector">@drawable/list_selector_holo_dark</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> </style> Loading Loading @@ -654,7 +654,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Spinner" parent="Widget.Spinner.DropDown"> <item name="background">@drawable/spinner_background_quantum</item> <item name="dropDownSelector">@drawable/list_selector_holo_dark</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading Loading @@ -713,7 +713,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.QuickContactBadgeSmall.WindowLarge" parent="Widget.QuickContactBadgeSmall.WindowLarge"/> <style name="Widget.Quantum.ListPopupWindow" parent="Widget.ListPopupWindow"> <item name="dropDownSelector">@drawable/list_selector_holo_dark</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading Loading @@ -851,7 +851,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Light.AbsListView" parent="Widget.Quantum.AbsListView"/> <style name="Widget.Quantum.Light.AutoCompleteTextView" parent="Widget.AutoCompleteTextView"> <item name="dropDownSelector">@drawable/list_selector_holo_light</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> </style> Loading Loading @@ -938,7 +938,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Light.Spinner" parent="Widget.Quantum.Spinner"> <item name="background">@drawable/spinner_background_quantum</item> <item name="dropDownSelector">@drawable/list_selector_holo_light</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading @@ -962,7 +962,7 @@ please see styles_device_defaults.xml. <style name="Widget.Quantum.Light.QuickContactBadgeSmall.WindowLarge" parent="Widget.Quantum.QuickContactBadgeSmall.WindowLarge"/> <style name="Widget.Quantum.Light.ListPopupWindow" parent="Widget.ListPopupWindow"> <item name="dropDownSelector">@drawable/list_selector_holo_light</item> <item name="dropDownSelector">@drawable/list_selector_quantum</item> <item name="popupBackground">?attr/colorBackground</item> <item name="dropDownVerticalOffset">0dip</item> <item name="dropDownHorizontalOffset">0dip</item> Loading