android-kotlin
npx machina-cli add skill partme-ai/full-stack-skills/android-kotlin --openclawFiles (1)
SKILL.md
721 B
When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
How to use this skill
[待完善:根据具体工具添加使用指南]
Best Practices
[待完善:根据具体工具添加最佳实践]
Keywords
[待完善:根据具体工具添加关键词]
Source
git clone https://github.com/partme-ai/full-stack-skills/blob/main/skills/android-kotlin/SKILL.mdView on GitHub Overview
Provides comprehensive guidance for Android development with Kotlin, covering core components like activities, fragments, views, lifecycle, and navigation. It helps you build robust Android applications using Kotlin, with patterns and practices that improve maintainability and scalability.
How This Skill Works
The skill presents Kotlin-centric explanations and code examples that show how Android components fit together. It targets practical implementation—from creating activities and fragments to wiring navigation and handling lifecycle events—so you can translate concepts into working apps.
When to Use It
- Starting a new Android app project in Kotlin
- Implementing activities, fragments, and navigation
- Building and wiring UI with views in Kotlin
- Managing lifecycle and state across screens
- Applying Kotlin idioms and patterns to Android development
Quick Start
- Step 1: Define app goals and identify required components (activities, fragments, views)
- Step 2: Create a new Kotlin Android project and enable essential features like ViewBinding
- Step 3: Implement a basic flow with an activity hosting a fragment and add simple navigation
Best Practices
- Use Jetpack Navigation to manage screen flow and back stack
- Adopt lifecycle-aware components and ViewModel for state
- Prefer ViewBinding or DataBinding for type-safe UI access
- Modularize features and apply MVVM or similar architectures
- Write idiomatic Kotlin and use coroutines for asynchronous tasks
Example Use Cases
- Create a two-screen app with an Activity hosting a Fragment
- Implement a list screen using RecyclerView in Kotlin
- Navigate between screens using Jetpack Navigation
- Handle configuration changes with lifecycle-aware components
- Build a simple UI with views and ViewBinding in Kotlin
Frequently Asked Questions
Add this skill to your agents