Loading packages/SystemUI/res/drawable-mdpi/scrubber_track_holo_dark.9.png 0 → 100644 +1.09 KiB Loading image diff... packages/SystemUI/res/drawable/status_bar_settings_slider_disabled.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2010 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. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background" android:drawable="@*android:drawable/scrubber_track_holo_dark" /> <item android:id="@android:id/secondaryProgress"> <scale android:scaleWidth="100%" android:drawable="@*android:drawable/scrubber_track_holo_dark" /> </item> <item android:id="@android:id/progress"> <scale android:scaleWidth="100%" android:drawable="@*android:drawable/scrubber_track_holo_dark" /> </item> </layer-list> packages/SystemUI/src/com/android/systemui/statusbar/policy/ToggleSlider.java +6 −1 Original line number Diff line number Diff line Loading @@ -24,10 +24,10 @@ import android.util.AttributeSet; import android.util.Slog; import android.view.View; import android.widget.CompoundButton; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.SeekBar; import android.widget.TextView; import android.widget.CompoundButton; import com.android.systemui.R; Loading Loading @@ -77,13 +77,18 @@ public class ToggleSlider extends RelativeLayout public void onCheckedChanged(CompoundButton toggle, boolean checked) { Drawable thumb; Drawable slider; final Resources res = getContext().getResources(); if (checked) { thumb = res.getDrawable(R.drawable.scrubber_control_disabled_holo); slider = res.getDrawable(R.drawable.status_bar_settings_slider_disabled); } else { thumb = res.getDrawable(R.drawable.scrubber_control_holo); slider = res.getDrawable( com.android.internal.R.drawable.scrubber_progress_horizontal_holo_dark); } mSlider.setThumb(thumb); mSlider.setProgressDrawable(slider); if (mListener != null) { mListener.onChanged(this, mTracking, checked, mSlider.getProgress()); Loading Loading
packages/SystemUI/res/drawable-mdpi/scrubber_track_holo_dark.9.png 0 → 100644 +1.09 KiB Loading image diff...
packages/SystemUI/res/drawable/status_bar_settings_slider_disabled.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2010 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. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background" android:drawable="@*android:drawable/scrubber_track_holo_dark" /> <item android:id="@android:id/secondaryProgress"> <scale android:scaleWidth="100%" android:drawable="@*android:drawable/scrubber_track_holo_dark" /> </item> <item android:id="@android:id/progress"> <scale android:scaleWidth="100%" android:drawable="@*android:drawable/scrubber_track_holo_dark" /> </item> </layer-list>
packages/SystemUI/src/com/android/systemui/statusbar/policy/ToggleSlider.java +6 −1 Original line number Diff line number Diff line Loading @@ -24,10 +24,10 @@ import android.util.AttributeSet; import android.util.Slog; import android.view.View; import android.widget.CompoundButton; import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.SeekBar; import android.widget.TextView; import android.widget.CompoundButton; import com.android.systemui.R; Loading Loading @@ -77,13 +77,18 @@ public class ToggleSlider extends RelativeLayout public void onCheckedChanged(CompoundButton toggle, boolean checked) { Drawable thumb; Drawable slider; final Resources res = getContext().getResources(); if (checked) { thumb = res.getDrawable(R.drawable.scrubber_control_disabled_holo); slider = res.getDrawable(R.drawable.status_bar_settings_slider_disabled); } else { thumb = res.getDrawable(R.drawable.scrubber_control_holo); slider = res.getDrawable( com.android.internal.R.drawable.scrubber_progress_horizontal_holo_dark); } mSlider.setThumb(thumb); mSlider.setProgressDrawable(slider); if (mListener != null) { mListener.onChanged(this, mTracking, checked, mSlider.getProgress()); Loading