This Android mobile app is developed in Kotlin using Jetpack Compose as a midterm project.
It allows users to register an event and view a summary of the registered event details.
Objective: Build a two-screen Event Planner app with Jetpack Compose, ViewModel state management, and a custom Material 3 theme.
Key goals:
- Single-Activity architecture
- Navigation with Navigation Compose
- ViewModel +
mutableStateOffor all input states - Custom Material Theme (light & dark)
- Input validation implemented using a sealed class
- Title: “Event Registration”
- Logo image below the title
OutlinedTextFields:- Event Name
- Organizer Name
- Event Location
- Radio Buttons (single selection) for Event Type:
- Conference, Wedding, Concert (example)
- Checkboxes (multi-selection) for Additional Services:
- Catering, Photography, Music, Decoration
- Register Button:
- Validates inputs
- Shows
Toast— “Event Registration Successful” - Navigates to Order Summary screen using a shared
ViewModel
- Title: “Event Order Summary”
- Displays:
- Event Name
- Organizer Name
- Event Location
- Selected Event Type
- Selected Additional Services
- Back navigation to registration screen
- Single Activity (one
MainActivity.kt) that hosts composables - Navigation Compose for screen transitions (
NavGraph.kt) - MVVM-style separation: UI composables are stateless; all UI state lives in
EventViewModel - Use
mutableStateOffor fields in ViewModel - All strings are in
res/values/strings.xml— no hardcoded UI text - Sealed class used for input validation results (
ValidationResultwith states likeSuccess,EmptyField,InvalidEmail, etc.) - Meaningful comments in code and separation of concerns
All form states are inside EventViewModel:
eventName: MutableState<String>organizerName: MutableState<String>eventLocation: MutableState<String>selectedEventType: MutableState<EventType?>selectedServices: MutableStateSet<ServiceType>(or boolean flags)- Validation functions produce
ValidationResultsealed class responses
- Custom Material 3 theme created (colors, typography, shapes).
- Light and dark theme support via
Theme.kt. - Colors defined in
Color.ktand applied across UI components.
- Open the project in Android Studio.
- Let Gradle sync and install any required SDK components.
- Run on an emulator or device (API 21+ recommended).
- Validation implemented via a
sealed class ValidationResultwith cases:SuccessEmptyField(fieldName: String)InvalidFormat(fieldName: String, reason: String)
- Register button will only navigate on
Success. Otherwise, show appropriate error indicators (e.g., helper text underOutlinedTextField) and avoid navigation.
app/ ├── java/com/example/midtermstudentid/ │ ├── MainActivity.kt │ ├── navigation/NavGraph.kt │ ├── viewmodel/EventViewModel.kt │ ├── ui/screens/EventRegistrationScreen.kt │ ├── ui/screens/OrderSummaryScreen.kt │ └── ui/theme/Theme.kt, Color.kt, Type.kt ├── res/ │ ├── drawable/logo.png │ └── values/strings.xml, colors.xml, themes.xml