Scaffold Activity
Overview
Section titled “Overview”Generate an Activity class with boilerplate code and an optional XML layout file.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectDir | string | Yes | — | Absolute path to the Android project root |
activityName | string | Yes | — | Activity class name (e.g., DetailActivity) |
packageName | string | Yes | — | Package name (e.g., com.example.myapp) |
module | string | No | app | Module name |
layout | boolean | No | true | Generate a corresponding XML layout file |
Examples
Section titled “Examples”Create a DetailActivity in my project with package com.example.myapp
Scaffold a SettingsActivity without a layout file
Related Tools
Section titled “Related Tools”- Scaffold Fragment — Generate fragments
- Scaffold Compose Screen — Generate Compose screens