Removed unwanted params

This commit is contained in:
h4h13 2019-05-17 09:51:22 +05:30
parent a092ad9ac7
commit ee59be16c4
17 changed files with 32 additions and 71 deletions

View file

@ -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"

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/anim_duration_medium">
<translate
android:fromYDelta="10%p"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toYDelta="0" />
<alpha
android:fromAlpha="0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toAlpha="1" />
</set>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:propertyName="translationY"
android:valueType="floatType"
android:valueFrom="0"
android:valueTo="1280"
android:duration="@android:integer/config_mediumAnimTime"/>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
</set>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:propertyName="translationY"
android:valueType="floatType"
android:valueFrom="1280"
android:valueTo="0"
android:duration="@android:integer/config_mediumAnimTime"/>

View file

@ -4,7 +4,6 @@
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
<solid
android:color="?attr/cardBackgroundColor" />
<solid android:color="?attr/cardBackgroundColor" />
</shape>

View file

@ -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))
}
}

View file

@ -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))
}
}

View file

@ -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))
}
}

View file

@ -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))
}
}

View file

@ -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))
}
}

View file

@ -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

View file

@ -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