Merge "TouchFeedbackDrawable is now RippleDrawable"
This commit is contained in:
committed by
Android (Google) Code Review
commit
2d8936cfe3
@@ -14,10 +14,10 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:tint="?android:attr/colorButtonPressed">
|
||||
<item>
|
||||
<color android:color="@android:color/white" />
|
||||
</item>
|
||||
</touch-feedback>
|
||||
</ripple>
|
||||
|
||||
|
@@ -14,10 +14,10 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:tint="?android:attr/colorButtonPressed"
|
||||
android:pinned="true">
|
||||
<item android:id="@android:id/mask"
|
||||
android:drawable="@android:color/white" />
|
||||
</touch-feedback>
|
||||
</ripple>
|
||||
|
||||
|
@@ -83,8 +83,9 @@ public class HighlightingFragment extends Fragment {
|
||||
public void run() {
|
||||
final int centerX = view.getWidth() / 2;
|
||||
final int centerY = view.getHeight() / 2;
|
||||
highlight.setHotspot(0, centerX, centerY);
|
||||
highlight.clearHotspots();
|
||||
highlight.setHotspot(centerX, centerY);
|
||||
view.setPressed(true);
|
||||
view.setPressed(false);
|
||||
}
|
||||
}, DELAY_HIGHLIGHT_DURATION_MILLIS);
|
||||
|
||||
|
@@ -183,10 +183,12 @@ public class SettingsPreferenceFragment extends PreferenceFragment implements Di
|
||||
listView.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final int centerX = listView.getWidth() / 2;
|
||||
final int centerY = listView.getChildAt(0).getHeight() / 2;
|
||||
highlight.setHotspot(0, centerX, centerY);
|
||||
highlight.clearHotspots();
|
||||
final View v = listView.getChildAt(0);
|
||||
final int centerX = v.getWidth() / 2;
|
||||
final int centerY = v.getHeight() / 2;
|
||||
highlight.setHotspot(centerX, centerY);
|
||||
v.setPressed(true);
|
||||
v.setPressed(false);
|
||||
((PreferenceGroupAdapter) adapter).setHighlighted(-1);
|
||||
}
|
||||
}, DELAY_HIGHLIGHT_DURATION_MILLIS);
|
||||
@@ -201,8 +203,9 @@ public class SettingsPreferenceFragment extends PreferenceFragment implements Di
|
||||
preferenceView.setBackground(highlight);
|
||||
final int centerX = preferenceView.getWidth() / 2;
|
||||
final int centerY = preferenceView.getHeight() / 2;
|
||||
highlight.setHotspot(0, centerX, centerY);
|
||||
highlight.clearHotspots();
|
||||
highlight.setHotspot(centerX, centerY);
|
||||
preferenceView.setPressed(true);
|
||||
preferenceView.setPressed(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user