EAS-202310715274-DimasHendr.../MOCKUP_IMPLEMENTATION.md
2026-01-14 21:13:18 +07:00

11 KiB

📱 UI Mockup Implementation Guide

🎯 Objective

Implementasikan tampilan app sesuai dengan mockup yang diberikan, dengan 4 halaman utama:

  1. Login Screen
  2. Menu Absensi
  3. Absen Kehadiran
  4. Absensi Berhasil

📸 Mockup Reference

┌─────────────────────────┬─────────────────────────┬─────────────────────────┬─────────────────────────┐
│   LOGIN SCREEN          │   MENU ABSENSI          │  ABSEN KEHADIRAN        │  ABSENSI BERHASIL!      │
├─────────────────────────┼─────────────────────────┼─────────────────────────┼─────────────────────────┤
│                         │                         │                         │                         │
│        🎓               │    Menu Absensi  X      │   ← Absen Kehadiran     │    ✅ Absensi Berhasil! │
│                         │                         │                         │                         │
│  Absensi Akademik       │   Selamat Datang, Budi! │  Cek Lokasi: Dalam      │    ✓ Lokasi Tervalidasi │
│                         │                         │    Area Absensi ✓       │    ✓ Foto Terekam      │
│  Universitas Bhakti     │   ┌─────────────────┐   │                         │                         │
│  Rajayal                │   │ 📅 Jadwal Kuliah│   │    [Lat: -6.8955]       │    Waktu: 09:15 WIB     │
│                         │   └─────────────────┘   │    [Lon: 107.6105]      │    Berhasil tercatat!   │
│  [Email Field]          │                         │    [Jarak: 85.2m]       │                         │
│  [Password Field]       │   ┌─────────────────┐   │                         │    [LIHAT RIWAYAT]      │
│                         │   │ 📋 Riwayat      │   │  [Perbarui Lokasi]      │                         │
│                         │   │    Absensi      │   │                         │                         │
│  [LOGIN Button]         │   └─────────────────┘   │  Mata Kuliah            │                         │
│                         │                         │  [Input Field]          │                         │
│                         │  [MULAI ABSENSI Button] │                         │                         │
│                         │                         │  Ambil Foto Selfie ✓    │                         │
│                         │                         │  [AMBIL FOTO Button]    │                         │
│                         │                         │                         │                         │
│                         │                         │  [KIRIM ABSENSI Button] │                         │
│                         │                         │                         │                         │
└─────────────────────────┴─────────────────────────┴─────────────────────────┴─────────────────────────┘

Implementation Status

Screen 1: Login Screen

File: LoginScreen.kt

