pull/32/head
parent
11c796456c
commit
794a27f079
@ -1,35 +0,0 @@ |
||||
package io.legado.app.lib.theme.view |
||||
|
||||
import android.content.Context |
||||
import android.util.AttributeSet |
||||
import android.view.View |
||||
import android.widget.Switch |
||||
import androidx.appcompat.widget.SwitchCompat |
||||
import io.legado.app.lib.theme.ATH |
||||
import io.legado.app.lib.theme.ThemeStore |
||||
|
||||
/** |
||||
* @author Aidan Follestad (afollestad) |
||||
*/ |
||||
class ATEStockSwitch : SwitchCompat { |
||||
|
||||
constructor(context: Context) : super(context) { |
||||
init(context, null) |
||||
} |
||||
|
||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { |
||||
init(context, attrs) |
||||
} |
||||
|
||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) { |
||||
init(context, attrs) |
||||
} |
||||
|
||||
private fun init(context: Context, attrs: AttributeSet?) { |
||||
ATH.setTint(this, ThemeStore.accentColor(context)) |
||||
} |
||||
|
||||
override fun isShown(): Boolean { |
||||
return parent != null && visibility == View.VISIBLE |
||||
} |
||||
} |
@ -1,4 +1,7 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<resources> |
||||
<item name="menu_edit" type="id"/> |
||||
<item name="menu_del" type="id"/> |
||||
<item name="menu_top" type="id"/> |
||||
|
||||
</resources> |
Loading…
Reference in new issue