Re-arrange code structure
This commit is contained in:
parent
2dba2b6b53
commit
888d29e436
9 changed files with 21 additions and 9 deletions
|
@ -1,3 +1,5 @@
|
|||
package net.agorise.kee
|
||||
|
||||
import android.os.Build
|
||||
|
||||
class AndroidPlatform : Platform {
|
|
@ -1,4 +1,4 @@
|
|||
//package net.agorise.kee
|
||||
package net.agorise.kee
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package net.agorise.kee
|
||||
|
||||
class Greeting {
|
||||
private val platform = getPlatform()
|
||||
|
||||
fun greet(): String {
|
||||
return "Hello, ${platform.name}!"
|
||||
return "Kee on ${platform.name}!"
|
||||
}
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
package net.agorise.kee
|
||||
|
||||
interface Platform {
|
||||
val name: String
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
package net.agorise.kee
|
||||
|
||||
class JVMPlatform: Platform {
|
||||
override val name: String = "Java ${System.getProperty("java.version")}"
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
package net.agorise.kee
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.unit.DpSize
|
|
@ -1,3 +1,4 @@
|
|||
import androidx.compose.ui.window.ComposeUIViewController
|
||||
import net.agorise.kee.App
|
||||
|
||||
fun MainViewController() = ComposeUIViewController { App() }
|
|
@ -1,3 +1,5 @@
|
|||
package net.agorise.kee
|
||||
|
||||
import platform.UIKit.UIDevice
|
||||
|
||||
class IOSPlatform: Platform {
|
Loading…
Reference in a new issue