mirror of
https://github.com/Michatec/michas-droid.git
synced 2026-05-31 02:12:42 +02:00
- Renamed the package Name
- Update some features - Fix some bugs
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.michatec.store.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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user