-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
1,374 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ bin/ | |
### Mac OS ### | ||
.DS_Store | ||
.kotlin | ||
local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
plugins { | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.kotlin.android) | ||
alias(libs.plugins.kotlin.compose) | ||
alias(libs.plugins.jetbrains.compose) | ||
} | ||
|
||
android { | ||
namespace = "io.github.composegears.valkyrie.playground" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "io.github.composegears.valkyrie.playground" | ||
minSdk = 24 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = true | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.androidx.activity.compose) | ||
|
||
implementation(compose.runtime) | ||
implementation(compose.foundation) | ||
implementation(compose.material3) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.Playground" | ||
tools:targetApi="31"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:exported="true" | ||
android:label="@string/app_name" | ||
android:theme="@style/Theme.Playground"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
139 changes: 139 additions & 0 deletions
139
playground/app/src/main/kotlin/io/github/composegears/valkyrie/playground/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
package io.github.composegears.valkyrie.playground | ||
|
||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import androidx.activity.enableEdgeToEdge | ||
import androidx.compose.foundation.ExperimentalFoundationApi | ||
import androidx.compose.foundation.Image | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.systemBarsPadding | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.foundation.lazy.items | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.unit.dp | ||
import io.github.composegears.valkyrie.playground.icons.backing.BackingIcons | ||
import io.github.composegears.valkyrie.playground.icons.backing.colored.Videocam | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.Add | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.Appearance | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.Arrow | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.ArrowLeft | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.ArrowRight | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.Brightness | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.Car | ||
import io.github.composegears.valkyrie.playground.icons.backing.outlined.Changelog | ||
import io.github.composegears.valkyrie.playground.icons.lazy.LazyIcons | ||
import io.github.composegears.valkyrie.playground.icons.lazy.colored.Videocam | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.Add | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.Appearance | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.Arrow | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.ArrowLeft | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.ArrowRight | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.Brightness | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.Car | ||
import io.github.composegears.valkyrie.playground.icons.lazy.outlined.Changelog | ||
import io.github.composegears.valkyrie.playground.ui.theme.PlaygroundTheme | ||
|
||
class MainActivity : ComponentActivity() { | ||
|
||
@OptIn(ExperimentalFoundationApi::class) | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
enableEdgeToEdge() | ||
|
||
setContent { | ||
PlaygroundTheme { | ||
val iconsSet = remember { | ||
listOf( | ||
IconsSet( | ||
name = "Backing field", | ||
icons = listOf( | ||
BackingIcons.Colored.Videocam, | ||
BackingIcons.Outlined.Add, | ||
BackingIcons.Outlined.Appearance, | ||
BackingIcons.Outlined.Arrow, | ||
BackingIcons.Outlined.ArrowLeft, | ||
BackingIcons.Outlined.ArrowRight, | ||
BackingIcons.Outlined.Brightness, | ||
BackingIcons.Outlined.Car, | ||
BackingIcons.Outlined.Changelog, | ||
), | ||
), | ||
IconsSet( | ||
name = "Lazy field", | ||
icons = listOf( | ||
LazyIcons.Colored.Videocam, | ||
LazyIcons.Outlined.Add, | ||
LazyIcons.Outlined.Appearance, | ||
LazyIcons.Outlined.Arrow, | ||
LazyIcons.Outlined.ArrowLeft, | ||
LazyIcons.Outlined.ArrowRight, | ||
LazyIcons.Outlined.Brightness, | ||
LazyIcons.Outlined.Car, | ||
LazyIcons.Outlined.Changelog, | ||
), | ||
), | ||
) | ||
} | ||
Surface(modifier = Modifier.systemBarsPadding()) { | ||
LazyColumn( | ||
modifier = Modifier.fillMaxSize(), | ||
verticalArrangement = Arrangement.spacedBy(8.dp), | ||
) { | ||
iconsSet.forEach { (name, icons) -> | ||
stickyHeader { | ||
Row( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.background(MaterialTheme.colorScheme.primary) | ||
.padding(vertical = 4.dp), | ||
) { | ||
Text( | ||
modifier = Modifier.padding(horizontal = 8.dp), | ||
text = name, | ||
color = MaterialTheme.colorScheme.onPrimary, | ||
) | ||
} | ||
} | ||
items(icons) { icon -> | ||
Row( | ||
modifier = Modifier.padding( | ||
horizontal = 16.dp, | ||
vertical = 8.dp, | ||
), | ||
horizontalArrangement = Arrangement.spacedBy(8.dp), | ||
verticalAlignment = Alignment.CenterVertically, | ||
) { | ||
Image( | ||
imageVector = icon, | ||
contentDescription = null, | ||
) | ||
Text( | ||
text = icon.name, | ||
style = MaterialTheme.typography.bodySmall, | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
data class IconsSet( | ||
val name: String, | ||
val icons: List<ImageVector>, | ||
) |
7 changes: 7 additions & 0 deletions
7
.../src/main/kotlin/io/github/composegears/valkyrie/playground/icons/backing/BackingIcons.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.composegears.valkyrie.playground.icons.backing | ||
|
||
object BackingIcons { | ||
object Outlined | ||
|
||
object Colored | ||
} |
50 changes: 50 additions & 0 deletions
50
.../main/kotlin/io/github/composegears/valkyrie/playground/icons/backing/colored/Videocam.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package io.github.composegears.valkyrie.playground.icons.backing.colored | ||
|
||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.SolidColor | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.graphics.vector.path | ||
import androidx.compose.ui.unit.dp | ||
import io.github.composegears.valkyrie.playground.icons.backing.BackingIcons | ||
import kotlin.Suppress | ||
|
||
val BackingIcons.Colored.Videocam: ImageVector | ||
get() { | ||
if (_Videocam != null) { | ||
return _Videocam!! | ||
} | ||
_Videocam = ImageVector.Builder( | ||
name = "Colored.Videocam", | ||
defaultWidth = 24.dp, | ||
defaultHeight = 24.dp, | ||
viewportWidth = 24f, | ||
viewportHeight = 24f | ||
).apply { | ||
path(fill = SolidColor(Color(0xFF2CA5D1))) { | ||
moveTo(15f, 8f) | ||
verticalLineToRelative(8f) | ||
horizontalLineTo(5f) | ||
verticalLineTo(8f) | ||
horizontalLineToRelative(10f) | ||
moveToRelative(1f, -2f) | ||
horizontalLineTo(4f) | ||
curveToRelative(-0.55f, 0f, -1f, 0.45f, -1f, 1f) | ||
verticalLineToRelative(10f) | ||
curveToRelative(0f, 0.55f, 0.45f, 1f, 1f, 1f) | ||
horizontalLineToRelative(12f) | ||
curveToRelative(0.55f, 0f, 1f, -0.45f, 1f, -1f) | ||
verticalLineToRelative(-3.5f) | ||
lineToRelative(4f, 4f) | ||
verticalLineToRelative(-11f) | ||
lineToRelative(-4f, 4f) | ||
verticalLineTo(7f) | ||
curveToRelative(0f, -0.55f, -0.45f, -1f, -1f, -1f) | ||
close() | ||
} | ||
}.build() | ||
|
||
return _Videocam!! | ||
} | ||
|
||
@Suppress("ObjectPropertyName") | ||
private var _Videocam: ImageVector? = null |
45 changes: 45 additions & 0 deletions
45
.../src/main/kotlin/io/github/composegears/valkyrie/playground/icons/backing/outlined/Add.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package io.github.composegears.valkyrie.playground.icons.backing.outlined | ||
|
||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.SolidColor | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import androidx.compose.ui.graphics.vector.path | ||
import androidx.compose.ui.unit.dp | ||
import io.github.composegears.valkyrie.playground.icons.backing.BackingIcons | ||
import kotlin.Suppress | ||
|
||
val BackingIcons.Outlined.Add: ImageVector | ||
get() { | ||
if (_Add != null) { | ||
return _Add!! | ||
} | ||
_Add = ImageVector.Builder( | ||
name = "Outlined.Add", | ||
defaultWidth = 24.dp, | ||
defaultHeight = 24.dp, | ||
viewportWidth = 24f, | ||
viewportHeight = 24f | ||
).apply { | ||
path(fill = SolidColor(Color(0xFF232F34))) { | ||
moveTo(19f, 13f) | ||
lineTo(13f, 13f) | ||
lineTo(13f, 19f) | ||
lineTo(11f, 19f) | ||
lineTo(11f, 13f) | ||
lineTo(5f, 13f) | ||
lineTo(5f, 11f) | ||
lineTo(11f, 11f) | ||
lineTo(11f, 5f) | ||
lineTo(13f, 5f) | ||
lineTo(13f, 11f) | ||
lineTo(19f, 11f) | ||
lineTo(19f, 13f) | ||
close() | ||
} | ||
}.build() | ||
|
||
return _Add!! | ||
} | ||
|
||
@Suppress("ObjectPropertyName") | ||
private var _Add: ImageVector? = null |
Oops, something went wrong.