diff --git a/androidApp/src/main/java/com/example/kmptemplate/MainActivity.kt b/androidApp/src/main/java/com/example/kmptemplate/MainActivity.kt deleted file mode 100644 index 3738810..0000000 --- a/androidApp/src/main/java/com/example/kmptemplate/MainActivity.kt +++ /dev/null @@ -1,52 +0,0 @@ -package com.example.kmptemplate - -import Greeting -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.appcompat.app.AppCompatActivity -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items -import androidx.compose.material3.* -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import androidx.compose.runtime.* -import com.example.kmptemplate.App -import com.example.kmptemplate.MainView - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContent { -// MyApplicationTheme { -// Surface( -// modifier = Modifier.fillMaxSize(), -// color = MaterialTheme.colorScheme.background -// ) { - MainView() - } -// } -// } - } -} - - - -//@Preview -//@Composable -//fun DefaultPreview() { -// MyApplicationTheme { -// GreetingView(listOf("Hello, Android!")) -// } -//} -@Preview -@Composable -fun comp2(){ - Text("hello") - App() -} \ No newline at end of file diff --git a/androidApp/src/main/java/com/example/kmptemplate/MyApplicationTheme.kt b/androidApp/src/main/java/com/example/kmptemplate/MyApplicationTheme.kt deleted file mode 100644 index 6bac766..0000000 --- a/androidApp/src/main/java/com/example/kmptemplate/MyApplicationTheme.kt +++ /dev/null @@ -1,55 +0,0 @@ -package com.example.kmptemplate - -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Shapes -import androidx.compose.material3.Typography -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.lightColorScheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp - -@Composable -fun MyApplicationTheme( - darkTheme: Boolean = isSystemInDarkTheme(), - content: @Composable () -> Unit -) { - val colors = if (darkTheme) { - darkColorScheme( - primary = Color(0xFFBB86FC), - secondary = Color(0xFF03DAC5), - tertiary = Color(0xFF3700B3) - ) - } else { - lightColorScheme( - primary = Color(0xFF6200EE), - secondary = Color(0xFF03DAC5), - tertiary = Color(0xFF3700B3) - ) - } - val typography = Typography( - bodyMedium = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp - ) - ) - val shapes = Shapes( - small = RoundedCornerShape(4.dp), - medium = RoundedCornerShape(4.dp), - large = RoundedCornerShape(0.dp) - ) - - MaterialTheme( - colorScheme = colors, - typography = typography, - shapes = shapes, - content = content - ) -} diff --git a/androidApp/src/main/java/com/example/kmptemplate/android/MainActivity.kt b/androidApp/src/main/java/com/example/kmptemplate/android/MainActivity.kt index 99bd1d9..da2ef56 100644 --- a/androidApp/src/main/java/com/example/kmptemplate/android/MainActivity.kt +++ b/androidApp/src/main/java/com/example/kmptemplate/android/MainActivity.kt @@ -1,21 +1,11 @@ package com.example.kmptemplate.android -import Greeting import android.os.Bundle -import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.appcompat.app.AppCompatActivity -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items -import androidx.compose.material3.* +import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import androidx.compose.runtime.* import com.example.kmptemplate.App import com.example.kmptemplate.MainView @@ -23,30 +13,14 @@ class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { -// MyApplicationTheme { -// Surface( -// modifier = Modifier.fillMaxSize(), -// color = MaterialTheme.colorScheme.background -// ) { - MainView() - } -// } -// } + MainView() + } } } - - -//@Preview -//@Composable -//fun DefaultPreview() { -// MyApplicationTheme { -// GreetingView(listOf("Hello, Android!")) -// } -//} @Preview @Composable -fun comp2(){ +fun comp2() { Text("hello") App() } \ No newline at end of file diff --git a/shared/src/commonMain/kotlin/com/example/kmptemplate/LineChartScreen.kt b/shared/src/commonMain/kotlin/com/example/kmptemplate/LineChartScreen.kt deleted file mode 100644 index e48b72c..0000000 --- a/shared/src/commonMain/kotlin/com/example/kmptemplate/LineChartScreen.kt +++ /dev/null @@ -1,99 +0,0 @@ -//package com.example.kmptemplate -// -//import androidx.compose.foundation.layout.height -//import androidx.compose.material3.MaterialTheme -//import androidx.compose.material3.Text -//import androidx.compose.runtime.Composable -//import androidx.compose.runtime.remember -//import androidx.compose.ui.Modifier -//import androidx.compose.ui.graphics.Color -//import androidx.compose.ui.text.style.TextAlign -//import androidx.compose.ui.unit.dp -//import androidx.compose.ui.unit.sp -//import com.netguru.multiplatform.charts.ChartAnimation -//import com.netguru.multiplatform.charts.application.ScrollableScreen -//import com.netguru.multiplatform.charts.application.SpacedColumn -//import com.netguru.multiplatform.charts.application.TitleText -//import com.netguru.multiplatform.charts.common.HorizontalDivider -//import com.netguru.multiplatform.charts.line.LineChart -//import com.netguru.multiplatform.charts.line.LineChartData -//import com.netguru.multiplatform.charts.line.LineChartPoint -//import com.netguru.multiplatform.charts.line.LineChartSeries -//import com.netguru.multiplatform.charts.line.LineChartWithLegend -//import com.soywiz.klock.DateTime -//import com.soywiz.klock.TimeSpan -// -//@Composable -//fun LineChartScreen() { -// -// val lineData = remember { -// LineChartData( -// series = (1..3).map { -// LineChartSeries( -// dataName = "data $it", -// lineColor = listOf( -// Color(0xFFFFCC00), -// Color(0xFF00D563), -// Color(0xFF32ADE6), -// )[it - 1], -// listOfPoints = (1..10).map { point -> -// LineChartPoint( -// x = DateTime.now().minus(TimeSpan(point * 24 * 60 * 60 * 1000.0)).unixMillisLong, -// y = (1..15).random().toFloat(), -// ) -// } -// ) -// }, -// ) -// } -// -// ScrollableScreen { -// SpacedColumn { -// -// TitleText(text = "Line chart") -// LineChart( -// lineChartData = lineData, -// modifier = Modifier -// .height(300.dp), -// xAxisLabel = { -// Text( -// fontSize = 12.sp, -// text = DateTime.fromUnix(it as Long).format("yyyy-MM-dd"), -// textAlign = TextAlign.Center -// ) -// }, -// overlayHeaderLabel = { -// Text( -// text = DateTime.fromUnix(it as Long).format("yyyy-MM-dd"), -// style = MaterialTheme.typography.overline -// ) -// }, -// animation = ChartAnimation.Sequenced() -// ) -// -// HorizontalDivider() -// -// TitleText(text = "Line chart with legend") -// LineChartWithLegend( -// modifier = Modifier -// .height(300.dp), -// lineChartData = lineData, -// maxVerticalLines = 5, -// xAxisLabel = { -// Text( -// fontSize = 12.sp, -// text = DateTime.fromUnix(it as Long).format("yyyy-MM-dd"), -// textAlign = TextAlign.Center -// ) -// }, -// overlayHeaderLabel = { -// Text( -// text = DateTime.fromUnix(it as Long).format("yyyy-MM-dd"), -// style = MaterialTheme.typography.overline -// ) -// }, -// animation = ChartAnimation.Sequenced() -// ) -// } -// } -//}