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
|
import android.os.Build
|
||||||
|
|
||||||
class AndroidPlatform : Platform {
|
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.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
package net.agorise.kee
|
||||||
|
|
||||||
class Greeting {
|
class Greeting {
|
||||||
private val platform = getPlatform()
|
private val platform = getPlatform()
|
||||||
|
|
||||||
fun greet(): String {
|
fun greet(): String {
|
||||||
return "Hello, ${platform.name}!"
|
return "Kee on ${platform.name}!"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
package net.agorise.kee
|
||||||
|
|
||||||
interface Platform {
|
interface Platform {
|
||||||
val name: String
|
val name: String
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
package net.agorise.kee
|
||||||
|
|
||||||
class JVMPlatform: Platform {
|
class JVMPlatform: Platform {
|
||||||
override val name: String = "Java ${System.getProperty("java.version")}"
|
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.runtime.Composable
|
||||||
import androidx.compose.ui.unit.DpSize
|
import androidx.compose.ui.unit.DpSize
|
|
@ -1,3 +1,4 @@
|
||||||
import androidx.compose.ui.window.ComposeUIViewController
|
import androidx.compose.ui.window.ComposeUIViewController
|
||||||
|
import net.agorise.kee.App
|
||||||
|
|
||||||
fun MainViewController() = ComposeUIViewController { App() }
|
fun MainViewController() = ComposeUIViewController { App() }
|
|
@ -1,3 +1,5 @@
|
||||||
|
package net.agorise.kee
|
||||||
|
|
||||||
import platform.UIKit.UIDevice
|
import platform.UIKit.UIDevice
|
||||||
|
|
||||||
class IOSPlatform: Platform {
|
class IOSPlatform: Platform {
|
Loading…
Reference in a new issue