ရိုးရိုးလေး ရှင်းပြမယ်
Responsive, Edge-to-Edge & Accessible UI ကို ရိုးရိုးလေးနားလည်မယ်
Responsive, Edge-to-Edge & Accessible UI ကို screen တစ်ခုအတွက် style syntax အဖြစ်သာမမြင်ဘဲ Yoga constraints, pixel density, font scaling, safe areas, keyboard, touch target, accessibility tree နဲ့ iOS/Android behavior ကွာခြားမှုတို့ပါသော native UI contract အဖြစ်နားလည်ပါ။
Problem → Why → Solution
ပြဿနာ — ဘာကြောင့် ဒီ concept လိုတာလဲ
Simulator တစ်ခု၏ happy path မှန်ရုံဖြင့် real devices, release builds, permissions, accessibility, offline နဲ့ lifecycle paths အားလုံးမှန်ပြီဟုယူဆခြင်း။
ဖြစ်လေ့ရှိတဲ့အမှား
Web CSS/DOM assumptions ကို React Native တွင်တိုက်ရိုက်သုံးခြင်း၊ subscription မပိတ်ခြင်း သို့ platform differences ကို condition အများကြီးဖြင့် component ထဲရောထည့်ခြင်း။
Core Concept — အလုပ်လုပ်ပုံကိုနားလည်မယ်
Responsive, Edge-to-Edge & Accessible UI ကို screen တစ်ခုအတွက် style syntax အဖြစ်သာမမြင်ဘဲ Yoga constraints, pixel density, font scaling, safe areas, keyboard, touch target, accessibility tree နဲ့ iOS/Android behavior ကွာခြားမှုတို့ပါသော native UI contract အဖြစ်နားလည်ပါ။
- Device behavior
- Measure + verify
- Smooth accessible UI
Responsive, Edge-to-Edge & Accessible UI ရဲ့ React နဲ့ native platform behavior ကိုရှင်းပြနိုင်ရန်
အဓိက Syntax / Pattern
import { Text, useWindowDimensions, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
export function Dashboard() {
const { width, fontScale } = useWindowDimensions();
const columns = width >= 720 ? 2 : 1;
return <SafeAreaView style={{ flex: 1 }}>
<View accessibilityRole="summary" style={{ flexDirection: columns === 2 ? 'row' : 'column' }}>
<Text maxFontSizeMultiplier={2}>Width {Math.round(width)} · font {fontScale}</Text>
</View>
</SafeAreaView>;
}Responsive, Edge-to-Edge & Accessible UI ကို screen တစ်ခုအတွက် style syntax အဖြစ်သာမမြင်ဘဲ Yoga constraints, pixel density, font scaling, safe areas, keyboard, touch target, accessibility tree နဲ့ iOS/Android behavior ကွာခြားမှုတို့ပါသော native UI contract အဖြစ်နားလည်ပါ။
Code ကို အဆင့်လိုက်ဖတ်မယ်
- Device behavior
import { Text, useWindowDimensions, View } from 'reac...Responsive, Edge-to-Edge & Accessible UI ကို screen တစ်ခုအတွက် style syntax အဖြစ်သာမမြင်ဘဲ Yoga constraints, pixel density, font scaling, safe areas, keyboard, touch target, accessibility tree နဲ့ iOS/Android behavior ကွာခြားမှုတို့ပါသော native UI contract အဖြစ်နားလည်ပါ။
- Measure + verify
return <SafeAreaView style={{ flex: 1 }}>Responsive, Edge-to-Edge & Accessible UI ကို screen တစ်ခုအတွက် style syntax အဖြစ်သာမမြင်ဘဲ Yoga constraints, pixel density, font scaling, safe areas, keyboard, touch target, accessibility tree နဲ့ iOS/Android behavior ကွာခြားမှုတို့ပါသော native UI contract အဖြစ်နားလည်ပါ။
- Smooth accessible UI
}Responsive, Edge-to-Edge & Accessible UI example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။
- Device behavior
- Measure + verify
- Smooth accessible UI
Success
Responsive, Edge-to-Edge & Accessible UI ရဲ့ React နဲ့ native platform behavior ကိုရှင်းပြနိုင်ရန်
Failure
Simulator တစ်ခု၏ happy path မှန်ရုံဖြင့် real devices, release builds, permissions, accessibility, offline နဲ့ lifecycle paths အားလုံးမှန်ပြီဟုယူဆခြင်း။
Responsive, Edge-to-Edge & Accessible UI ကို screen တစ်ခုအတွက် style syntax အဖြစ်သာမမြင်ဘဲ Yoga constraints, pixel density, font scaling, safe areas, keyboard, touch target, accessibility tree နဲ့ iOS/Android behavior ကွာခြားမှုတို့ပါသော native UI contract အဖြစ်နားလည်ပါ။
import { Text, useWindowDimensions, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
export function Dashboard() {
const { width, fontScale } = useWindowDimensions();
const columns = width >= 720 ? 2 : 1;
return <SafeAreaView style={{ flex: 1 }}>
<View accessibilityRole="summary" style={{ flexDirection: columns === 2 ? 'row' : 'column' }}>
<Text maxFontSizeMultiplier={2}>Width {Math.round(width)} · font {fontScale}</Text>
</View>
</SafeAreaView>;
}Layout က width, safe-area insets နဲ့ larger text အလိုက်ပြောင်းမည်။Real-world usage
လက်တွေ့ Project မှာ ဘယ်လိုသုံးမလဲ
Responsive, Edge-to-Edge & Accessible UI example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။
Mini challenge
ကိုယ်တိုင်တည်ဆောက်ကြည့်ပါ
Responsive, Edge-to-Edge & Accessible UI example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။
- Example ကို copy မလုပ်ဘဲ ပြန်ရေးပါ
- Normal input နဲ့ edge case စမ်းပါ
- Run မလုပ်မီ compiler/output result ကိုခန့်မှန်းပါ
import { Text, useWindowDimensions, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
export function Dashboard() {
const { width, fontScale } = useWindowDimensions();
const columns = width >= 720 ? 2 : 1;
return <SafeAreaView style={{ flex: 1 }}>
<View accessibilityRole="summary" style={{ flexDirection: columns === 2 ? 'row' : 'column' }}>
<Text maxFontSizeMultiplier={2}>Width {Math.round(width)} · font {fontScale}</Text>
</View>
</SafeAreaView>;
}ရလဒ်: Responsive, Edge-to-Edge & Accessible UI ရဲ့ React နဲ့ native platform behavior ကိုရှင်းပြနိုင်ရန်
အရိပ်အမြွက် ကြည့်ရန်
Responsive, Edge-to-Edge & Accessible UI example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။
Quick Quiz 1 / 3
Quick Quiz 2 / 3
Quick Quiz 3 / 3
ဒီသင်ခန်းစာမှာ မှတ်ထားရမယ့်အချက်များ
- Device behavior → Measure + verify → Smooth accessible UI
- Responsive, Edge-to-Edge & Accessible UI ကို screen တစ်ခုအတွက် style syntax အဖြစ်သာမမြင်ဘဲ Yoga constraints, pixel density, font scaling, safe areas, keyboard, touch target, accessibility tree နဲ့ iOS/Android behavior ကွာခြားမှုတို့ပါသော native UI contract အဖြစ်နားလည်ပါ။
- Simulator တစ်ခု၏ happy path မှန်ရုံဖြင့် real devices, release builds, permissions, accessibility, offline နဲ့ lifecycle paths အားလုံးမှန်ပြီဟုယူဆခြင်း။
- Responsive, Edge-to-Edge & Accessible UI example ကို Android/iOS, small/large screens, font scaling, dark mode, keyboard, screen reader, slow/offline network, denied permissions နဲ့ app background/foreground cases ဖြင့်စမ်းပါ။ DevTools, tests နဲ့ release build ကိုလိုအပ်သလိုအသုံးပြုပါ။
Accessibility — React Native