Skip to content

Commit

Permalink
Improve Lockscreen Clocks
Browse files Browse the repository at this point in the history
  • Loading branch information
DHD2280 committed Apr 28, 2024
1 parent 800e9d1 commit f7c9848
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
import it.dhd.oxygencustomizer.R;
import it.dhd.oxygencustomizer.utils.Constants;
import it.dhd.oxygencustomizer.weather.WeatherUpdateService;
import it.dhd.oxygencustomizer.xposed.ResourceManager;
import it.dhd.oxygencustomizer.xposed.XposedMods;
import it.dhd.oxygencustomizer.xposed.utils.ArcProgressWidget;
import it.dhd.oxygencustomizer.xposed.utils.ViewHelper;
Expand Down Expand Up @@ -494,8 +495,10 @@ private void modifyClockView(View clockView) {
ViewHelper.findViewWithTagAndChangeColor(clockView, "accent1", customColor ? accent1 : systemAccent);
ViewHelper.findViewWithTagAndChangeColor(clockView, "accent2", customColor ? accent2 : systemAccent);
ViewHelper.findViewWithTagAndChangeColor(clockView, "accent3", customColor ? accent3 : systemAccent);
ViewHelper.findViewWithTagAndChangeColor(clockView, "text1", customColor ? text1 : Color.WHITE);
ViewHelper.findViewWithTagAndChangeColor(clockView, "text2", customColor ? text2 : Color.WHITE);
if (customColor) {
ViewHelper.findViewWithTagAndChangeColor(clockView, "text1", text1);
ViewHelper.findViewWithTagAndChangeColor(clockView, "text2", text2);
}

if (typeface != null) {
ViewHelper.applyFontRecursively((ViewGroup) clockView, typeface);
Expand Down Expand Up @@ -544,14 +547,14 @@ private void modifyClockView(View clockView) {
private void initBatteryStatus() {
if (mBatteryStatusView != null) {
if (mBatteryStatus == BatteryManager.BATTERY_STATUS_CHARGING) {
mBatteryStatusView.setText(R.string.battery_charging);
mBatteryStatusView.setText(ResourceManager.modRes.getString(R.string.battery_charging));
} else if (mBatteryStatus == BatteryManager.BATTERY_STATUS_DISCHARGING ||
mBatteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING) {
mBatteryStatusView.setText(R.string.battery_discharging);
mBatteryStatusView.setText(ResourceManager.modRes.getString(R.string.battery_discharging));
} else if (mBatteryStatus == BatteryManager.BATTERY_STATUS_FULL) {
mBatteryStatusView.setText(R.string.battery_full);
mBatteryStatusView.setText(ResourceManager.modRes.getString(R.string.battery_full));
} else if (mBatteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) {
mBatteryStatusView.setText(R.string.battery_level_percentage);
mBatteryStatusView.setText(ResourceManager.modRes.getString(R.string.battery_level_percentage));
}
}

Expand Down

0 comments on commit f7c9848

Please sign in to comment.