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
plugins { | |
id 'com.android.application' | |
id 'kotlin-android' | |
id 'kotlin-android-extensions' | |
id 'kotlin-kapt' | |
id 'dagger.hilt.android.plugin' | |
} | |
android { | |
compileSdkVersion 29 |
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
java.lang.Exception: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(getMainLooper()).idle() call. | |
at org.robolectric.android.internal.AndroidTestEnvironment.checkStateAfterTestFailure(AndroidTestEnvironment.java:502) | |
at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:581) | |
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:263) | |
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:266) | |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | |
at java.lang.Thread.run(Thread.java:748) |
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
java.lang.OutOfMemoryError: Metaspace | |
at java.base/java.lang.ClassLoader.defineClass1(Native Method) | |
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) | |
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) | |
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:514) | |
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:422) | |
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:416) | |
at java.base/java.security.AccessController.executePrivileged(AccessController.java:784) | |
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691) | |
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:415) |
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
function gen-cfd-icon(){ | |
ICON_DIR="src/main/resources/drawables/launcher_icons" | |
mkdir -p $ICON_DIR | |
ORIGINAL_ICON="$ICON_DIR/original.png" | |
cp "$1" "$ORIGINAL_ICON" | |
# Linux | |
echo "🌀 Creating icon for Linux..." | |
convert -resize x128 "$ORIGINAL_ICON" "$ICON_DIR/linux.png" |
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
import androidx.compose.animation.core.animateFloatAsState | |
import androidx.compose.animation.core.tween | |
import androidx.compose.desktop.Window | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.size | |
import androidx.compose.material.Button | |
import androidx.compose.material.Text | |
import androidx.compose.material.TextField |
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
@OptIn(ExperimentalMaterialNavigationApi::class) | |
@Composable | |
private fun AppNavigation() { | |
val navController = rememberNavController() | |
val bottomSheetNavigator = rememberBottomSheetNavigator() | |
navController.navigatorProvider += bottomSheetNavigator | |
ModalBottomSheetLayout( | |
bottomSheetNavigator = bottomSheetNavigator, | |
) { |
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
sealed class Screen(val route: String) { | |
object A : Screen("A") | |
object B : Screen("B") // bottomSheet | |
object C : Screen("C") // bottomSheet | |
object D : Screen("D") | |
} | |
@OptIn(ExperimentalMaterialNavigationApi::class) | |
@Composable |
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
@OptIn(ExperimentalMaterialNavigationApi::class) | |
@Composable | |
private fun AppNavigation() { | |
val navController = rememberNavController() | |
val bottomSheetNavigator = rememberBottomSheetNavigator() | |
navController.navigatorProvider += bottomSheetNavigator | |
ModalBottomSheetLayout( | |
bottomSheetNavigator = bottomSheetNavigator, | |
) { | |
NavHost(navController = navController, startDestination = Screen.A.route) { // Open 'A' |
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
import androidx.compose.desktop.SwingPanel | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.size | |
import androidx.compose.material.Button | |
import androidx.compose.material.Text | |
import androidx.compose.runtime.* | |
import androidx.compose.ui.ExperimentalComposeUiApi | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.graphics.Color |