From ee59be16c48c748e1e8caae8a9316d809f795c2d Mon Sep 17 00:00:00 2001 From: h4h13 Date: Fri, 17 May 2019 09:51:22 +0530 Subject: [PATCH] Removed unwanted params --- app/build.gradle | 2 +- .../anim/item_animation_slide_from_bottom.xml | 15 --------------- app/src/main/res/animator/slide_down.xml | 9 --------- app/src/main/res/animator/slide_in_left.xml | 4 ---- app/src/main/res/animator/slide_up.xml | 9 --------- .../res/drawable/bg_circular_top_corners.xml | 3 +-- .../common/views/ATEAccentTextView.kt | 8 ++++---- .../appthemehelper/common/views/ATECheckBox.kt | 8 ++++---- .../common/views/ATEPrimaryTextView.kt | 9 ++++----- .../common/views/ATERadioButton.kt | 10 +++++----- .../appthemehelper/common/views/ATESeekBar.kt | 10 +++++----- .../appthemehelper/common/views/ATESwitch.kt | 8 ++++---- .../name/monkey/appthemehelper/util/ColorUtil.kt | 8 ++++---- .../src/main/res/font/circular.xml | 0 .../src/main/res/font/circular_std_black.otf | Bin .../src/main/res/font/circular_std_book.otf | Bin .../src/main/res/font/circular_std_medium.otf | Bin 17 files changed, 32 insertions(+), 71 deletions(-) delete mode 100644 app/src/main/res/anim/item_animation_slide_from_bottom.xml delete mode 100644 app/src/main/res/animator/slide_down.xml delete mode 100644 app/src/main/res/animator/slide_in_left.xml delete mode 100644 app/src/main/res/animator/slide_up.xml rename {app => appthemehelper}/src/main/res/font/circular.xml (100%) rename {app => appthemehelper}/src/main/res/font/circular_std_black.otf (100%) rename {app => appthemehelper}/src/main/res/font/circular_std_book.otf (100%) rename {app => appthemehelper}/src/main/res/font/circular_std_medium.otf (100%) diff --git a/app/build.gradle b/app/build.gradle index 65b80979..2924be6e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -119,7 +119,7 @@ static def getDate() { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.fragment:fragment:1.1.0-alpha08' + implementation 'androidx.fragment:fragment:1.1.0-alpha09' implementation 'androidx.appcompat:appcompat:1.1.0-alpha05' implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05' implementation "androidx.gridlayout:gridlayout:1.0.0" diff --git a/app/src/main/res/anim/item_animation_slide_from_bottom.xml b/app/src/main/res/anim/item_animation_slide_from_bottom.xml deleted file mode 100644 index 4fe1e244..00000000 --- a/app/src/main/res/anim/item_animation_slide_from_bottom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/animator/slide_down.xml b/app/src/main/res/animator/slide_down.xml deleted file mode 100644 index 14d15cb5..00000000 --- a/app/src/main/res/animator/slide_down.xml +++ /dev/null @@ -1,9 +0,0 @@ - - \ No newline at end of file diff --git a/app/src/main/res/animator/slide_in_left.xml b/app/src/main/res/animator/slide_in_left.xml deleted file mode 100644 index 751d2da5..00000000 --- a/app/src/main/res/animator/slide_in_left.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/animator/slide_up.xml b/app/src/main/res/animator/slide_up.xml deleted file mode 100644 index bc065bf2..00000000 --- a/app/src/main/res/animator/slide_up.xml +++ /dev/null @@ -1,9 +0,0 @@ - - \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_circular_top_corners.xml b/app/src/main/res/drawable/bg_circular_top_corners.xml index d01965cb..3fe25d2f 100644 --- a/app/src/main/res/drawable/bg_circular_top_corners.xml +++ b/app/src/main/res/drawable/bg_circular_top_corners.xml @@ -4,7 +4,6 @@ - + \ No newline at end of file diff --git a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEAccentTextView.kt b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEAccentTextView.kt index c15d4fb5..142c6962 100644 --- a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEAccentTextView.kt +++ b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEAccentTextView.kt @@ -22,18 +22,18 @@ import code.name.monkey.appthemehelper.ThemeStore class ATEAccentTextView : AppCompatTextView { constructor(context: Context) : super(context) { - init(context, null) + init(context) } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { - init(context, attrs) + init(context) } constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { - init(context, attrs) + init(context) } - private fun init(context: Context, attrs: AttributeSet?) { + private fun init(context: Context) { setTextColor(ThemeStore.accentColor(context)) } } diff --git a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATECheckBox.kt b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATECheckBox.kt index 33b07cb4..f72fddba 100755 --- a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATECheckBox.kt +++ b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATECheckBox.kt @@ -14,18 +14,18 @@ import code.name.monkey.appthemehelper.ThemeStore class ATECheckBox : AppCompatCheckBox { constructor(context: Context) : super(context) { - init(context, null) + init(context) } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { - init(context, attrs) + init(context) } constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { - init(context, attrs) + init(context) } - private fun init(context: Context, attrs: AttributeSet?) { + private fun init(context: Context) { ATH.setTint(this, ThemeStore.accentColor(context)) } } diff --git a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEPrimaryTextView.kt b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEPrimaryTextView.kt index 5508d2ff..0dded8dc 100755 --- a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEPrimaryTextView.kt +++ b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATEPrimaryTextView.kt @@ -3,7 +3,6 @@ package code.name.monkey.appthemehelper.common.views import android.content.Context import androidx.appcompat.widget.AppCompatTextView -import android.text.Layout import android.util.AttributeSet import code.name.monkey.appthemehelper.ThemeStore @@ -15,18 +14,18 @@ import code.name.monkey.appthemehelper.ThemeStore class ATEPrimaryTextView : AppCompatTextView { constructor(context: Context) : super(context) { - init(context, null) + init(context) } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { - init(context, attrs) + init(context) } constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { - init(context, attrs) + init(context) } - private fun init(context: Context, attrs: AttributeSet?) { + private fun init(context: Context) { setTextColor(ThemeStore.textColorPrimary(context)) } } diff --git a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATERadioButton.kt b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATERadioButton.kt index 787247f6..f5df00a9 100755 --- a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATERadioButton.kt +++ b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATERadioButton.kt @@ -15,23 +15,23 @@ import code.name.monkey.appthemehelper.ThemeStore class ATERadioButton : RadioButton { constructor(context: Context) : super(context) { - init(context, null) + init(context) } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { - init(context, attrs) + init(context) } constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { - init(context, attrs) + init(context) } @TargetApi(Build.VERSION_CODES.LOLLIPOP) constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) { - init(context, attrs) + init(context) } - private fun init(context: Context, attrs: AttributeSet?) { + private fun init(context: Context) { ATH.setTint(this, ThemeStore.accentColor(context)) } } diff --git a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESeekBar.kt b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESeekBar.kt index d0ef3030..59890651 100755 --- a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESeekBar.kt +++ b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESeekBar.kt @@ -16,23 +16,23 @@ import code.name.monkey.appthemehelper.ThemeStore class ATESeekBar : SeekBar { constructor(context: Context) : super(context) { - init(context, null) + init(context) } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { - init(context, attrs) + init(context) } constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { - init(context, attrs) + init(context) } @TargetApi(Build.VERSION_CODES.LOLLIPOP) constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) { - init(context, attrs) + init(context) } - private fun init(context: Context, attrs: AttributeSet?) { + private fun init(context: Context) { ATH.setTint(this, ThemeStore.accentColor(context)) } } diff --git a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESwitch.kt b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESwitch.kt index f35ba546..497a32cc 100755 --- a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESwitch.kt +++ b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/common/views/ATESwitch.kt @@ -15,18 +15,18 @@ import code.name.monkey.appthemehelper.ThemeStore class ATESwitch : SwitchCompat { constructor(context: Context) : super(context) { - init(context, null) + init(context) } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { - init(context, attrs) + init(context) } constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { - init(context, attrs) + init(context) } - private fun init(context: Context, attrs: AttributeSet?) { + private fun init(context: Context) { setThumbResource(R.drawable.toggle_switch) setTrackResource(R.drawable.ate_track) background = null diff --git a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/util/ColorUtil.kt b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/util/ColorUtil.kt index fe9858e1..010c7a2c 100755 --- a/appthemehelper/src/main/java/code/name/monkey/appthemehelper/util/ColorUtil.kt +++ b/appthemehelper/src/main/java/code/name/monkey/appthemehelper/util/ColorUtil.kt @@ -117,15 +117,15 @@ object ColorUtil { @ColorInt fun getReadableText(@ColorInt textColor: Int, @ColorInt backgroundColor: Int, difference: Int): Int { - var textColor = textColor + var textColorFinal = textColor val isLight = isColorLight(backgroundColor) var i = 0 - while (getDifference(textColor, backgroundColor) < difference && i < 100) { - textColor = getMixedColor(textColor, if (isLight) Color.BLACK else Color.WHITE) + while (getDifference(textColorFinal, backgroundColor) < difference && i < 100) { + textColorFinal = getMixedColor(textColorFinal, if (isLight) Color.BLACK else Color.WHITE) i++ } - return textColor + return textColorFinal } @ColorInt diff --git a/app/src/main/res/font/circular.xml b/appthemehelper/src/main/res/font/circular.xml similarity index 100% rename from app/src/main/res/font/circular.xml rename to appthemehelper/src/main/res/font/circular.xml diff --git a/app/src/main/res/font/circular_std_black.otf b/appthemehelper/src/main/res/font/circular_std_black.otf similarity index 100% rename from app/src/main/res/font/circular_std_black.otf rename to appthemehelper/src/main/res/font/circular_std_black.otf diff --git a/app/src/main/res/font/circular_std_book.otf b/appthemehelper/src/main/res/font/circular_std_book.otf similarity index 100% rename from app/src/main/res/font/circular_std_book.otf rename to appthemehelper/src/main/res/font/circular_std_book.otf diff --git a/app/src/main/res/font/circular_std_medium.otf b/appthemehelper/src/main/res/font/circular_std_medium.otf similarity index 100% rename from app/src/main/res/font/circular_std_medium.otf rename to appthemehelper/src/main/res/font/circular_std_medium.otf