parent
c6c07234f8
commit
9deda74008
@ -0,0 +1,31 @@ |
||||
package io.legado.app.data.entities |
||||
|
||||
data class ExploreKind( |
||||
val title: String, |
||||
val url: String? = null, |
||||
val style: Style = Style() |
||||
) { |
||||
|
||||
data class Style( |
||||
val layout_flexGrow: Float = 0F, |
||||
val layout_flexShrink: Float = 1F, |
||||
val layout_alignSelf: String = "auto", |
||||
val layout_flexBasisPercent: Float = -1F, |
||||
val layout_wrapBefore: Boolean = false, |
||||
) { |
||||
|
||||
fun alignSelf(): Int { |
||||
return when (layout_alignSelf) { |
||||
"auto" -> -1 |
||||
"flex_start" -> 0 |
||||
"flex_end" -> 1 |
||||
"center" -> 2 |
||||
"baseline" -> 3 |
||||
"stretch" -> 4 |
||||
else -> -1 |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue