docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거

Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
Antigravity Agent
2026-07-05 00:33:48 +09:00
parent 1cfd3bbb56
commit 9148c358d0
6455 changed files with 1 additions and 86875 deletions
@@ -0,0 +1,203 @@
---
id: android-material3-you-theming
title: Material 3 — Dynamic Color / Theme / Type
category: Coding
status: draft
source_trust_level: B
verification_status: conceptual
created_at: 2026-05-09
updated_at: 2026-05-09
tags: [android, material, compose, theming, vibe-coding]
tech_stack: { language: "Kotlin / Compose", applicable_to: ["Android"] }
applied_in: []
aliases: [Material 3, Material You, dynamic color, MaterialTheme, color scheme]
---
# Material 3 / Material You
> Android 12+ wallpaper 색상 자동 (dynamic color). **MaterialTheme 안에서 Compose 컴포넌트가 자동**. Custom theme = 색 / type / shape 3축. 다크모드 지원.
## 📖 핵심 개념
- ColorScheme: Material 3 의 30+ 색 토큰 (primary / secondary / surface...).
- Dynamic color: 시스템 wallpaper 에서 추출 (Android 12+).
- Typography: 13 단계.
- Shape: small / medium / large.
## 💻 코드 패턴
### Material 3 setup
```kotlin
@Composable
fun AcmeTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
dynamicColor: Boolean = true,
content: @Composable () -> Unit,
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= 31 -> {
val ctx = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(ctx) else dynamicLightColorScheme(ctx)
}
darkTheme -> DarkColors
else -> LightColors
}
MaterialTheme(
colorScheme = colorScheme,
typography = AcmeTypography,
shapes = AcmeShapes,
content = content,
)
}
```
### 색 정의
```kotlin
private val LightColors = lightColorScheme(
primary = Color(0xFF6750A4),
onPrimary = Color.White,
primaryContainer = Color(0xFFEADDFF),
onPrimaryContainer = Color(0xFF21005D),
secondary = Color(0xFF625B71),
surface = Color(0xFFFFFBFE),
onSurface = Color(0xFF1C1B1F),
surfaceVariant = Color(0xFFE7E0EC),
onSurfaceVariant = Color(0xFF49454F),
error = Color(0xFFB3261E),
background = Color(0xFFFFFBFE),
)
private val DarkColors = darkColorScheme(...)
```
### Theme builder 추천
- Material Theme Builder (web): 색 1개 입력 → 모든 token 자동.
- Color tokens 코드 export.
### Typography
```kotlin
val AcmeTypography = Typography(
displayLarge = TextStyle(fontSize = 57.sp, lineHeight = 64.sp, letterSpacing = (-0.25).sp),
headlineLarge = TextStyle(fontSize = 32.sp, lineHeight = 40.sp),
titleLarge = TextStyle(fontSize = 22.sp, lineHeight = 28.sp),
bodyLarge = TextStyle(fontSize = 16.sp, lineHeight = 24.sp, letterSpacing = 0.5.sp),
labelLarge = TextStyle(fontSize = 14.sp, lineHeight = 20.sp, letterSpacing = 0.1.sp, fontWeight = FontWeight.Medium),
)
```
```kotlin
Text("Hello", style = MaterialTheme.typography.headlineLarge)
```
### Shape
```kotlin
val AcmeShapes = Shapes(
small = RoundedCornerShape(4.dp),
medium = RoundedCornerShape(8.dp),
large = RoundedCornerShape(16.dp),
)
```
### 컴포넌트 사용
```kotlin
Button(onClick = ...) { Text("Save") }
FilledTonalButton(...)
OutlinedButton(...)
TextButton(...)
Card { ... }
ElevatedCard { ... }
OutlinedCard { ... }
NavigationBar { NavigationBarItem(...) } // 하단
NavigationRail { ... } // 옆 (큰 화면)
NavigationDrawer { ... }
```
### Top app bar (Material 3)
```kotlin
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun MyScreen() {
val scrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior()
Scaffold(
topBar = {
CenterAlignedTopAppBar(
title = { Text("Acme") },
scrollBehavior = scrollBehavior,
colors = TopAppBarDefaults.centerAlignedTopAppBarColors(
scrolledContainerColor = MaterialTheme.colorScheme.surface,
),
)
},
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
) { padding ->
// ...
}
}
```
### Dark mode 따라가기
```kotlin
@Composable
fun MyApp() {
AcmeTheme(darkTheme = isSystemInDarkTheme()) {
// ...
}
}
```
```kotlin
// 강제 (사용자 설정)
AcmeTheme(darkTheme = userPreference == "dark")
```
### Edge-to-edge
```kotlin
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
setContent {
AcmeTheme {
Scaffold { padding -> ... }
}
}
}
```
### Status bar / navigation bar 색
```kotlin
val view = LocalView.current
SideEffect {
val window = (view.context as Activity).window
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
}
```
## 🤔 의사결정 기준
| 상황 | 추천 |
|---|---|
| 일반 앱 | Material 3 + dynamic color |
| Brand 강 일관성 | dynamic color off + 자체 색 |
| Cross-platform 디자인 | 자체 토큰 (Tailwind-like) |
| 게임 / 강 visual | 자체 — Material 적은 사용 |
| 쇼핑 / 컨텐츠 | Material 3 + brand color |
## ❌ 안티패턴
- **Color 직접 hard-code**: theme 안 써짐. token 사용.
- **Dark mode 무시**: 사용자 시스템 따라가야.
- **`Color.Black` / `Color.White` 매번**: contrast 깨짐. onSurface 등 token.
- **Theme 밖 컴포넌트**: 무 styling.
- **Typography 무시 — Text style 매번 직접**: 일관성 깨짐.
- **Edge-to-edge 안 함 + 새 device**: 검은 bar 생김.
- **시스템 status bar 색 같음**: 보임 어려움. controller.
## 🤖 LLM 활용 힌트
- Theme Builder 로 시작.
- ColorScheme + Typography + Shape 3종.
- enableEdgeToEdge + Scaffold.
## 🔗 관련 문서
- [[Android_Compose_State_Hoisting]]
- [[Frontend_Design_Tokens]]
- [[Frontend_Tailwind_Architecture]]