Jetpack-Compose-BottomNavigation — springmusk.dev

README.md files (45)

// project

Jetpack-Compose-BottomNavigation

This Jetpack Compose Bottom Navigation project demonstrates the implementation of a modern and intuitive bottom navigation bar for Android apps

0 stars 0 forks Watching: 0 Open issues: 0
  • Kotlin
  • Updated May 9, 2024
Open on GitHub

Jetpack Compose Bottom Navigation Sample

This repository contains a Jetpack Compose project showcasing the implementation of a bottom navigation bar, inspired by this tutorial. The project demonstrates the usage of Material3 components for creating a sleek and modern UI.

Table of Contents

Features

  • Bottom Navigation Bar: Utilizes Material3 components to create a bottom navigation bar with icons and labels for easy navigation.
  • Badge Notifications: Displays badge notifications on specific tabs to indicate the presence of new content or notifications.
  • Sleek UI: Designed with modern UI principles, providing users with an intuitive and visually appealing experience.

Screenshots

Dark Mode Light Mode

Getting Started

Prerequisites

Before running the project, ensure you have the following prerequisites installed:

  • Android Studio Arctic Fox (2020.3.1) or later
  • Android SDK version 31 or higher
  • Kotlin version 1.5.0 or later

Installation

Follow these steps to install and run the project:

  1. Clone the repository:
git clone https://github.com/springmusk026/Jetpack-Compose-BottomNavigation.git
  1. Open the project in Android Studio.

  2. Build and run the project on a compatible device or emulator.

Usage

  1. Upon launching the app, you'll see the bottom navigation bar with four tabs: Home, Posts, Notifications, and Profile.
  2. Tap on each tab to navigate between different sections of the app.
  3. If there are any new notifications, a badge will appear on the Notifications tab.

Code Explanation

MainActivity.kt

  • The MainActivity class sets up the main UI using Jetpack Compose.
  • It initializes the bottom navigation bar with icons, labels, and badge notifications.
  • The bottomNavItems list defines the navigation items with their properties.
  • Each BottomNavItem represents a tab in the bottom navigation bar.

BottomNavItem.kt

  • This data class represents a single item in the bottom navigation bar.
  • It contains properties such as title, route, selected icon, unselected icon, badge presence, and badge count.

Components Used

  • Scaffold: Provides a basic layout structure for the app screen, including the bottom navigation bar.
  • NavigationBar: A custom navigation bar implementation for Jetpack Compose.
  • NavigationBarItem: Represents a single item in the bottom navigation bar.
  • BadgedBox: Displays a badge on top of an icon to indicate new notifications.
  • Badge: Represents a badge notification with customizable content.
  • Icon: Displays an icon image using either a vector or a bitmap.

Contributing

Contributions are welcome! Please feel free to fork the repository and submit pull requests to suggest improvements or add new features.

License

This project is licensed under the MIT License.

Acknowledgements

  • Thanks to YouTube Tutorial for providing inspiration for this project.
  • Special thanks to the Jetpack Compose team for developing such an amazing toolkit for Android UI development.

Contact

For any inquiries or feedback, feel free to reach out to GitHub Profile.

main Kotlin 0 Updated May 9, 2024 springmusk.dev

AndroidScreenshot

A simple project to capture screehshot

  • Kotlin

vApp-Inject

vApp-Inject is a Virtual Box application project designed to provide users with the ability to run Android games and apps independently within it. It offers a seamless environment for running Android applications on various platforms.

  • Kotlin
26 13 project

MovieApp

A modern Android streaming application built with Jetpack Compose

  • Kotlin