This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 git-ls { | |
# tree respecting gitignore | |
local ignored=$(git ls-files -ci --others --directory --exclude-standard) | |
local ignored_filter=$(echo "$ignored" \ | |
| egrep -v "^#.*$|^[[:space:]]*$" \ | |
| sed 's~^/~~' \ | |
| sed 's~/$~~' \ | |
| tr "\\n" "|") | |
tree --prune -I ".git|${ignored_filter: : -1}" "$@" | |
} |