Cherish: Add more charging animation for users [2/3]

This commit is contained in:
SuperDroidBond
2020-03-05 10:49:18 +07:00
committed by Hưng Phan
parent 8c1e31fc6d
commit ccc2b7f0cf
4 changed files with 37 additions and 7 deletions

View File

@@ -245,4 +245,23 @@
<item>1</item>
<item>0</item>
</string-array>
<!-- Lockscreen Charging Animation options -->
<string-array name="lockscreen_charging_animation_entries" translatable="false">
<item>@string/lockscreen_charging_animation_off</item>
<item>@string/lockscreen_charging_animation_flash</item>
<item>@string/lockscreen_charging_animation_battery</item>
<item>@string/lockscreen_charging_animation_drop</item>
<item>@string/lockscreen_charging_animation_explosion</item>
<item>@string/lockscreen_charging_animation_water</item>
</string-array>
<string-array name="lockscreen_charging_animation_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
</resources>

View File

@@ -165,6 +165,12 @@
<!-- Charging animation -->
<string name="lockscreen_charging_animation_title">Charging animation</string>
<string name="lockscreen_charging_animation_summary">Display an animation when the device is plugged in</string>
<string name="lockscreen_charging_animation_off">Off</string>
<string name="lockscreen_charging_animation_flash">Flash</string>
<string name="lockscreen_charging_animation_battery">Battery</string>
<string name="lockscreen_charging_animation_drop">Drop</string>
<string name="lockscreen_charging_animation_explosion">Explosion</string>
<string name="lockscreen_charging_animation_water">Water</string>
<!-- Battery Styles -->
<string name="battery_style_category_title">Battery level</string>

View File

@@ -24,13 +24,16 @@
android:title="@string/lockscreen_battery_info_title"
android:summary="@string/lockscreen_battery_info_summary"
android:defaultValue="true" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="lockscreen_charging_animation"
android:icon="@drawable/ic_charging"
android:title="@string/lockscreen_charging_animation_title"
android:summary="@string/lockscreen_charging_animation_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="lockscreen_charging_animation_style"
android:icon="@drawable/ic_charging"
android:dialogTitle="@string/lockscreen_charging_animation_title"
android:title="@string/lockscreen_charging_animation_title"
android:entries="@array/lockscreen_charging_animation_entries"
android:entryValues="@array/lockscreen_charging_animation_values"
android:summary="%s"
android:defaultValue="1" />
<!-- Lockscreen Clock -->
<PreferenceCategory

View File

@@ -38,6 +38,8 @@ import android.provider.Settings;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.cherish.settings.preferences.SystemSettingListPreference;
public class LockScreenSettings extends SettingsPreferenceFragment implements
Preference.OnPreferenceChangeListener {