https://github.com/kauramanp/simpleviewbinding
This repository showcases a basic implementation of ViewBinding in an Android app. It demonstrates how to safely interact with UI components, manage memory efficiently, and implement edge-to-edge UI support.
https://github.com/kauramanp/simpleviewbinding
android android-application android-development viewbinding
Last synced: 7 months ago
JSON representation
This repository showcases a basic implementation of ViewBinding in an Android app. It demonstrates how to safely interact with UI components, manage memory efficiently, and implement edge-to-edge UI support.
- Host: GitHub
- URL: https://github.com/kauramanp/simpleviewbinding
- Owner: kauramanp
- Created: 2025-02-11T17:11:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-19T17:17:30.000Z (about 1 year ago)
- Last Synced: 2025-03-19T18:28:31.574Z (about 1 year ago)
- Topics: android, android-application, android-development, viewbinding
- Language: Kotlin
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple View Binding
# 📱 Android ViewBinding
This project demonstrates how to use ViewBinding in an Android Activity while handling coroutines safely within the activity lifecycle.
# 🚀 Features
✅ Implements ViewBinding to avoid findViewById()
✅ Uses lifecycleScope.launch to update UI after a delay
✅ Properly handles ViewBinding cleanup to prevent memory leaks
# 🛠️ Tech Stack
Kotlin
ViewBinding
Jetpack Components
# 📌 Key Points
ViewBinding eliminates findViewById() calls.
Edge-to-Edge Support ensures a full-screen experience.
Memory Management: _binding = null in onDestroy() prevents leaks.
# 🚀 A simple yet effective implementation of ViewBinding in Android!