mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-08-04 17:32:00 +00:00
Clean up
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
package com.looker.droidify.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.widget.LinearLayout
|
||||
|
||||
class FragmentLinearLayout : LinearLayout {
|
||||
constructor(context: Context) : super(context)
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
init {
|
||||
fitsSystemWindows = true
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
var percentTranslationY: Float
|
||||
get() = height.let { if (it > 0) translationY / it else 0f }
|
||||
set(value) {
|
||||
translationY = value * height
|
||||
}
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package com.looker.droidify.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
|
||||
class Toolbar : Toolbar {
|
||||
constructor(context: Context) : super(context)
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
|
||||
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
private var initalized = false
|
||||
private var layoutDirectionChanged: Int? = null
|
||||
|
||||
init {
|
||||
initalized = true
|
||||
val layoutDirection = layoutDirectionChanged
|
||||
layoutDirectionChanged = null
|
||||
if (layoutDirection != null) onRtlPropertiesChanged(layoutDirection)
|
||||
}
|
||||
|
||||
override fun onRtlPropertiesChanged(layoutDirection: Int) {
|
||||
if (initalized) {
|
||||
super.onRtlPropertiesChanged(layoutDirection)
|
||||
} else {
|
||||
layoutDirectionChanged = layoutDirection
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user