π [7νΈ] λμμΈ μμ€ν μ 리 – κΉλν UIλ‘ μ± μμ±λ λμ΄κΈ°
π [7νΈ] λμμΈ μμ€ν μ 리 – κΉλν UIλ‘ μ± μμ±λ λμ΄κΈ°
μ΄μ κΈ°λ₯μ κ±°μ μμ±λμ΅λλ€.
μ΄λ² νΈμμλ μ±μ μ 체μ μΈ λμμΈμ μ λνκ³ ,
μ¬μ©μμκ² μ λ’°κ°μ μ£Όλ κΉλν UIλ₯Ό ꡬμ±ν©λλ€.
π― μ΄λ² λͺ©ν
β
λ€ν¬λͺ¨λ λμ
β
λμμΈ μ»΄ν¬λνΈ λΆλ¦¬
β
κ³΅ν΅ μ€νμΌ μ μ© (μμ, ν°νΈ, κ°κ²©)
β
κΈ°λ³Έ μ± μμ΄μ½ / μ€νλμ μ€μ (Expo μ¬μ©μ νμ )
π¨ 1. λμμΈ ν ν° λ° μ€νμΌ ν΅μΌ
π src/constants/theme.js
export const colors = {
primary: '#007aff',
background: '#f9f9f9',
text: '#222',
card: '#fff',
border: '#ccc',
completed: '#d3ffd3',
darkBackground: '#000',
darkText: '#fff',
};
export const spacing = {
s: 8,
m: 16,
l: 24,
};
export const fonts = {
regular: 16,
large: 20,
header: 24,
};
π 2. μ»΄ν¬λνΈ μ€νμΌ ν΅μΌ
μ: π components/ChatMessage.js
import { colors, spacing, fonts } from '../constants/theme';
const styles = StyleSheet.create({
container: {
padding: spacing.s,
marginVertical: spacing.s / 2,
borderRadius: 10,
},
user: {
alignSelf: 'flex-end',
backgroundColor: colors.primary,
},
bot: {
alignSelf: 'flex-start',
backgroundColor: colors.card,
},
text: {
fontSize: fonts.regular,
color: colors.darkText,
},
});
π 3. λ€ν¬λͺ¨λ λμ
React Native κΈ°λ³Έ μ 곡 useColorScheme() μ¬μ©:
import { useColorScheme } from 'react-native';
const scheme = useColorScheme();
const isDark = scheme === 'dark';
const bgColor = isDark ? colors.darkBackground : colors.background;
μ μ© μ:
<View style={{ flex: 1, backgroundColor: bgColor }}>
{/* μ½ν
μΈ */}
</View>
πΌ 4. μ± μμ΄μ½ & μ€νλμ (Expo μ¬μ© μ)
1) app.json μ€μ
{
"expo": {
"name": "AI Todo",
"slug": "ai-todo",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
...
}
}
2) μ΄λ―Έμ§ μΆκ°
assets/
βββ icon.png
βββ splash.png
β μ΄λ² κΈ μμ½
λμμΈ μμ μ μ© μ¬λΆ
κ³΅ν΅ μ€νμΌ νμΌ | β |
λ€ν¬λͺ¨λ λμ | β |
μ»΄ν¬λνΈλ³ μ 리 | β |
μ± μμ΄μ½ μ€μ | β (Expo) |
π λ€μ κΈ μκ³
λ§μ§λ§ κΈμμλ μ±μ Android/iOSμ λ°°ν¬νκ±°λ
APK νμΌλ‘ λ΄λ³΄λ΄κ³ , ν¬νΈν΄λ¦¬μ€ λλ λΈλ‘κ·Έμ
μ€μ νλ‘μ νΈλ‘ μ 리νλ λ°©λ²μ μλ΄ν©λλ€.
react native λ€ν¬λͺ¨λ μ μ©,react native λμμΈ μμ€ν ,react native κ³΅ν΅ μ€νμΌ,expo splash μ€μ ,expo μ± μμ΄μ½ μ€μ ,react native λμμΈ κ°μ΄λ,react native darkmode μ μ©λ²,react native ui μμ ,react native chat μ€νμΌλ§,react native todo λμμΈ