Custom Seekbar improvements
Change-Id: I83b23ced9af519f9f991f0bd277a8e03a1cb709e
diff --git a/res/drawable/ic_custom_seekbar_minus.xml b/res/drawable/ic_custom_seekbar_minus.xml
index 56f0066..6ad8063 100644
--- a/res/drawable/ic_custom_seekbar_minus.xml
+++ b/res/drawable/ic_custom_seekbar_minus.xml
@@ -21,5 +21,5 @@
android:viewportHeight="24.0" >
<path
android:fillColor="?android:attr/colorControlNormal"
- android:pathData="M19,13H5V11H19V13Z" />
+ android:pathData="M14.102040767669678,13 H0.10204076766967773 V11 H14.102040767669678 V13 z" />
</vector>
diff --git a/res/drawable/ic_custom_seekbar_reset.xml b/res/drawable/ic_custom_seekbar_reset.xml
index e072b05..8fc4946 100644
--- a/res/drawable/ic_custom_seekbar_reset.xml
+++ b/res/drawable/ic_custom_seekbar_reset.xml
@@ -1,25 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2018 crDroid Android Project
+ Copyright (C) 2019 Havoc-OS
- 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
+ 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
+ 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.
+ 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24.0dp"
- android:height="24.0dp"
+ android:width="24dp"
+ android:height="24dp"
android:viewportWidth="24.0"
- android:viewportHeight="24.0" >
+ android:viewportHeight="24.0"
+ android:tint="?android:attr/colorControlNormal" >
+
<path
- android:fillColor="?android:attr/colorControlNormal"
- android:pathData="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z" />
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M14.123456746339798,12.042328000068665 c0,-0.7430335164070133 -0.6079365134239197,-1.3509700298309326 -1.3509700298309326,-1.3509700298309326 s-1.3509700298309326,0.6079365134239197 -1.3509700298309326,1.3509700298309326 s0.6079365134239197,1.3509700298309326 1.3509700298309326,1.3509700298309326 s1.3509700298309326,-0.6079365134239197 1.3509700298309326,-1.3509700298309326 zM12.772486716508865,5.962962865829468 c-3.3571605241298674,0 -6.079365134239197,2.7222046101093293 -6.079365134239197,6.079365134239197 L4.66666653752327,12.042328000068665 l2.7019400596618652,2.7019400596618652 l2.7019400596618652,-2.7019400596618652 L8.044091612100601,12.042328000068665 c0,-2.6141270077228547 2.1142680966854095,-4.728395104408264 4.728395104408264,-4.728395104408264 s4.728395104408264,2.1142680966854095 4.728395104408264,4.728395104408264 s-2.1142680966854095,4.728395104408264 -4.728395104408264,4.728395104408264 c-1.0199823725223542,0 -1.965661393404007,-0.3309876573085789 -2.742469160556793,-0.8781305193901066 l-0.9591887211799618,0.9726984214782719 C10.097566057443618,17.648853623867033 11.380987585783004,18.12169313430786 12.772486716508865,18.12169313430786 c3.3571605241298674,0 6.079365134239197,-2.7222046101093293 6.079365134239197,-6.079365134239197 s-2.7222046101093293,-6.079365134239197 -6.079365134239197,-6.079365134239197 z" />
</vector>
diff --git a/res/layout/preference_custom_seekbar.xml b/res/layout/preference_custom_seekbar.xml
index 460cd85..16940fb 100644
--- a/res/layout/preference_custom_seekbar.xml
+++ b/res/layout/preference_custom_seekbar.xml
@@ -74,6 +74,7 @@
android:id="@+id/value_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginBottom="2dp"
android:layout_below="@android:id/summary"
android:layout_alignStart="@android:id/title" >
@@ -127,6 +128,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginEnd="3dp"
android:layout_toEndOf="@id/minus"
android:layout_toStartOf="@id/plus"
android:layout_centerVertical="true" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 578a4e8..4254049 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -28,8 +28,8 @@
<!-- Custom seekbar -->
<string name="custom_seekbar_value">Value: <xliff:g id="v">%s</xliff:g></string>
- <string name="custom_seekbar_default_value">by default</string>
- <string name="custom_seekbar_default_value_to_set">Default value: <xliff:g id="v">%s</xliff:g>\nLong tap to set</string>
+ <string name="custom_seekbar_default_value">Default</string>
+ <string name="custom_seekbar_default_value_to_set">Default value: <xliff:g id="v">%s</xliff:g>\nLong press to set</string>
<string name="custom_seekbar_default_value_is_set">Default value is set</string>
</resources>
diff --git a/src/com/bliss/support/preferences/CustomSeekBarPreference.java b/src/com/bliss/support/preferences/CustomSeekBarPreference.java
index ed7ed2b..b3bce7e 100644
--- a/src/com/bliss/support/preferences/CustomSeekBarPreference.java
+++ b/src/com/bliss/support/preferences/CustomSeekBarPreference.java
@@ -180,7 +180,7 @@
(!mTrackingTouch || mContinuousUpdates ? getTextValue(mValue) +
(mDefaultValueExists && mValue == mDefaultValue ? " (" +
getContext().getString(R.string.custom_seekbar_default_value) + ")" : "")
- : "[" + getTextValue(mTrackingValue) + "]")));
+ : getTextValue(mTrackingValue))));
}
if (mResetImageView != null) {
if (!mDefaultValueExists || mValue == mDefaultValue || mTrackingTouch)