Skip to content

delasign/kotlin-android-starter-project

Repository files navigation

🚀 Quick start

  1. Install Android Studio

    Download and install Android Studio (link).

  2. Make sure Java is Installed

    In terminal run:

    java --version

    If Java is not installed, run the following lines:

    brew install java
    brew install oracle-jdk --cask

    If you need to install brew, go to this link to learn how.

    Once you're done, confirm that Java is installed by running the following line in terminal:

    java --version
  3. Install KLint This project uses ktlint and Spotless to maintain code consistency.

    For this to work you must have installed ktlint on your machine.

    brew install ktlint

    If you need to install brew, go to this link to learn how.

  4. That's it

    Open this project in Android Studio and get started.

💻 Keyboard Shortcuts

Select Many lines

Option + Shift + Click

Format

Format this file
Command + Option + L

Format this file, with options
Command + Option + Shift + L

Find

Find in File
Command + F

Find and Replace in Project
Command + Shift + F ->

Find and Replace

Find and Replace in File
Command + R

Find and Replace in Project
Command + Shift + R

🖇️ Resources

  1. All Keyboard Shortcuts 🔗
  2. Convert Colors to Android.Graphic.Color 🔗
  3. Convert Colors to ARGB 🔗

📚 Tutorials

Basics

  1. How to clean and rebuild an Android project in Android Studio 🔗
  2. How to sync an Android project with its Gradle files in Android Studio 🔗
  3. How to rename an Android Studio Project 🔗
  4. How to enable developer mode on an Android phone or tablet 🔗
  5. How to create a file, folder or resource in Android Studio 🔗
  6. How to add a custom font to an Android Studio project 🔗
  7. How to add and use custom colors in an Android project 🔗
  8. How to get the current Android System Language in Kotlin 🔗
  9. How to maintain state values when Android changes configuration 🔗
  10. How to implement a custom back button action in an Android Activity in Kotlin 🔗
  11. How to implement a custom back button action in a Composable in Kotlin 🔗
  12. How to change the Android app icon in Android Studio 🔗
  13. How to change an Android App's Splash Screen 🔗

For App Releases

  1. How to build a test APK in Android Studio 🔗
  2. How to build and find a release APK or Bundle in Android Studio 🔗
  3. How to build and test a release APK on a local device 🔗
  4. How to obfuscated the code of an Android app in Android Studio 🔗
  5. How to not obfuscate specific Android files or folder 🔗

Coordinators / Managers

  1. How to create and use a Singleton in Kotlin 🔗
  2. How to create a Styleguide in Android Studio and Kotlin 🔗
  3. How to create and use a Language Coordinator in Kotlin 🔗
  4. How to store and retrieve data using the Android DataStore 🔗

Jetpack Compose

  1. How to implement custom Text Styles using Kotlin and Jetpack Compose 🔗
  2. How to use light mode and dark mode in Android Studio and Kotlin 🔗
  3. How to use light mode and dark mode in Android Studio and Kotlin 🔗
  4. How to determine if an Android app is using light mode or dark mode 🔗
  5. How to create a composable that uses a ConstraintLayout in Kotlin 🔗
  6. How to implement an image in Android using Jetpack Compose and Kotlin 🔗
  7. How to use Material Symbols in Android, Jetpack Compose and Kotlin 🔗
  8. How to tint an icon or an image using Jetpack Compose and Kotlin 🔗
  9. How to create a custom button using Jetpack Compose and Kotlin 🔗
  10. How to load and display an image from a URL using Jetpack Compose and Kotlin 🔗
  11. How to create a composable that sizes to fit using Kotlin 🔗

Intents / Notifications

  1. How to broadcast an Intent in Kotlin 🔗
  2. How to listen for an intent using a Broadcast Receiver in an Activity 🔗
  3. How to listen for an intent using a Broadcast Receiver in a Composable 🔗

** Rotation / Orientation**

  1. How to make the Android Studio emulator update the screen on rotate 🔗
  2. How to determine the orientation of an Android device 🔗
  3. How to determine if an Android device is Landscape or Portrait 🔗
  4. How to lock an Android apps orientation in Android Studio 🔗

Data

  1. How to add a JSON file to an Android Studio project 🔗
  2. How to read a JSON file from the assets folder using Kotlin 🔗
  3. How to convert a JSON into usable data in Kotlin 🔗
  4. How to make an API request in an Android app using Kotlin 🔗

Camera

  1. How to setup a camera in an Android app using Jetpack Compose 🔗

Security

  1. How to manage what broadcasts Broadcast Receivers receive in Kotlin 🔗
  2. How to implement implicit and explicit Android Intents in Kotlin 🔗

Settings

  1. How to Soft Wrap Files in Android Studio 🔗
  2. How to change git version control automation settings 🔗

Gradle

  1. How to create a Gradle file in Android Studio 🔗
  2. How to run a Gradle Kotlin DSL build task in Android Studio 🔗
  3. How to run a task at any stage of an app Gradle build 🔗

Linting

  1. How to add ktlint and spotless to an Android project 🔗
  2. Spotless Gradle Guide 🔗
  3. How to run Spotless and ktlint in a pre-commit git hook 🔗
  4. How to add a pre-commit git hook script using a Gradle task 🔗

Errors

  1. How to fix the JAVA_HOME invalid directory error on a Mac 🔗
  2. How to fix the SDK location not found error in Android Studio 🔗
  3. How to fix installation did not succeed due to calling service package 🔗

🧹 Spotless and ktlint

Apply Spotless Check In Android Studio, open the terminal window and run the following line

./gradlew spotlessCheck

Apply Spotless Apply In Android Studio, open the terminal window and run the following line

./gradlew spotlessApply

Apply ktlint check In Android Studio, open the terminal window and run the following line

./gradlew ktlintCheck

Apply ktlint format In Android Studio, open the terminal window and run the following line

./gradlew ktlintFormat

Modify Spotless and ktlint Open the spotless.gradle to change the configuration using the Spotless Gradle Guide 🔗.

About

Android Kotlin Starter Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published