https://github.com/sha-env/Simple-Kotlin-Project
Simple Kotlin Project Using Kotlin Language
https://github.com/sha-env/Simple-Kotlin-Project
combinational-logic intent kotlin kotlin-android navigation-drawer
Last synced: 5 months ago
JSON representation
Simple Kotlin Project Using Kotlin Language
- Host: GitHub
- URL: https://github.com/sha-env/Simple-Kotlin-Project
- Owner: sha-env
- License: apache-2.0
- Created: 2025-01-20T10:52:01.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-17T00:31:39.000Z (12 months ago)
- Last Synced: 2025-09-29T06:28:53.288Z (5 months ago)
- Topics: combinational-logic, intent, kotlin, kotlin-android, navigation-drawer
- Language: Kotlin
- Homepage:
- Size: 2.29 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Navigation Drawer
This repository contains the source code for an Android application demonstrating the implementation of a Navigation Drawer integrated with API calls and a simple intent mechanism using the Kotlin language within the Android Studio environment. This project showcases how to create a user-friendly and intuitive navigation experience with dynamic content.
## Purpose of This Repository
To showcase the integration of a Navigation Drawer with API calls and a simple intent mechanism to create a flexible and modular user interface within an Android application developed with Kotlin.
## Demonstration
Below is a demonstration of the main function of the Navigation Drawer App:
```kotlin
// filepath: /home/guan/Documents/Code/Simple-Kotlin-Project/app/src/main/java/com/example/navigationdrawer/MainActivity.kt
package com.example.navigationdrawer
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.drawerlayout.widget.DrawerLayout
import com.google.android.material.navigation.NavigationView
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val drawerLayout: DrawerLayout = findViewById(R.id.drawer_layout)
val navView: NavigationView = findViewById(R.id.nav_view)
// Setup the navigation drawer
navView.setNavigationItemSelectedListener { menuItem ->
// Handle navigation view item clicks here.
menuItem.isChecked = true
drawerLayout.closeDrawers()
// Simple intent mechanism
when (menuItem.itemId) {
R.id.nav_api -> {
val intent = Intent(this, ApiActivity::class.java)
startActivity(intent)
}
// Add more cases for other menu items
}
true
}
}
}
```
## Releases
You can find the latest releases [here](https://github.com/n4vrl0s3/Simple-Kotlin-Project/releases).
## Features
- Navigation Drawer with multiple menu items
- Fragment integration for modular UI
- API integration for dynamic content
- Simple intent mechanism for navigation
- Smooth and intuitive navigation
- Responsive design for various screen sizes
## Technologies Used
- Kotlin
- Android Studio
- XML for layout design
- Retrofit for API calls
## Project Setup
1. **Ensure you have Android Studio installed on your machine.**
2. **Clone this Repository**
```bash
git clone https://github.com/n4vrl0s3/Simple-Kotlin-Project.git
```
3. **Open the project in Android Studio**
4. **Build the project to download dependencies**
## Steps to Run
1. **Open the project in Android Studio**
2. **Build the project to download dependencies**
3. **Run the project on an emulator or physical device**
## License
This project is licensed under the Apache-2.0 License. See the [LICENSE](LICENSE) file for details.