diff --git a/project/AcDisplay/src/main/assets/fonts/BetterThanPixel.ttf b/project/AcDisplay/src/main/assets/fonts/BetterThanPixel.ttf new file mode 100644 index 00000000..8aa86ff2 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/BetterThanPixel.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/DarkistheNight.ttf b/project/AcDisplay/src/main/assets/fonts/DarkistheNight.ttf new file mode 100644 index 00000000..e43fb442 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/DarkistheNight.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Franks-Regular.otf b/project/AcDisplay/src/main/assets/fonts/Franks-Regular.otf new file mode 100644 index 00000000..904f46b6 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Franks-Regular.otf differ diff --git a/project/AcDisplay/src/main/assets/fonts/PanicStricken.ttf b/project/AcDisplay/src/main/assets/fonts/PanicStricken.ttf new file mode 100644 index 00000000..4754d523 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/PanicStricken.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-Bold.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-Bold.ttf new file mode 100644 index 00000000..91ec2122 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-Bold.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-BoldCondensed.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-BoldCondensed.ttf new file mode 100644 index 00000000..d7ea8833 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-BoldCondensed.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-BoldItalic.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-BoldItalic.ttf new file mode 100644 index 00000000..4013bf88 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-BoldItalic.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-Condensed.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-Condensed.ttf new file mode 100644 index 00000000..6e7575a1 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-Condensed.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-Italic.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-Italic.ttf new file mode 100644 index 00000000..9f49ffd8 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-Italic.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-Light.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-Light.ttf new file mode 100644 index 00000000..d43e9433 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-Light.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-LightItalic.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-LightItalic.ttf new file mode 100644 index 00000000..c11442ce Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-LightItalic.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-Regular.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-Regular.ttf new file mode 100644 index 00000000..7d9a6c4c Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-Regular.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-Thin.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-Thin.ttf new file mode 100644 index 00000000..d262d144 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-Thin.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Roboto-ThinItalic.ttf b/project/AcDisplay/src/main/assets/fonts/Roboto-ThinItalic.ttf new file mode 100644 index 00000000..63e9f971 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Roboto-ThinItalic.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Light.ttf b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Light.ttf new file mode 100644 index 00000000..24164ecc Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Light.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/RobotoSlab-LightItalic.ttf b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-LightItalic.ttf new file mode 100644 index 00000000..29fea950 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-LightItalic.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Regular.ttf b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Regular.ttf new file mode 100644 index 00000000..132baa33 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Regular.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Thin.ttf b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Thin.ttf new file mode 100644 index 00000000..657b2ed7 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/RobotoSlab-Thin.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Sabo-Filled.otf b/project/AcDisplay/src/main/assets/fonts/Sabo-Filled.otf new file mode 100644 index 00000000..8204fbf8 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Sabo-Filled.otf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Scratch_Regular.ttf b/project/AcDisplay/src/main/assets/fonts/Scratch_Regular.ttf new file mode 100644 index 00000000..9c35a42b Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Scratch_Regular.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/Stroke.ttf b/project/AcDisplay/src/main/assets/fonts/Stroke.ttf new file mode 100644 index 00000000..3e5e918f Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/Stroke.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/VTKSGoodLuckForYou.ttf b/project/AcDisplay/src/main/assets/fonts/VTKSGoodLuckForYou.ttf new file mode 100644 index 00000000..d36d1a7a Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/VTKSGoodLuckForYou.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/YoungShark.ttf b/project/AcDisplay/src/main/assets/fonts/YoungShark.ttf new file mode 100644 index 00000000..11888e51 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/YoungShark.ttf differ diff --git a/project/AcDisplay/src/main/assets/fonts/darkforest.ttf b/project/AcDisplay/src/main/assets/fonts/darkforest.ttf new file mode 100644 index 00000000..4a9c3bd2 Binary files /dev/null and b/project/AcDisplay/src/main/assets/fonts/darkforest.ttf differ diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/Build.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/Build.java index 7decd919..a4447d35 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/Build.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/Build.java @@ -23,9 +23,7 @@ */ public final class Build { - public static final boolean DEBUG = BuildConfig.MY_DEBUG; - public static final String TIME_STAMP = BuildConfig.MY_TIME_STAMP; - public static final String GOOGLE_PLAY_PUBLIC_KEY = BuildConfig.MY_GOOGLE_PLAY_PUBLIC_KEY; + public static final boolean DEBUG = BuildConfig.DEBUG; public static final String SUPPORT_EMAIL = "support@artemchep.com"; diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/Config.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/Config.java index ec57bbab..eae46156 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/Config.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/Config.java @@ -18,9 +18,11 @@ */ package com.achep.acdisplay; +import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; +import android.graphics.Color; import android.util.Log; import android.util.TypedValue; @@ -77,7 +79,20 @@ public class Config { public static final String KEY_UI_STATUS_BATTERY_ALWAYS_VISIBLE = "ui_status_battery_always_visible"; public static final String KEY_UI_IMMERSIVE_MODE = "immersive_mode_kitkat"; public static final String KEY_UI_ICON_SIZE = "ui_icon_size"; - + + //Clock stuff + public static final String KEY_CLOCK_FONT ="clock_font"; + public static final String KEY_CLOCK_COLOR ="clock_color"; + public static final String KEY_CLOCK_SIZE ="clock_size"; + + //Notification privacy stuff + public static final String KEY_NOTIFY_PRIVACY="notify_privacy"; + + + //Lockscreen + public static final String KEY_LOCK_CIRCLE_COLOR="lock_circle_color"; + public static final String KEY_LOCK_ICON_COLOR="lock_icon_color"; + private static Config sConfig; private boolean mAcDisplayEnabled; @@ -101,7 +116,21 @@ public class Config { private boolean mUiBatteryAlwaysVisible; private boolean mUiNotifyCircledIcon; private boolean mImmersiveMode; - + + //Clock customization parameters + private String mClockFont; + private int mClockColor; + private int mClockSize; + + //Notification privacy + private boolean mPrivacy; + + //Lockscreen colors + private int mLockCircleColor; + private int mLockIconColor; + private int mLockCircleAlpha; + private int mLockIconAlpha; + private boolean mConstAlternativePayments; private ArrayList mListeners; @@ -194,7 +223,21 @@ void init(Context context) { res.getBoolean(R.bool.config_default_ui_immersive_mode_kitkat)); mIconSize = prefs.getInt(KEY_UI_ICON_SIZE, res.getInteger(R.integer.config_default_ui_icon_size)); - + + //clock customization + mClockFont = prefs.getString(KEY_CLOCK_FONT, "fonts/Roboto-Light.ttf"); + mClockColor = prefs.getInt(KEY_CLOCK_COLOR, Color.parseColor("#ffffff")); + mClockSize=prefs.getInt(KEY_CLOCK_SIZE, 85); + + //Notification privacy + mPrivacy = prefs.getBoolean(KEY_NOTIFY_PRIVACY, + res.getBoolean(R.bool.config_default_notify_privacy)); + + //Lockscreen colors + mLockCircleColor = prefs.getInt(KEY_LOCK_CIRCLE_COLOR, Color.WHITE); + mLockIconColor = prefs.getInt(KEY_LOCK_ICON_COLOR, Color.BLACK); + + // other mEnabledOnlyWhileCharging = prefs.getBoolean(KEY_ONLY_WHILE_CHARGING, res.getBoolean(R.bool.config_default_enabled_only_while_charging)); @@ -202,6 +245,8 @@ void init(Context context) { // const mConstAlternativePayments = res.getBoolean(R.bool.config_alternative_payments); + + } static SharedPreferences getSharedPreferences(Context context) { @@ -224,7 +269,7 @@ private void notifyConfigChanged(String key, Object value, OnConfigChangedListen } private void saveOption(Context context, String key, Object value, - OnConfigChangedListener listener, boolean changed) { + OnConfigChangedListener listener, boolean changed) { if (!changed) { // Don't update preferences if this change is a lie. return; @@ -237,7 +282,9 @@ private void saveOption(Context context, String key, Object value, editor.putBoolean(key, (Boolean) value); } else if (value instanceof Integer) { editor.putInt(key, (Integer) value); - } else throw new IllegalArgumentException("Unknown option type."); + } else if(value instanceof String) { + editor.putString(key, (String)value); + }else throw new IllegalArgumentException("Unknown option type."); editor.apply(); mContext = context; @@ -253,10 +300,10 @@ private void saveOption(Context context, String key, Object value, * Setter for the entire app enabler. */ public boolean setEnabled(Context context, boolean enabled, - OnConfigChangedListener listener) { + OnConfigChangedListener listener) { if (enabled && !(AccessUtils.isNotificationAccessEnabled(context) - && AccessUtils.isDeviceAdminEnabled(context))) { + && AccessUtils.isDeviceAdminEnabled(context))) { return false; } @@ -303,7 +350,7 @@ public void setActiveModeWithoutNotificationsEnabled(Context context, boolean en * Setter to only have the app running while charging. */ public void setActiveDisplayEnabledOnlyWhileCharging(Context context, boolean enabled, - OnConfigChangedListener listener) { + OnConfigChangedListener listener) { boolean changed = mEnabledOnlyWhileCharging != (mEnabledOnlyWhileCharging = enabled); saveOption(context, KEY_ONLY_WHILE_CHARGING, enabled, listener, changed); @@ -317,13 +364,13 @@ public void setActiveDisplayEnabledOnlyWhileCharging(Context context, boolean en * Setter to allow notifications with a lower priority like Google Now. */ public void setLowPriorityNotificationsAllowed(Context context, boolean enabled, - OnConfigChangedListener listener) { + OnConfigChangedListener listener) { boolean changed = mNotifyLowPriority != (mNotifyLowPriority = enabled); saveOption(context, KEY_NOTIFY_LOW_PRIORITY, enabled, listener, changed); } public void setWakeUpOnNotifyEnabled(Context context, boolean enabled, - OnConfigChangedListener listener) { + OnConfigChangedListener listener) { boolean changed = mNotifyWakeUpOn != (mNotifyWakeUpOn = enabled); saveOption(context, KEY_NOTIFY_WAKE_UP_ON, enabled, listener, changed); } @@ -432,6 +479,53 @@ public void setIconSize(Context context, int size, OnConfigChangedListener liste boolean changed = mIconSize != (mIconSize = size); saveOption(context, KEY_UI_ICON_SIZE, size, listener, changed); } + + + ////////////////////////////// + // Clock Customization stuff// + ////////////////////////////// + /** + * Clock Font setter + */ + public void setClockFont(Context context, String value, OnConfigChangedListener listener) { + saveOption(context, KEY_CLOCK_FONT, value, listener, mClockFont != (mClockFont = value)); + } + + /** + * Clock Color setter + */ + public void setClockColor(Context context, int value, OnConfigChangedListener listener) { + saveOption(context, KEY_CLOCK_COLOR, value, listener, mClockColor != (mClockColor = value)); + } + + /** + * Clock Size setter + */ + public void setClockSize(Context context, int value, OnConfigChangedListener listener) { + saveOption(context, KEY_CLOCK_SIZE, value, listener, mClockSize != (mClockSize = value)); + } + + + //////////////////////// + //Notification privacy// + //////////////////////// + + public void setNotificationPrivacy(Context context, boolean value, OnConfigChangedListener listener) { + saveOption(context, KEY_NOTIFY_PRIVACY, value, listener, mPrivacy != (mPrivacy = value)); + } + + ////////////// + //LockScreen// + ////////////// + + public void setLockCircleColor(Context context, int value, OnConfigChangedListener listener) { + saveOption(context, KEY_LOCK_CIRCLE_COLOR, value, listener, mLockCircleColor != (mLockCircleColor = value)); + } + + public void setLockIconColor(Context context, int value, OnConfigChangedListener listener) { + saveOption(context, KEY_LOCK_ICON_COLOR, value, listener, mLockIconColor != (mLockIconColor = value)); + } + public int getTimeoutNormal() { return mTimeoutNormal; @@ -535,4 +629,41 @@ public boolean isImmersible(){ } } + + //////////////////////////////// + //Clock customizations getters// + //////////////////////////////// + + public String getClockFont() { + return mClockFont; + } + + public int getClockColor() { + return mClockColor; + } + + public int getClockSize() { + return mClockSize; + } + + /////////////////////////////// + //Notification Privacy Getter// + /////////////////////////////// + + public boolean isPrivacyEnabled() { + return mPrivacy; + } + + ////////////////////// + //LockScreen getters// + ////////////////////// + + public int getLockCircleColor() { + return this.mLockCircleColor; + } + + public int getLockIconColor() { + return this.mLockIconColor; + } + } diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayActivity.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayActivity.java index 1c00c6b7..f531f0dc 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayActivity.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayActivity.java @@ -170,6 +170,8 @@ protected void onCreate(Bundle savedInstanceState) { mBackgroundView = (ImageView) findViewById(R.id.background); mCircleView = (CircleView) findViewById(R.id.circle); mCircleView.setCallback(this); + mCircleView.setLockCircleColor(mConfig.getLockCircleColor()); + mCircleView.setLockIconColor(mConfig.getLockIconColor()); mImmersiveMode = Device.hasKitKatApi(); mImmersiveModeToggle = getConfig().isImmersible(); diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayFragment.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayFragment.java index 69da5d69..feaee5a9 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayFragment.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/AcDisplayFragment.java @@ -21,11 +21,13 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; +import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.app.Activity; import android.app.Fragment; import android.content.Context; import android.graphics.Bitmap; +import android.graphics.Typeface; import android.os.Bundle; import android.os.Handler; import android.os.SystemClock; @@ -44,7 +46,6 @@ import android.view.ViewGroup; import android.view.ViewStub; import android.widget.LinearLayout; - import com.achep.acdisplay.Build; import com.achep.acdisplay.Config; import com.achep.acdisplay.Device; @@ -63,7 +64,7 @@ import com.achep.acdisplay.view.ForwardingLayout; import com.achep.acdisplay.view.ForwardingListener; import com.achep.acdisplay.widgets.ProgressBar; - +import com.achep.acdisplay.widgets.TimeView; import java.util.ArrayList; import java.util.HashMap; @@ -71,7 +72,7 @@ * This is main fragment of ActiveDisplay app. */ public class AcDisplayFragment extends Fragment implements - View.OnTouchListener { +View.OnTouchListener { private static final String TAG = "AcDisplayFragment"; @@ -145,6 +146,23 @@ public void onAttach(Activity activity) { mMinFlingVelocity = vc.getScaledMinimumFlingVelocity(); } + /* + * Add back onResume() method to apply clock customizations changes on the preview + */ + + + @Override + public void onResume() { + super.onResume(); + mTimeout.setTimeoutDelayed(mConfig.getTimeoutNormal()); + ViewGroup clockView = mSceneMain.getView(); + TimeView clock = (TimeView) clockView.findViewById(R.id.time); + Typeface tf = Typeface.createFromAsset(getActivity().getAssets(), mConfig.getClockFont()); + clock.setTypeface(tf); + clock.setTextColor(mConfig.getClockColor()); + clock.setTextSize((float)mConfig.getClockSize()); + } + @TargetApi(android.os.Build.VERSION_CODES.KITKAT) @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -177,9 +195,9 @@ public void onValueChanged(View view, float value) { mSceneMain = new SceneCompat(mSceneContainer, sceneMain); if (getResources().getBoolean(R.bool.config_transition_fade)) { mTransition = new TransitionSet() - .setOrdering(TransitionSet.ORDERING_TOGETHER) - .addTransition(new Fade()) - .addTransition(new ChangeBounds()); + .setOrdering(TransitionSet.ORDERING_TOGETHER) + .addTransition(new Fade()) + .addTransition(new ChangeBounds()); } else { mTransition = new ChangeBounds(); } @@ -189,7 +207,16 @@ public void onValueChanged(View view, float value) { mCurrentScene = mSceneMain; mSceneMain.enter(); + + // ////////////////////////////////////////////////// + // Apply clock customizazions while creating views // + //////////////////////////////////////////////////// Config config = Config.getInstance(); + Typeface tf = Typeface.createFromAsset(getActivity().getAssets(), config.getClockFont()); + TimeView clock = (TimeView)sceneMain.findViewById(R.id.time); + clock.setTypeface(tf); + clock.setTextColor(config.getClockColor()); + clock.setTextSize((float)config.getClockSize()); // ///////////////// // ~~ TIMEOUT GUI ~~ @@ -277,131 +304,131 @@ public boolean onTouch(View v, MotionEvent event) { final int action = event.getAction(); switch (action) { - case MotionEvent.ACTION_DOWN: - mTouched = true; - - // Restart timeout and immediately pause it to - // get full line of timeout. - mTimeout.setTimeoutDelayed(mConfig.getTimeoutShort(), true); - mTimeout.pause(); - - // Track the velocity of movement, so we - // can do swipe-to-dismiss. - mVelocityTracker = VelocityTracker.obtain(); - mStdTouchGen[0] = 0; - mStdTouchGen[1] = 0; - - // /////////////// - // ~~ FALL DOWN ~~ - // /////////////// - case MotionEvent.ACTION_MOVE: - - // Probably best solution would be to use - // motion forwarding... But it's more complex. - final float rawX = event.getRawX(); - final float rawY = event.getRawY(); - - boolean anythingPressed = false; - final int length = mCollapsedViewsContainer.getChildCount(); - for (int i = 0; i < length; i++) { - final View child = mCollapsedViewsContainer.getChildAt(i); - assert child != null; - if (child.getVisibility() != View.VISIBLE) continue; - - // Check if current touch is on view, simulate pressing - // and update its state so view can update background etc. - final boolean pressedOld = child.isPressed(); - final boolean pressed = ViewUtils.isTouchPointInView(child, rawX, rawY); - child.setPressed(pressed); - - if (pressed) anythingPressed = true; - if (pressed != pressedOld && !child.isSelected()) { - child.refreshDrawableState(); - if (pressed) { - mTouchHandler.removeCallbacksAndMessages(null); - mTouchHandler.postDelayed(new Runnable() { - @Override - public void run() { - showWidget(findWidgetByCollapsedView(child)); - } - }, action == MotionEvent.ACTION_DOWN ? 0 : 120); - } + case MotionEvent.ACTION_DOWN: + mTouched = true; + + // Restart timeout and immediately pause it to + // get full line of timeout. + mTimeout.setTimeoutDelayed(mConfig.getTimeoutShort(), true); + mTimeout.pause(); + + // Track the velocity of movement, so we + // can do swipe-to-dismiss. + mVelocityTracker = VelocityTracker.obtain(); + mStdTouchGen[0] = 0; + mStdTouchGen[1] = 0; + + // /////////////// + // ~~ FALL DOWN ~~ + // /////////////// + case MotionEvent.ACTION_MOVE: + + // Probably best solution would be to use + // motion forwarding... But it's more complex. + final float rawX = event.getRawX(); + final float rawY = event.getRawY(); + + boolean anythingPressed = false; + final int length = mCollapsedViewsContainer.getChildCount(); + for (int i = 0; i < length; i++) { + final View child = mCollapsedViewsContainer.getChildAt(i); + assert child != null; + if (child.getVisibility() != View.VISIBLE) continue; + + // Check if current touch is on view, simulate pressing + // and update its state so view can update background etc. + final boolean pressedOld = child.isPressed(); + final boolean pressed = ViewUtils.isTouchPointInView(child, rawX, rawY); + child.setPressed(pressed); + + if (pressed) anythingPressed = true; + if (pressed != pressedOld && !child.isSelected()) { + child.refreshDrawableState(); + if (pressed) { + mTouchHandler.removeCallbacksAndMessages(null); + mTouchHandler.postDelayed(new Runnable() { + @Override + public void run() { + showWidget(findWidgetByCollapsedView(child)); + } + }, action == MotionEvent.ACTION_DOWN ? 0 : 120); } } - if (!anythingPressed) { - mTouchHandler.removeCallbacksAndMessages(null); - } + } + if (!anythingPressed) { + mTouchHandler.removeCallbacksAndMessages(null); + } - addSwipeMovement(event, action == MotionEvent.ACTION_DOWN); + addSwipeMovement(event, action == MotionEvent.ACTION_DOWN); - break; - case MotionEvent.ACTION_UP: - - if (mSelectedWidget != null && mSelectedWidget.isDismissible()) { - addSwipeMovement(event, false); - mVelocityTracker.computeCurrentVelocity(1000); - float velocityX = mVelocityTracker.getXVelocity(); - velocityX = velocityX >= 0 - ? Math.max(0, velocityX - mWidgetTranslatorX.getStrength()) - : Math.min(0, velocityX + mWidgetTranslatorX.getStrength()); - - boolean dismiss = false; - final boolean dismissRight; - - int width = mWidgetTranslatorX.getView().getWidth(); - float absVelocityX = Math.abs(velocityX); - float absVelocityY = Math.abs(mVelocityTracker.getYVelocity()); - float deltaX = mWidgetTranslatorX.getValue(); - float absDeltaX = Math.abs(deltaX); - if (absDeltaX > width / 4) { - dismiss = true; - dismissRight = deltaX > 0; - } else if (mMinFlingVelocity <= absVelocityX - && absVelocityX <= mMaxFlingVelocity - && absVelocityY * 2 < absVelocityX - && absDeltaX > width / 6) { - // dismiss only if flinging in the same direction as dragging - dismiss = (velocityX < 0) == (deltaX < 0); - dismissRight = mVelocityTracker.getXVelocity() > 0; - } else { - dismissRight = false; - } + break; + case MotionEvent.ACTION_UP: + + if (mSelectedWidget != null && mSelectedWidget.isDismissible()) { + addSwipeMovement(event, false); + mVelocityTracker.computeCurrentVelocity(1000); + float velocityX = mVelocityTracker.getXVelocity(); + velocityX = velocityX >= 0 + ? Math.max(0, velocityX - mWidgetTranslatorX.getStrength()) + : Math.min(0, velocityX + mWidgetTranslatorX.getStrength()); + + boolean dismiss = false; + final boolean dismissRight; + + int width = mWidgetTranslatorX.getView().getWidth(); + float absVelocityX = Math.abs(velocityX); + float absVelocityY = Math.abs(mVelocityTracker.getYVelocity()); + float deltaX = mWidgetTranslatorX.getValue(); + float absDeltaX = Math.abs(deltaX); + if (absDeltaX > width / 4) { + dismiss = true; + dismissRight = deltaX > 0; + } else if (mMinFlingVelocity <= absVelocityX + && absVelocityX <= mMaxFlingVelocity + && absVelocityY * 2 < absVelocityX + && absDeltaX > width / 6) { + // dismiss only if flinging in the same direction as dragging + dismiss = (velocityX < 0) == (deltaX < 0); + dismissRight = mVelocityTracker.getXVelocity() > 0; + } else { + dismissRight = false; + } - if (dismiss) { - mTouched = false; - mTouchHandler.removeCallbacksAndMessages(null); + if (dismiss) { + mTouched = false; + mTouchHandler.removeCallbacksAndMessages(null); - int duration = Math.round(absDeltaX * 1000f / Math.max(absVelocityX, 500f)); - - mWidgetTranslatorX.stop(); - mWidgetTranslatorX.getView().animate() - .alpha(0) - .translationX(deltaX + width * MathUtils.charge(deltaX)) - .setDuration(duration) - .setListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - onAnimationCancel(animation); - endTouch(); - } - - @Override - public void onAnimationCancel(Animator animation) { - mSelectedWidget.onDismissed(!dismissRight); - mWidgetTranslatorX.setValue(0f); - } - }); - break; - } - } + int duration = Math.round(absDeltaX * 1000f / Math.max(absVelocityX, 500f)); - // /////////////// - // ~~ FALL DOWN ~~ - // /////////////// - case MotionEvent.ACTION_CANCEL: - mTouchHandler.removeCallbacksAndMessages(null); - endTouch(); - break; + mWidgetTranslatorX.stop(); + mWidgetTranslatorX.getView().animate() + .alpha(0) + .translationX(deltaX + width * MathUtils.charge(deltaX)) + .setDuration(duration) + .setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + onAnimationCancel(animation); + endTouch(); + } + + @Override + public void onAnimationCancel(Animator animation) { + mSelectedWidget.onDismissed(!dismissRight); + mWidgetTranslatorX.setValue(0f); + } + }); + break; + } + } + + // /////////////// + // ~~ FALL DOWN ~~ + // /////////////// + case MotionEvent.ACTION_CANCEL: + mTouchHandler.removeCallbacksAndMessages(null); + endTouch(); + break; } return true; } @@ -458,6 +485,7 @@ private void endTouch() { mCollapsedViewsNeedsUpdate = false; } + @SuppressLint("NewApi") private void showWidget(Widget widget) { if (mSelectedWidget != null) { mSelectedWidget.getCollapsedView().setSelected(false); @@ -502,6 +530,7 @@ public void showMainWidget() { /** * Changes current scene to given one. */ + @SuppressLint("NewApi") private void goScene(SceneCompat sceneCompat) { if (mCurrentScene != sceneCompat) { mCurrentScene = sceneCompat; @@ -522,6 +551,7 @@ private void goScene(SceneCompat sceneCompat) { */ // TODO: Optimize it // Spent hours on optimizing with no result: 0h + @SuppressLint("NewApi") private void updateNotificationList() { if (getActivity() == null) { return; @@ -629,7 +659,7 @@ private void updateNotificationList() { // //////////// // ~~ EXTRAS ~~ // //////////// -/* + /* int[] extras = new int[]{ SCENE_MUSIC_CONTROLS, }; @@ -732,19 +762,19 @@ private class NotificationListener implements NotificationPresenter.OnNotificati @Override public void onNotificationListChanged(NotificationPresenter nm, - OpenStatusBarNotification notification, - final int event) { + OpenStatusBarNotification notification, + final int event) { if (mTouched) { mCollapsedViewsNeedsUpdate = true; } else { switch (event) { - case NotificationPresenter.EVENT_BATH: - case NotificationPresenter.EVENT_POSTED: - case NotificationPresenter.EVENT_CHANGED: - case NotificationPresenter.EVENT_REMOVED: - mTimeout.setTimeoutDelayed(mConfig.getTimeoutNormal(), true); - updateNotificationList(); - break; + case NotificationPresenter.EVENT_BATH: + case NotificationPresenter.EVENT_POSTED: + case NotificationPresenter.EVENT_CHANGED: + case NotificationPresenter.EVENT_REMOVED: + mTimeout.setTimeoutDelayed(mConfig.getTimeoutNormal(), true); + updateNotificationList(); + break; } } } diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/ColorStateDrawable.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/ColorStateDrawable.java new file mode 100644 index 00000000..e05900f8 --- /dev/null +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/ColorStateDrawable.java @@ -0,0 +1,81 @@ +package com.achep.acdisplay.acdisplay; + +/* + * Copyright (C) 2013 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. + * + * You can find source here: + * https://android.googlesource.com/platform/frameworks/opt/colorpicker/+/master/src/com/android/colorpicker + */ + + +/* + * This class will create a rounded Drawable to display a coloured circle on + * Custom clock color preference + */ + +import android.graphics.Color; +import android.graphics.PorterDuff; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.LayerDrawable; + +/** + * A drawable which sets its color filter to a color specified by the user, and changes to a + * slightly darker color when pressed or focused. + */ +public class ColorStateDrawable extends LayerDrawable { + + private static final float PRESSED_STATE_MULTIPLIER = 0.70f; + + private int mColor; + + public ColorStateDrawable(Drawable[] layers, int color) { + super(layers); + mColor = color; + } + + @Override + protected boolean onStateChange(int[] states) { + boolean pressedOrFocused = false; + for (int state : states) { + if (state == android.R.attr.state_pressed || state == android.R.attr.state_focused) { + pressedOrFocused = true; + break; + } + } + + if (pressedOrFocused) { + super.setColorFilter(getPressedColor(mColor), PorterDuff.Mode.SRC_ATOP); + } else { + super.setColorFilter(mColor, PorterDuff.Mode.SRC_ATOP); + } + + return super.onStateChange(states); + } + + /** + * Given a particular color, adjusts its value by a multiplier. + */ + private int getPressedColor(int color) { + float[] hsv = new float[3]; + Color.colorToHSV(color, hsv); + hsv[2] = hsv[2] * PRESSED_STATE_MULTIPLIER; + return Color.HSVToColor(hsv); + } + + @Override + public boolean isStateful() { + return true; + } +} diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/components/NotificationUI.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/components/NotificationUI.java index c7a234f3..55c60b39 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/components/NotificationUI.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/acdisplay/components/NotificationUI.java @@ -24,6 +24,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.TextView; import com.achep.acdisplay.Config; import com.achep.acdisplay.R; @@ -160,6 +161,10 @@ public void run() { public void onExpandedViewAttached() { mNotification.getNotificationData().markAsRead(true); mNotifyWidget.setNotification(mNotification); + + //Apply privacy stuff + boolean mPrivacyOn = Config.getInstance().isPrivacyEnabled(); + mNotifyWidget.hideMessage(mPrivacyOn); } @Override diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/fragments/AboutDialog.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/fragments/AboutDialog.java index 8c7aa72f..ec93a9b5 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/fragments/AboutDialog.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/fragments/AboutDialog.java @@ -96,7 +96,7 @@ public void onClick(View v) { mEasterEggClicks = 0; // TODO: Put an Easter egg here. } else { - mTimeStampToast = Toast.makeText(context, Build.TIME_STAMP, Toast.LENGTH_LONG); + mTimeStampToast = Toast.makeText(context, "", Toast.LENGTH_LONG); mTimeStampToast.show(); } } diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/iab/DonationFragment.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/iab/DonationFragment.java index 2a41b226..51578a42 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/iab/DonationFragment.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/iab/DonationFragment.java @@ -315,7 +315,7 @@ private void initBilling() { setWaitScreen(true); disposeBilling(); - String base64EncodedPublicKey = Build.GOOGLE_PLAY_PUBLIC_KEY; + String base64EncodedPublicKey = ""; mHelper = new IabHelper(getActivity(), base64EncodedPublicKey); mHelper.enableDebugLogging(Build.DEBUG); mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/iab/utils/BlurBuilder.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/iab/utils/BlurBuilder.java new file mode 100644 index 00000000..cf34eb2e --- /dev/null +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/iab/utils/BlurBuilder.java @@ -0,0 +1,55 @@ +package com.achep.acdisplay.iab.utils; + +import android.app.Activity; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Point; +import android.renderscript.Allocation; +import android.renderscript.Element; +import android.renderscript.RenderScript; +import android.renderscript.ScriptIntrinsicBlur; +import android.view.Display; +import android.view.View; + +public class BlurBuilder { + private static final float BITMAP_SCALE = 0.4f; + private static final float BLUR_RADIUS = 7.5f; + static Context context; + + public static Bitmap blur(View v, Context c) { + context =c; + return blur(v.getContext(), getScreenshot(v)); + } + + public static Bitmap blur(Context ctx, Bitmap image) { + int width = Math.round(image.getWidth() * BITMAP_SCALE); + int height = Math.round(image.getHeight() * BITMAP_SCALE); + + Bitmap inputBitmap = Bitmap.createScaledBitmap(image, width, height, false); + Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap); + + RenderScript rs = RenderScript.create(ctx); + ScriptIntrinsicBlur theIntrinsic = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); + Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap); + Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap); + theIntrinsic.setRadius(BLUR_RADIUS); + theIntrinsic.setInput(tmpIn); + theIntrinsic.forEach(tmpOut); + tmpOut.copyTo(outputBitmap); + + return outputBitmap; + } + + private static Bitmap getScreenshot(View v) { + Display display = ((Activity) context).getWindowManager().getDefaultDisplay(); + Point size = new Point(); + display.getSize(size); + int width = size.x; + int height = size.y; + Bitmap b = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); + Canvas c = new Canvas(b); + v.draw(c); + return b; + } +} diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/FontDialogBaseAdapter.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/FontDialogBaseAdapter.java new file mode 100644 index 00000000..35fff774 --- /dev/null +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/FontDialogBaseAdapter.java @@ -0,0 +1,62 @@ +package com.achep.acdisplay.settings; + +/* + * Custom clock font dialog adapter + * + *Load fonts from assets and apply them to every listview row to show a preview + * + */ + +import java.util.List; + +import android.content.Context; +import android.graphics.Typeface; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; +import android.widget.TextView; + +public class FontDialogBaseAdapter extends BaseAdapter { + + private List mFonts; + private Context mContext; + private int layoutResId; + + public FontDialogBaseAdapter(Context c, List fonts, int resId) { + this.mContext = c; + this.mFonts = fonts; + this.layoutResId = resId; + } + + @Override + public int getCount() { + // TODO Auto-generated method stub + return mFonts.size(); + } + + @Override + public Object getItem(int arg0) { + // TODO Auto-generated method stub + return mFonts.get(arg0); + } + + @Override + public long getItemId(int arg0) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public View getView(int position, View v, ViewGroup parent) { + // TODO Auto-generated method stub + LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); + v = inflater.inflate(layoutResId, parent, false); + TextView text1 = (TextView) v.findViewById(android.R.id.text1); + Typeface tf = Typeface.createFromAsset(mContext.getAssets(), mFonts.get(position)); + text1.setTypeface(tf); + text1.setText(mFonts.get(position).replaceAll("fonts/","").replaceAll(".ttf", "").replaceAll(".otf", "")); + return v; + } + +} \ No newline at end of file diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/InterfaceFragment.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/InterfaceFragment.java index b7192bf2..373a067b 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/InterfaceFragment.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/InterfaceFragment.java @@ -18,20 +18,41 @@ */ package com.achep.acdisplay.settings; +import android.app.AlertDialog; import android.content.Context; +import android.content.DialogInterface; +import android.graphics.Typeface; +import android.graphics.drawable.Drawable; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.MultiSelectListPreference; import android.preference.Preference; +import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceFragment; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.AdapterView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.ListView; +import android.widget.SeekBar; +import android.widget.SeekBar.OnSeekBarChangeListener; import com.achep.acdisplay.Config; import com.achep.acdisplay.Operator; import com.achep.acdisplay.R; +import com.achep.acdisplay.acdisplay.ColorStateDrawable; import com.achep.acdisplay.settings.preferences.IconSizePreference; - +import com.achep.acdisplay.widgets.TimeView; +import com.larswerkman.holocolorpicker.ColorPicker; +import com.larswerkman.holocolorpicker.OpacityBar; +import com.larswerkman.holocolorpicker.SVBar; +import com.larswerkman.holocolorpicker.SaturationBar; +import com.larswerkman.holocolorpicker.ValueBar; + +import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; +import java.util.List; import java.util.Locale; import java.util.Set; @@ -41,8 +62,8 @@ * @author Artem Chepurnoy */ public class InterfaceFragment extends PreferenceFragment implements - Preference.OnPreferenceChangeListener, - Config.OnConfigChangedListener { +Preference.OnPreferenceChangeListener, +Config.OnConfigChangedListener, OnPreferenceClickListener { private CheckBoxPreference mShowWallpaper; private CheckBoxPreference mShadowToggle; @@ -53,6 +74,14 @@ public class InterfaceFragment extends PreferenceFragment implements private IconSizePreference mIconSize; private MultiSelectListPreference mDynamicBackground; + //Add clock customization stuff + + private Preference mClockFont; + private Preference mClockColor; + private Preference mClockSize; + private AlertDialog fontDialog; + final List fonts = new ArrayList(); + private boolean mBroadcasting; @Override @@ -77,6 +106,14 @@ public void onCreate(Bundle savedInstanceState) { mIconSize = (IconSizePreference) findPreference( Config.KEY_UI_ICON_SIZE); + //find clock customization preferences + mClockFont = (Preference) findPreference( + Config.KEY_CLOCK_FONT); + mClockColor = (Preference) findPreference( + Config.KEY_CLOCK_COLOR); + mClockSize = (Preference) findPreference( + Config.KEY_CLOCK_SIZE); + mShowWallpaper.setOnPreferenceChangeListener(this); mShadowToggle.setOnPreferenceChangeListener(this); mDynamicBackground.setOnPreferenceChangeListener(this); @@ -84,6 +121,44 @@ public void onCreate(Bundle savedInstanceState) { mCircledIconToggle.setOnPreferenceChangeListener(this); mBatteryAlwaysVisibleToggle.setOnPreferenceChangeListener(this); mImmersiveMode.setOnPreferenceChangeListener(this); + + + //add listeners + mClockFont.setOnPreferenceClickListener(this); + mClockColor.setOnPreferenceClickListener(this); + mClockSize.setOnPreferenceClickListener(this); + + //set clock color as preference icon + Config config = Config.getInstance(); + mClockColor.setIcon(setCircleIconDrawable(config.getClockColor())); + + + + //add fonts from assets to the list + fonts.add("fonts/Roboto-Bold.ttf"); + fonts.add("fonts/Roboto-BoldCondensed.ttf"); + fonts.add("fonts/Roboto-BoldItalic.ttf"); + fonts.add("fonts/Roboto-Condensed.ttf"); + fonts.add("fonts/Roboto-Italic.ttf"); + fonts.add("fonts/Roboto-Light.ttf"); + fonts.add("fonts/Roboto-LightItalic.ttf"); + fonts.add("fonts/Roboto-Regular.ttf"); + fonts.add("fonts/Roboto-Thin.ttf"); + fonts.add("fonts/Roboto-ThinItalic.ttf"); + fonts.add("fonts/RobotoSlab-Light.ttf"); + fonts.add("fonts/RobotoSlab-LightItalic.ttf"); + fonts.add("fonts/RobotoSlab-Regular.ttf"); + fonts.add("fonts/RobotoSlab-Thin.ttf"); + fonts.add("fonts/Franks-Regular.otf"); + fonts.add("fonts/Sabo-Filled.otf"); + fonts.add("fonts/VTKSGoodLuckForYou.ttf"); + fonts.add("fonts/BetterThanPixel.ttf"); + fonts.add("fonts/darkforest.ttf"); + fonts.add("fonts/DarkistheNight.ttf"); + fonts.add("fonts/PanicStricken.ttf"); + fonts.add("fonts/Scratch_Regular.ttf"); + fonts.add("fonts/Stroke.ttf"); + fonts.add("fonts/YoungShark.ttf"); } @Override @@ -146,28 +221,45 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { @Override public void onConfigChanged(Config config, String key, Object value) { switch (key) { - case Config.KEY_UI_WALLPAPER_SHOWN: - updateShowWallpaperPreference(config); - break; - case Config.KEY_UI_SHADOW_TOGGLE: - updateShowShadowPreference(config); - break; - case Config.KEY_UI_MIRRORED_TIMEOUT_BAR: - updateMirroredTimeoutPreference(config); - break; - case Config.KEY_UI_NOTIFY_CIRCLED_ICON: - updateCircledIconPreference(config); - break; - case Config.KEY_UI_STATUS_BATTERY_ALWAYS_VISIBLE: - updateBatteryAlwaysVisiblePreference(config); - break; - case Config.KEY_UI_DYNAMIC_BACKGROUND_MODE: - updateDynamicBackgroundPreference(config); - break; - case Config.KEY_UI_IMMERSIVE_MODE: - updateImmersiveMode(config); - break; + case Config.KEY_UI_WALLPAPER_SHOWN: + updateShowWallpaperPreference(config); + break; + case Config.KEY_UI_SHADOW_TOGGLE: + updateShowShadowPreference(config); + break; + case Config.KEY_UI_MIRRORED_TIMEOUT_BAR: + updateMirroredTimeoutPreference(config); + break; + case Config.KEY_UI_NOTIFY_CIRCLED_ICON: + updateCircledIconPreference(config); + break; + case Config.KEY_UI_STATUS_BATTERY_ALWAYS_VISIBLE: + updateBatteryAlwaysVisiblePreference(config); + break; + case Config.KEY_UI_DYNAMIC_BACKGROUND_MODE: + updateDynamicBackgroundPreference(config); + break; + case Config.KEY_UI_IMMERSIVE_MODE: + updateImmersiveMode(config); + break; + } + } + + /* + * Clock customization preferences Click listener + * Show dialogs + */ + @Override + public boolean onPreferenceClick(Preference arg0) { + // TODO Auto-generated method stub + if(arg0 == mClockFont) { + showClockFontDialog(); + }else if(arg0 == mClockColor) { + showClockColorDialog(); + }else if(arg0 == mClockSize) { + showClockSizeDialog(); } + return false; } private void updateShowWallpaperPreference(Config config) { @@ -252,4 +344,162 @@ private void updateDynamicBackgroundPreferenceSummary(Config config) { } mDynamicBackground.setSummary(summary); } + + + /* + * CLOCK CUSTOMIZATION DIALOGS SECTION START + */ + + /* + * Custom clock Font Dialog + */ + private void showClockFontDialog() { + + + final Context context = getActivity(); + final Config config = Config.getInstance(); + + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setTitle("Custom Clock Font"); + LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View v = inflater.inflate(R.layout.font_dialog_layout, null, false); + ListView list = (ListView) v.findViewById(R.id.font_list); + FontDialogBaseAdapter mAdapter = new FontDialogBaseAdapter(getActivity(), fonts, android.R.layout.simple_list_item_1); + list.setAdapter(mAdapter); + list.setOnItemClickListener(new OnItemClickListener() { + + @Override + public void onItemClick(AdapterView arg0, View arg1, int position, + long id) { + // TODO Auto-generated method stub + config.setClockFont(context, fonts.get(position), InterfaceFragment.this); + fontDialog.cancel(); + } + + }); + + builder.setView(v); + fontDialog = builder.create(); + fontDialog.show(); + + } + + + /* + * Custom Clock color Dialog + */ + private void showClockColorDialog() { + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setTitle(R.string.preference_clock_color_title); + final Context context = getActivity(); + final Config config = Config.getInstance(); + LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View v = inflater.inflate(R.layout.color_selection_dialog, null, false); + final ColorPicker picker = (ColorPicker) v.findViewById(R.id.picker); + SVBar svBar = (SVBar) v.findViewById(R.id.svbar); + OpacityBar opacityBar = (OpacityBar) v.findViewById(R.id.opacitybar); + SaturationBar saturationBar = (SaturationBar) v.findViewById(R.id.saturationbar); + ValueBar valueBar = (ValueBar) v.findViewById(R.id.valuebar); + picker.addSVBar(svBar); + picker.addOpacityBar(opacityBar); + picker.addSaturationBar(saturationBar); + picker.addValueBar(valueBar); + picker.setColor(config.getClockColor()); + builder.setView(v); + + builder.setPositiveButton(R.string.dialog_ok, new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + // TODO Auto-generated method stub + config.setClockColor(context, picker.getColor(), InterfaceFragment.this); + mClockColor.setIcon(setCircleIconDrawable(picker.getColor())); + dialog.cancel(); + + } + }) + .setNegativeButton(R.string.dialog_cancel, new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + // TODO Auto-generated method stub + dialog.cancel(); + } + }); + builder.create().show(); + } + + + /* + * Custom Clock Size Dialog + */ + private void showClockSizeDialog() { + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setTitle(R.string.preference_clock_size_title); + final Context context = getActivity(); + final Config config = Config.getInstance(); + LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View v = inflater.inflate(R.layout.clock_size_dialog, null, false); + final TimeView time = (TimeView) v.findViewById(R.id.time); + final SeekBar sizeBar = (SeekBar) v.findViewById(R.id.size_bar); + sizeBar.setMax(200); + Typeface tf = Typeface.createFromAsset(getActivity().getAssets(), config.getClockFont()); + time.setTypeface(tf); + time.setTextSize((float)config.getClockSize()); + sizeBar.setProgress(config.getClockSize()); + sizeBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { + + @Override + public void onProgressChanged(SeekBar arg0, int progress, boolean arg2) { + // TODO Auto-generated method stub + time.setTextSize((float)progress); + + } + + @Override + public void onStartTrackingTouch(SeekBar arg0) { + // TODO Auto-generated method stub + + } + @Override + public void onStopTrackingTouch(SeekBar arg0) { + // TODO Auto-generated method stub + + } + + }); + + builder.setView(v) + .setPositiveButton(R.string.dialog_ok, new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog , int which) { + // TODO Auto-generated method stub + config.setClockSize(context, sizeBar.getProgress(), InterfaceFragment.this); + dialog.cancel(); + } + }) + .setNegativeButton(R.string.dialog_cancel, new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + // TODO Auto-generated method stub + dialog.cancel(); + } + }) + .create() + .show(); + + } + + + /* + * Create a circle icon drawable for Clock color preference + */ + public ColorStateDrawable setCircleIconDrawable(int color) { + Drawable[] colorDrawable = new Drawable[] { + getActivity().getResources().getDrawable(R.drawable.oval) }; + return new ColorStateDrawable(colorDrawable, color); + } + } diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/LockscreenFragment.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/LockscreenFragment.java index 24b04ced..2db7b7d5 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/LockscreenFragment.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/LockscreenFragment.java @@ -20,19 +20,37 @@ import android.app.ActionBar; import android.app.Activity; +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; +import android.graphics.drawable.Drawable; import android.os.Bundle; +import android.preference.Preference; +import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceFragment; +import android.view.LayoutInflater; +import android.view.View; import android.widget.Switch; +import com.achep.acdisplay.Config; import com.achep.acdisplay.R; +import com.achep.acdisplay.acdisplay.ColorStateDrawable; import com.achep.acdisplay.settings.enablers.LockscreenEnabler; +import com.larswerkman.holocolorpicker.ColorPicker; +import com.larswerkman.holocolorpicker.OpacityBar; +import com.larswerkman.holocolorpicker.SVBar; +import com.larswerkman.holocolorpicker.SaturationBar; +import com.larswerkman.holocolorpicker.ValueBar; /** * Created by Artem on 09.02.14. */ -public class LockscreenFragment extends PreferenceFragment { +public class LockscreenFragment extends PreferenceFragment implements Config.OnConfigChangedListener, OnPreferenceClickListener { private LockscreenEnabler mLockscreenEnabler; + private Preference mCircleColorPreference; + private Preference mIconColorPreference; + private Config mConfig; @Override public void onCreate(Bundle savedInstanceState) { @@ -41,17 +59,26 @@ public void onCreate(Bundle savedInstanceState) { Activity activity = getActivity(); ActionBar actionBar = activity.getActionBar(); + mConfig = Config.getInstance(); actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(R.layout.layout_ab_switch); Switch switch_ = (Switch) actionBar.getCustomView().findViewById(R.id.switch_); mLockscreenEnabler = new LockscreenEnabler(activity, switch_); + + mCircleColorPreference = (Preference) findPreference(mConfig.KEY_LOCK_CIRCLE_COLOR); + mIconColorPreference = (Preference) findPreference(mConfig.KEY_LOCK_ICON_COLOR); + + mCircleColorPreference.setOnPreferenceClickListener(this); + mIconColorPreference.setOnPreferenceClickListener(this); + } @Override public void onResume() { super.onResume(); mLockscreenEnabler.resume(); + restore(); } @Override @@ -59,4 +86,80 @@ public void onPause() { super.onPause(); mLockscreenEnabler.pause(); } + + @Override + public boolean onPreferenceClick(Preference arg0) { + // TODO Auto-generated method stub + showColorDialog(arg0.getKey()); + return false; + } + + private void restore() { + Config config = Config.getInstance(); + mCircleColorPreference.setIcon(setCircleIconDrawable(config.getLockCircleColor())); + mIconColorPreference.setIcon(setCircleIconDrawable(config.getLockIconColor())); + } + + private void showColorDialog(final String key) { + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setTitle(R.string.preference_clock_color_title); + final Context context = getActivity(); + final Config config = Config.getInstance(); + LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE); + View v = inflater.inflate(R.layout.color_selection_dialog_noalpha, null, false); + final ColorPicker picker = (ColorPicker) v.findViewById(R.id.picker); + SVBar svBar = (SVBar) v.findViewById(R.id.svbar); + SaturationBar saturationBar = (SaturationBar) v.findViewById(R.id.saturationbar); + ValueBar valueBar = (ValueBar) v.findViewById(R.id.valuebar); + picker.addSVBar(svBar); + picker.addSaturationBar(saturationBar); + picker.addValueBar(valueBar); + if(key.equals(Config.KEY_LOCK_CIRCLE_COLOR)) { + picker.setColor(config.getLockCircleColor()); + }else if (key.equals(Config.KEY_LOCK_ICON_COLOR)) { + picker.setColor(config.getLockIconColor()); + } + builder.setView(v); + + builder.setPositiveButton(R.string.dialog_ok, new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + // TODO Auto-generated method stub + if(key.equals(Config.KEY_LOCK_CIRCLE_COLOR)) { + config.setLockCircleColor(context, picker.getColor(), LockscreenFragment.this); + mCircleColorPreference.setIcon(setCircleIconDrawable(picker.getColor())); + }else if (key.equals(Config.KEY_LOCK_ICON_COLOR)) { + config.setLockIconColor(context, picker.getColor(), LockscreenFragment.this); + mIconColorPreference.setIcon(setCircleIconDrawable(picker.getColor())); + } + dialog.cancel(); + + } + }) + .setNegativeButton(R.string.dialog_cancel, new DialogInterface.OnClickListener() { + + @Override + public void onClick(DialogInterface dialog, int which) { + // TODO Auto-generated method stub + dialog.cancel(); + } + }); + builder.create().show(); + } + + /* + * Create a circle icon drawable for Clock color preference + */ + public ColorStateDrawable setCircleIconDrawable(int color) { + Drawable[] colorDrawable = new Drawable[] { + getActivity().getResources().getDrawable(R.drawable.oval) }; + return new ColorStateDrawable(colorDrawable, color); + } + + @Override + public void onConfigChanged(Config config, String key, Object value) { + // TODO Auto-generated method stub + + } } diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/NotificationFragment.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/NotificationFragment.java index a27ca79b..7475b016 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/NotificationFragment.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/settings/NotificationFragment.java @@ -35,6 +35,7 @@ public class NotificationFragment extends PreferenceFragment implements private CheckBoxPreference mLowPriorityPreference; private CheckBoxPreference mWakeUpOnPreference; + private CheckBoxPreference mPrivacyPreference; private boolean mBroadcasting; @@ -47,9 +48,13 @@ public void onCreate(Bundle savedInstanceState) { Config.KEY_NOTIFY_LOW_PRIORITY); mWakeUpOnPreference = (CheckBoxPreference) findPreference( Config.KEY_NOTIFY_WAKE_UP_ON); + + mPrivacyPreference = (CheckBoxPreference) findPreference( + Config.KEY_NOTIFY_PRIVACY); mLowPriorityPreference.setOnPreferenceChangeListener(this); mWakeUpOnPreference.setOnPreferenceChangeListener(this); + mPrivacyPreference.setOnPreferenceChangeListener(this); } @Override @@ -60,6 +65,7 @@ public void onResume() { updateLowPriorityPreference(config); updateWakeUpOnPreference(config); + updatePrivacyPreference(config); } @Override @@ -80,8 +86,9 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { config.setLowPriorityNotificationsAllowed(getActivity(), (Boolean) newValue, this); } else if (preference == mWakeUpOnPreference) { config.setWakeUpOnNotifyEnabled(getActivity(), (Boolean) newValue, this); - } else - return false; + } else if(preference == mPrivacyPreference) { + config.setNotificationPrivacy(getActivity(), (Boolean) newValue, this); + } else return false; return true; } @@ -94,6 +101,9 @@ public void onConfigChanged(Config config, String key, Object value) { case Config.KEY_NOTIFY_WAKE_UP_ON: updateLowPriorityPreference(config); break; + case Config.KEY_NOTIFY_PRIVACY: + updatePrivacyPreference(config); + break; } } @@ -104,6 +114,10 @@ private void updateLowPriorityPreference(Config config) { private void updateWakeUpOnPreference(Config config) { updatePreference(mWakeUpOnPreference, config.isNotifyWakingUp()); } + + private void updatePrivacyPreference(Config config) { + updatePreference(mPrivacyPreference, config.isPrivacyEnabled()); + } private void updatePreference(CheckBoxPreference preference, boolean checked) { mBroadcasting = true; diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/CircleView.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/CircleView.java index aaba2adc..b32f97bc 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/CircleView.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/CircleView.java @@ -22,7 +22,9 @@ import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.Color; +import android.graphics.ColorFilter; import android.graphics.Paint; +import android.graphics.PorterDuff.Mode; import android.graphics.drawable.Drawable; import android.os.Handler; import android.util.AttributeSet; @@ -52,6 +54,8 @@ public class CircleView extends View { private float mRadiusMax; private float mRadius; private Paint mPaint; + private int lockColor = Color.WHITE; + private int lockIconColor = Color.BLACK; private Drawable mDrawable; @@ -98,13 +102,14 @@ public void run() { mPaint = new Paint(); mPaint.setAntiAlias(true); - mPaint.setColor(Color.WHITE); + mPaint.setColor(lockColor); mPaint.setStrokeWidth(2); mRadiusTarget = res.getDimension(R.dimen.circle_radius_target); mRadiusDecreaseThreshold = res.getDimension(R.dimen.circle_radius_decrease_threshold); mDrawable = res.getDrawable(R.drawable.ic_unlock); + mDrawable.setColorFilter(lockIconColor, Mode.SRC_ATOP); mDrawable.setBounds(0, 0, mDrawable.getIntrinsicWidth(), mDrawable.getIntrinsicHeight()); @@ -247,5 +252,15 @@ public void setRadiusTarget(float radiusTarget) { public void setCallback(Callback callback) { mCallback = callback; } + + public void setLockCircleColor(int color) { + this.lockColor = color; + mPaint.setColor(lockColor); + } + + public void setLockIconColor(int color) { + this.lockIconColor = color; + mDrawable.setColorFilter(lockIconColor, Mode.SRC_ATOP); + } } diff --git a/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/NotificationWidget.java b/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/NotificationWidget.java index bf782371..9a80b084 100644 --- a/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/NotificationWidget.java +++ b/project/AcDisplay/src/main/java/com/achep/acdisplay/widgets/NotificationWidget.java @@ -240,4 +240,15 @@ public void onClick(View v) { } } } + + + //Hide message View based on user choice + + public void hideMessage(boolean hide) { + if(hide) { + mMessageTextView.setVisibility(View.GONE); + }else { + mMessageTextView.setVisibility(View.VISIBLE); + } + } } diff --git a/project/AcDisplay/src/main/project.properties b/project/AcDisplay/src/main/project.properties new file mode 100644 index 00000000..32f7d8d6 --- /dev/null +++ b/project/AcDisplay/src/main/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-19 +android.library.reference.1=../../../../../Documents/workspace/library-HoloColorPicker diff --git a/project/AcDisplay/src/main/res/drawable/oval.xml b/project/AcDisplay/src/main/res/drawable/oval.xml new file mode 100644 index 00000000..7beb880e --- /dev/null +++ b/project/AcDisplay/src/main/res/drawable/oval.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/layout/acdisplay_scene_clock.xml b/project/AcDisplay/src/main/res/layout/acdisplay_scene_clock.xml index 9dfdde89..0be78d1c 100644 --- a/project/AcDisplay/src/main/res/layout/acdisplay_scene_clock.xml +++ b/project/AcDisplay/src/main/res/layout/acdisplay_scene_clock.xml @@ -1,4 +1,5 @@ - +--> + android:orientation="vertical" > + + + + android:padding="2dp" /> + android:layout_height="wrap_content" /> \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/layout/clock_size_dialog.xml b/project/AcDisplay/src/main/res/layout/clock_size_dialog.xml new file mode 100644 index 00000000..eadca47f --- /dev/null +++ b/project/AcDisplay/src/main/res/layout/clock_size_dialog.xml @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/layout/color_selection_dialog.xml b/project/AcDisplay/src/main/res/layout/color_selection_dialog.xml new file mode 100644 index 00000000..5a4db973 --- /dev/null +++ b/project/AcDisplay/src/main/res/layout/color_selection_dialog.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/layout/color_selection_dialog_noalpha.xml b/project/AcDisplay/src/main/res/layout/color_selection_dialog_noalpha.xml new file mode 100644 index 00000000..6fd88fe9 --- /dev/null +++ b/project/AcDisplay/src/main/res/layout/color_selection_dialog_noalpha.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/layout/font_dialog_layout.xml b/project/AcDisplay/src/main/res/layout/font_dialog_layout.xml new file mode 100644 index 00000000..656ace02 --- /dev/null +++ b/project/AcDisplay/src/main/res/layout/font_dialog_layout.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/values/config_defaults.xml b/project/AcDisplay/src/main/res/values/config_defaults.xml index f2079bc4..1d022a96 100644 --- a/project/AcDisplay/src/main/res/values/config_defaults.xml +++ b/project/AcDisplay/src/main/res/values/config_defaults.xml @@ -34,11 +34,15 @@ false false true + + false + 48 10000 5000 60 300 3 + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/values/strings.xml b/project/AcDisplay/src/main/res/values/strings.xml index 673601ab..2ff5af4c 100644 --- a/project/AcDisplay/src/main/res/values/strings.xml +++ b/project/AcDisplay/src/main/res/values/strings.xml @@ -16,12 +16,11 @@ ~ along with this program; if not, write to the Free Software ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ~ MA 02110-1301, USA. - --> +--> AcDisplay AcDisplay is a new way of handling notifications in Android. It will let you know about new notifications by showing a minimal, beautiful screen, allowing you to open them directly from the lock screen. And if you want to see what\'s going on, you can simply take your phone out of your pocket to view all the latest notifications, in a similarly pleasing and minimalistic manner. - Helps AcDisplay to integrate deeper into Android. @@ -53,15 +52,25 @@ AcDisplay is enabled. AcDisplay is disabled. - @string/app_name This is needed to manage the screen timeout policy. AcDisplay has been turned off because it\'s missing admin rights. Access isn\'t granted! Notifications Turn screen off - The device admin settings could not be started. The package could not be uninstalled. + + + Clock Font + Change default clock Font + Clock size + Change default clock size + Select color + Change default clock color + Clock Background color + Change default clock Backgorund color + Ok + Cancel - + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/values/strings_settings.xml b/project/AcDisplay/src/main/res/values/strings_settings.xml index 90740413..2361ad32 100644 --- a/project/AcDisplay/src/main/res/values/strings_settings.xml +++ b/project/AcDisplay/src/main/res/values/strings_settings.xml @@ -16,7 +16,7 @@ ~ along with this program; if not, write to the Free Software ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ~ MA 02110-1301, USA. - --> +--> @@ -36,6 +36,11 @@ Use AcDisplay as the lockscreen. This is a beta feature and may be unstable. + Customizations + Lock Circle Color + Custom lock circle color + Lock Icon Color + Custom Lock icon color Active mode uses the device\'s sensors to wake your device up just when you need it. This works great for pulling your device from your pocket to get a quick glimpse at notifications. Active mode doesn\'t keep the CPU running, so you shouldn\'t experience increased battery use. @@ -48,6 +53,11 @@ Low-priority notifications All notifications are shown. Low-priority notifications such as those from Google Now aren\'t shown. + + + Notifications Privacy + Show only notification title + Show notification title and description Use wallpaper @@ -86,12 +96,16 @@ Inactive hours enabled - +%1$s - ]]> - + + +%1$s - ]]> + ]]> + After waking up or selecting a notification @@ -104,6 +118,7 @@ Icon settings Timebar settings System visual settings + Clock settings %1$s dpi. diff --git a/project/AcDisplay/src/main/res/xml/interface_settings.xml b/project/AcDisplay/src/main/res/xml/interface_settings.xml index d9879cb3..5200877c 100644 --- a/project/AcDisplay/src/main/res/xml/interface_settings.xml +++ b/project/AcDisplay/src/main/res/xml/interface_settings.xml @@ -1,4 +1,5 @@ - +--> - - + android:title="@string/settings_interface_title" > + - + android:title="@string/settings_use_wallpaper_title" /> + android:summaryOn="@string/settings_shadow_toggle_on" + android:title="@string/settings_shadow_toggle_title" /> - + android:key="dynamic_background_mode" + android:title="@string/settings_dynamic_background_title" /> - + - + android:title="@string/settings_status_battery_always_visible" /> + android:title="@string/settings_notify_circled_icon_title" /> + - + + + + + + + + + + android:title="@string/settings_mirrored_timeout_progress_bar_title" /> - + + android:title="@string/settings_immersive_mode_kitkat_title" /> + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/xml/lockscreen_settings.xml b/project/AcDisplay/src/main/res/xml/lockscreen_settings.xml index c3fed0d9..f117a8a0 100644 --- a/project/AcDisplay/src/main/res/xml/lockscreen_settings.xml +++ b/project/AcDisplay/src/main/res/xml/lockscreen_settings.xml @@ -31,5 +31,19 @@ android:enabled="false" android:title="@string/settings_placeholder_title" android:summary="@string/settings_placeholder_summary" /> + + + + + + + \ No newline at end of file diff --git a/project/AcDisplay/src/main/res/xml/notification_settings.xml b/project/AcDisplay/src/main/res/xml/notification_settings.xml index 200ea220..53b12f95 100644 --- a/project/AcDisplay/src/main/res/xml/notification_settings.xml +++ b/project/AcDisplay/src/main/res/xml/notification_settings.xml @@ -31,5 +31,12 @@ android:summaryOn="@string/settings_low_priority_notifications_on" android:summaryOff="@string/settings_low_priority_notifications_off" android:defaultValue="@bool/config_default_notify_low_priority"/> + + \ No newline at end of file