Skip to content

Pack · 9 assets

Kotlin and Android starter

Kotlin and Android snippets, a runCatching helper, three Compose buttons, Compose login and settings screens, the /doc-comments prompt and the dark Harbor theme. All of it is free. Installing the pack switches the editor to Harbor.

Marketplace assets picked to work together. Open the pack in PocketCode to install them all at once.

If PocketCode is installed on your Android device, this opens the page in the app.

In this pack

Kotlin and Android snippetsFreeSnippets20 Kotlin snippets for Android apps: sealed UI state, a Hilt ViewModel with StateFlow, coroutines, Room entities and DAOs, and Compose state and lists. Type a prefix such as uistate or hiltvm in a .kt file.runCatching → Result<T, AppError>FreeSnippetsTiny extension that lifts thrown exceptions into a typed Result<T, AppError>, so callers can pattern-match instead of try/catch.Primary button (Compose)FreeButtonMaterial 3 button that vibrates briefly on tap. Set loading = true and it shows a spinner and ignores taps while a request runs.Outlined button (Compose)FreeButtonMaterial 3 outlined button for secondary actions such as Cancel. You can change the border and text colours, and add an optional leading icon.Delete button with confirmation (Compose)FreeButtonMaterial 3 delete button that asks first. Tapping it opens a dialog, and onConfirm only runs when the user taps Delete there. The question survives a rotation. If your delete can be undone, change the warning text.Login screen (Compose)FreePageEmail and password screen in Material 3. It checks both fields when you tap Sign in, shows the error your server returns, and can add Forgot password and fingerprint buttons. You call BiometricPrompt yourself.Settings screen (Compose)FreePageMaterial 3 settings screen with switches, a theme choice and a text size slider. It holds no state: you pass a SettingsState in and get the changed copy back. Each row is one touch target of 56 dp or more that TalkBack reads as a switch or radio button.Doc comments promptFreePromptPaste code after /doc-comments and get it back with KDoc, Javadoc, JSDoc or docstrings added. The code stays as it was, and any bugs the model notices are listed after it for you to fix.HarborFreeThemeDark navy theme with coral keywords, green strings, blue functions and sand-coloured types. It also adds a matching terminal theme (Settings > Terminal).