Features Implemented:

  • Green background (#2E7D32)
  • Graduation cap emoji (🎓) as header
  • Email input field with envelope icon
  • Password input field with lock icon
  • White LOGIN button with green text
  • "Forgot Password?" link
  • Error message display

Design Specifications:

Background Color: #2E7D32 (Green)
Button Color: White (#FFFFFF)
Button Text Color: #2E7D32
Input Border Color: White with alpha 0.5
Text Color: White
Font: Material Typography

Screen 2: Menu Absensi NEW

File: MenuScreen.kt

Features Implemented:

  • Green top bar with white text
  • Logout (X) button in top-right
  • Greeting message "Selamat Datang, Budi!"
  • Jadwal Kuliah menu card
  • Riwayat Absensi menu card
  • Main button "MULAI ABSENSI" (white with green text)
  • Menu cards with icons and descriptions
  • Card styling with border radius

Design Specifications:

TopBar Color: #2E7D32
Card Background: White with 10% alpha (#2E7D32)
Button Color: White
Button Text Color: #2E7D32
Card Border Radius: 12dp
Icon Size: 32sp emoji style

Screen 3: Absen Kehadiran UPDATED

File: AttendanceScreen.kt

Features Implemented:

  • Green top bar with back button and settings
  • Title "Absen Kehadiran"
  • User info card (nama, NPM)
  • Location section with status indicator (✓/✗)
  • Location coordinates display
  • Update location button
  • Mata Kuliah input field (NEW)
  • Photo capture section with status
  • Take photo button
  • Submit button "KIRIM ABSENSI" (green)
  • Card styling with light green background
  • Validation before submit

Design Specifications:

TopBar Color: #2E7D32
Card Background: #2E7D32 with 10% alpha
Button Color: #2E7D32
Button Text Color: White
Input Field Height: 40dp (compact)
Card Border Radius: 8dp
Icon Sizes: 20-24dp

Screen 4: Absensi Berhasil! NEW

File: SuccessScreen.kt

Features Implemented:

  • Green background
  • Large checkmark icon in white circle
  • Title "Absensi Berhasil!"
  • Success indicators:
    • ✓ Lokasi Tervalidasi
    • ✓ Foto Terekam
  • Time display (09:15 WIB)
  • Status text "Berhasil tercatat!"
  • "LIHAT RIWAYAT" button (white with green text)

Design Specifications:

Background Color: #2E7D32
Icon Circle Color: White
Checkmark Color: #4CAF50 (Success Green)
Card Background: White with 10% alpha
Button Color: White
Button Text Color: #2E7D32
Circle Size: 120dp
Checkmark Size: 80dp

🎨 Color Palette

Color Name Hex Code Usage
Primary Green #2E7D32 Top bar, buttons, backgrounds
Success Green #4CAF50 Success indicators, valid status
Error Red #f44336 Error messages, invalid status
White #FFFFFF Text on green, button backgrounds
Light Green #2E7D32 (10% alpha) Card backgrounds

📐 Component Dimensions

Buttons

  • Height: 44-56dp
  • Border Radius: 8dp
  • Padding: 16dp horizontal

Cards

  • Border Radius: 8-12dp
  • Padding: 12-16dp
  • Spacing: 12dp between cards

Icons

  • Standard Size: 20-24dp
  • Large Size: 32dp
  • Top Bar Icons: 24dp

Input Fields

  • Height: 40dp (compact), 56dp (standard)
  • Border Radius: 8dp (inherited from TextField)

🔄 Navigation Flow

Login Screen
    ↓ (onLoginSuccess)
Menu Screen
    ↓ (onStartAttendance)
Attendance Screen
    ↓ (onNavigateToHistory / submit success)
Success Screen
    ↓ (onBackToMenu)
Back to Menu Screen
    ↓ (onViewHistory)
History Screen (existing)

🎯 Key UI Principles

1. Visual Hierarchy

  • Top bar with primary color for identification
  • Main content area with cards
  • Action buttons at bottom

2. Color Consistency

  • All primary actions in green (#2E7D32)
  • All secondary elements in white
  • Error states in red
  • Success states in green (#4CAF50)

3. Spacing & Sizing

  • Consistent 12-16dp spacing
  • Rounded corners (8-12dp)
  • Compact cards (no unnecessary whitespace)
  • Icon + Text alignment for better readability

4. User Feedback

  • Clear status indicators (✓/✗)
  • Loading states with spinner
  • Error messages with explanations
  • Success messages with confirmations

📋 Checklist - Implementation Complete

  • Login Screen with Email/Password
  • Menu Screen with options
  • Attendance Screen with:
    • Location validation
    • Photo capture
    • Mata Kuliah field (NEW)
    • Submit functionality
  • Success Screen with confirmation
  • Navigation between screens
  • Green color scheme (#2E7D32)
  • Rounded corners styling
  • Icon + Text combinations
  • Button styling (white/green)
  • Card backgrounds with alpha
  • Responsive layout

🚀 How to Test

Test Login

  1. Open app
  2. Enter Email: test@student.com
  3. Enter Password: password123
  4. Click LOGIN Expected: Navigate to Menu Screen

Test Menu

  1. From Menu Screen
  2. Click "MULAI ABSENSI" Expected: Navigate to Attendance Screen

Test Attendance

  1. From Attendance Screen
  2. Click "Perbarui Lokasi" (use mock location in debug menu)
  3. Click "AMBIL FOTO"
  4. Enter Mata Kuliah: "Pemrograman Mobile"
  5. Click "KIRIM ABSENSI" Expected: Navigate to Success Screen

Test Success

  1. From Success Screen
  2. Click "LIHAT RIWAYAT" Expected: Navigate to History Screen

📸 Before & After

Before

  • NPM/Nama login fields
  • Basic gray styling
  • Simple card layouts
  • Missing mata kuliah field

After

  • Email/Password login fields
  • Green theme (#2E7D32) like mockup
  • Organized compact cards
  • Mata kuliah field added
  • Success screen added
  • Menu screen added
  • Better visual hierarchy

🔧 Technical Details

Material 3 Theme

SistemAkademikTheme {
    // Uses Material 3 Typography
    // Custom colors for primary green
}

Compose Components Used

  • Column / Row for layout
  • Card for sections
  • Button for actions
  • OutlinedTextField for inputs
  • Icon for visual elements
  • TopAppBar for header
  • CircularProgressIndicator for loading

Custom Styling

  • Color overrides for green theme
  • RoundedCornerShape for borders
  • ButtonDefaults for custom button colors
  • CardDefaults for custom card backgrounds

📚 Files Modified/Created

Created

  • MenuScreen.kt - Menu utama
  • SuccessScreen.kt - Konfirmasi sukses
  • UI_IMPLEMENTATION_SUMMARY.md - Dokumentasi UI
  • MATA_KULIAH_FEATURE.md - Dokumentasi fitur mata kuliah

Modified

  • LoginScreen.kt - Updated styling dengan green theme
  • AttendanceScreen.kt - Updated layout, added mata kuliah, updated styling
  • MainActivity.kt - Updated navigation dengan menu dan success screens

Unchanged

  • HistoryScreen.kt - No changes needed
  • LocationDebugMenu.kt - No changes needed
  • Database models & utils - No changes needed

🎓 Next Steps

  1. Test di emulator/device fisik
  2. Adjust spacing jika perlu
  3. Add mata kuliah dropdown (optional enhancement)
  4. Test with real location/camera
  5. Gather user feedback

Implementation Date: 2026-01-14 Status: COMPLETE - Semua screens sesuai mockup