Scaffold a new Jetpack Compose screen following project patterns. Use when creating a new screen or view in the app.
Create a new Jetpack Compose screen following MateDroid's patterns.
Screens are located in app/src/main/java/com/matedroid/ui/screens/:
screens/
├── dashboard/
│ └── DashboardScreen.kt
├── drives/
│ ├── DrivesScreen.kt
│ └── DriveDetailScreen.kt
├── charges/
│ ├── ChargesScreen.kt
│ └── ChargeDetailScreen.kt
├── settings/
│ └── SettingsScreen.kt
└── {feature}/
└── {Feature}Screen.kt
Ask the user for:
Read an existing screen as reference (e.g., DashboardScreen.kt)
Create the new screen file following the pattern
package com.matedroid.ui.screens.{feature}
import androidx.compose.foundation.layout.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.matedroid.R
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun {Feature}Screen(
onNavigateBack: () -> Unit,
modifier: Modifier = Modifier
) {
Scaffold(
topBar = {
TopAppBar(
title = { Text(stringResource(R.string.{feature}_title)) },
navigationIcon = {
IconButton(onClick = onNavigateBack) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = stringResource(R.string.back)
)
}
}
)
}
) { paddingValues ->
Column(
modifier = modifier
.fillMaxSize()
.padding(paddingValues)
.padding(16.dp)
) {
// Screen content here
}
}
}
var isLoading by remember { mutableStateOf(true) }
if (isLoading) {
CircularProgressIndicator()
} else {
// Content
}
LaunchedEffect(Unit) {
// Fetch data from TeslamateApiService
}
val pullRefreshState = rememberPullToRefreshState()
PullToRefreshBox(state = pullRefreshState, isRefreshing = isRefreshing) {
// Content
}
Card(
modifier = Modifier.fillMaxWidth(),
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.surfaceVariant
)
) {
// Card content
}
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer