Menu
Theme
Bachelor of Science in Computer Science
Course Content

UI Design

Mobile Application Development

Habari Yako, Future App Developer! Welcome to UI Design.

Ever used the M-Pesa app and thought, "Wow, this is so easy to use!"? Or maybe you've tried to navigate another app and felt completely lost, wondering where the button to pay is? That feeling, that experience, is all about User Interface (UI) Design. It's the art and science of making our apps not just beautiful, but also incredibly simple and enjoyable to use. Think of yourself as an architect, but instead of buildings, you are designing the digital "rooms" and "pathways" of a mobile application. Sawa sawa? Let's begin!

UI is the 'look' of the app – the colours, the fonts, the buttons. It’s what you see. Its close cousin, UX (User Experience), is the 'feel' – the overall experience of using the app. Today, we focus on making our apps look amazing and work perfectly!

The Main Ingredients of a Great UI (The "Chapati Madondo" of Design)

Just like a good meal has the right ingredients, a great UI has a few key components that you must master. If you get these right, your users will love your app!

  • Layout and Structure: This is about arranging elements on the screen. We don't just throw things anywhere! We use grids to create alignment, balance, and order. This makes the app look clean and professional.
    
    +------------------------------------+
    | [Logo]      [Menu]               |  <-- Header
    +------------------------------------+
    |                                    |
    |      [Main Image/Content]          |  <-- Body
    |                                    |
    +------------------------------------+
    | [Nav 1] [Nav 2] [Nav 3] [Nav 4]  |  <-- Navigation Bar
    +------------------------------------+
            

    A key concept here is Visual Hierarchy. This means making the most important element the most prominent. For example, on a product page on Jumia, the "Buy Now" button is big and brightly coloured for a reason!

  • Colour Theory: Colour is not just for decoration; it communicates! It sets the mood and guides the user's eye. Think about it:
    • Safaricom Green: Represents growth, money, and success.
    • Airtel Red: Grabs attention, signifies passion and importance.
    A popular rule is the 60-30-10 Rule: 60% of your space is a dominant colour, 30% is a secondary colour, and 10% is an accent colour used for buttons and highlights.

    Image Suggestion: A vibrant digital art piece showing a mobile app screen. The color palette is inspired by the Kenyan flag and Maasai beadwork: a dominant black or white background (60%), with accents of red and green (30%), and a sharp white or yellow for the call-to-action buttons (10%).

  • Typography (The Art of Fonts): The text on your app must be readable. Don't use a crazy, curly font for important instructions!
    • Sans-serif fonts (like Roboto, Helvetica) are clean and modern, perfect for mobile screens.
    • Serif fonts (like Times New Roman) have small 'feet' and are often used for long-form reading, but can be tricky on small screens.
    Rule of Thumb: Stick to a maximum of two fonts to keep your design clean.

Making It Work for Kenyans (Usability & Accessibility)

A beautiful app that nobody can use is a failed app. Our goal is to design for everyone, from your tech-savvy cousin in Nairobi to your shosh in the village. This is the heart of good design.

Keep It Simple, Mwananchi!

Your user should never have to stop and think, "What do I do next?". The journey should be obvious. The best example? The M-Pesa STK push. You just enter your PIN, and it's done. It's brilliant because it's simple.

Real-World Scenario: The Confusing Checkout
Imagine you're trying to buy a bus ticket on an app to travel from Nairobi to Mombasa. You've selected your seat, but the "Pay Now" button is tiny, grey, and hidden at the bottom. The "Cancel" button is big and red right in the middle. Frustrating, right? You might even give up and use another service. That's a UI failure! A good UI would make the "Pay Now" button unmissable.

How We Read: The F & Z Patterns

Studies show that people scan screens in predictable patterns. We can use this to our advantage!

  • The F-Pattern: Users read horizontally across the top, then scan down the left side, and read across again on an interesting line. Good for text-heavy pages like news apps.
  • The Z-Pattern: The eye moves from top-left to top-right, then diagonally down to bottom-left, and finally across to the bottom-right. Perfect for simple pages like login screens.

    F-Pattern                  Z-Pattern
  +----------------+         +----------------+
  | 1 OOOOOOOOOOOO |         | 1 ------------ 2 |
  | 2 O            |         |             /  |
  | 3 OOOOOOOO     |         |            /   |
  | 4 O            |         |           /    |
  | 5 O            |         | 3 ------------ 4 |
  +----------------+         +----------------+

The Math Behind the Beauty: Grid Systems

Design isn't just art; there's some simple math! We use grid systems to ensure consistent spacing. A common choice for mobile is a 4-column or 12-column grid. Let's calculate the column width for a 4-column grid on a typical phone.


    // Let's assume a screen width of 360dp (Density-Independent Pixels)
    // We want a margin of 16dp on each side (left and right)
    // We want a gutter (space between columns) of 8dp. We will have 3 gutters.

    Step 1: Calculate the total space for margins and gutters.
    Total Margin = 16dp (left) + 16dp (right) = 32dp
    Total Gutter = 3 * 8dp = 24dp
    Total Horizontal Space = 32dp + 24dp = 56dp

    Step 2: Calculate the remaining space for the columns.
    Available Space = Screen Width - Total Horizontal Space
    Available Space = 360dp - 56dp = 304dp

    Step 3: Calculate the width of one column.
    Column Width = Available Space / Number of Columns
    Column Width = 304dp / 4 = 76dp

    Result: Each of our 4 columns will be 76dp wide.

This ensures everything on your screen is perfectly aligned and looks professional!

A Glimpse into the Code

So how does this design become a real app? Developers use code to describe the UI. Here is a simple example of an Android login screen layout written in XML (eXtensible Markup Language).


<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:padding="16dp">

    <ImageView
        android:id="@+id/logo"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:src="@drawable/my_logo"
        android:layout_gravity="center_horizontal"/>

    <EditText
        android:id="@+id/editText_email"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="Enter your Email"/>

    <EditText
        android:id="@+id/editText_password"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPassword"
        android:hint="Enter your Password"/>

    <Button
        android:id="@+id/button_login"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Login"/>

</LinearLayout>

Image Suggestion: A split-screen image for a student's computer. On the left side, it shows the Android XML code from above. An arrow points from the code to the right side of the screen, which displays a clean, beautiful mobile app login interface with a logo, two input fields, and a prominent login button. This visually connects the code to the final product.

Conclusion & Kazi ya Mwanafunzi (Your Task)

Tuko pamoja? Today we've learned that great UI design is a blend of art and science. It’s about creating clean layouts, using colour and typography effectively, and most importantly, designing for a simple, intuitive user experience.

Now, it's your turn to be the architect!

Your Assignment: Grab a pen and paper (or a design tool if you have one) and sketch the main screen for a simple app that helps university students track their HELB loan balance.

  • What is the most important piece of information? (The balance, of course!) Make it the biggest and boldest element.
  • What are the key actions a student would want to take? (e.g., "View Statement", "Make a Payment"). How would you design these buttons?
  • Think about the colours, fonts, and layout. Keep it clean and simple!

You've got this! A journey of a thousand apps begins with a single sketch. Keep practicing, stay curious, and you'll be building amazing applications that Kenyans will love to use. Kazi nzuri!

Pro Tip

Take your own short notes while going through the topics.

Previous Android/Flutter
KenyaEdu
Add KenyaEdu to Home Screen
For offline access and faster experience