Skip to content

Commit

Permalink
Clock Font: Adding more styles
Browse files Browse the repository at this point in the history
Change-Id: I7ff863fba0c33409f6cad28df5bf3003db2aae0f
  • Loading branch information
ThatKawaiiGuy committed Aug 11, 2014
1 parent e7cbd25 commit 744a2ec
Showing 1 changed file with 10 additions and 14 deletions.
Expand Up @@ -84,8 +84,10 @@ public class Clock extends TextView implements DemoMode, OnClickListener, OnLong
public static final int STYLE_CLOCK_CENTER = 1;

public static final int FONT_BOLD = 0;
public static final int FONT_LIGHT = 1;
public static final int FONT_NORMAL = 2;
public static final int FONT_CONDENSED = 1;
public static final int FONT_LIGHT = 2;
public static final int FONT_LIGHT_ITALIC = 3;
public static final int FONT_NORMAL = 4;

protected int mClockDateDisplay = CLOCK_DATE_DISPLAY_GONE;
protected int mClockDateStyle = CLOCK_DATE_STYLE_UPPERCASE;
Expand Down Expand Up @@ -116,9 +118,6 @@ void observe() {
resolver.registerContentObserver(Settings.System
.getUriFor(Settings.System.STATUSBAR_CLOCK_FONT_STYLE),
false, this, UserHandle.USER_ALL);
resolver.registerContentObserver(Settings.System
.getUriFor(Settings.System.STATUSBAR_CLOCK_COLOR),
false, this, UserHandle.USER_ALL);
resolver.registerContentObserver(Settings.System
.getUriFor(Settings.System.STATUSBAR_CLOCK_DATE_DISPLAY),
false, this, UserHandle.USER_ALL);
Expand All @@ -128,15 +127,6 @@ void observe() {
resolver.registerContentObserver(Settings.System
.getUriFor(Settings.System.STATUSBAR_CLOCK_DATE_FORMAT),
false, this, UserHandle.USER_ALL);
resolver.registerContentObserver(Settings.System
.getUriFor(Settings.System.CUSTOM_SYSTEM_ICON_COLOR),
false, this, UserHandle.USER_ALL);
resolver.registerContentObserver(Settings.System
.getUriFor(Settings.System.STATUSBAR_CLOCK_DATE_FORMAT), false,
this, UserHandle.USER_ALL);
resolver.registerContentObserver(Settings.System
.getUriFor(Settings.System.SYSTEM_ICON_COLOR),
false, this, UserHandle.USER_ALL);
updateSettings();
}

Expand Down Expand Up @@ -406,9 +396,15 @@ public void getFontStyle(int font) {
case FONT_BOLD:
setTypeface(Typeface.create("sans-serif", Typeface.BOLD));
break;
case FONT_CONDENSED:
setTypeface(Typeface.create("sans-serif-condensed", Typeface.NORMAL));
break;
case FONT_LIGHT:
setTypeface(Typeface.create("sans-serif-light", Typeface.NORMAL));
break;
case FONT_LIGHT_ITALIC:
setTypeface(Typeface.create("sans-serif-light", Typeface.ITALIC));
break;
case FONT_NORMAL:
default:
setTypeface(Typeface.create("sans-serif", Typeface.NORMAL));
Expand Down

0 comments on commit 744a2ec

Please sign in to comment.