RepositoryJava
nikartx

nikartx/Image-Support

Add badge with counter to ImageView Android.

129stars
31forks
5issues
2views

🏷️ Thêm badge đếm thông báo lên ImageView Android chỉ với một thư viện nhỏ

Thư viện mở nguồn Image-Support giúp bạn dễ dàng thêm badge đếm (count) lên bất kỳ ImageView nào trong ứng dụng Android, giống như chức năng thông báo trên ứng dụng nhắn tin hay giỏ hàng.

Image-Support (hay còn gọi là ImageBadgeView) là một custom view mở rộng từ ImageView, cho phép hiển thị badge kèm số đếm ngay trên ảnh. Dự án được phát triển bởi Ivan Vodyasov và hiện đã có trên Maven Central, hỗ trợ cả Java và Kotlin DSL.

✨ Điểm nổi bật

  • BadgeValue: hiển thị giá trị số trên ImageView.
  • Tùy chỉnh giao diện: hỗ trợ thay đổi màu nền badge, màu chữ, kích thước chữ, font chữ và kiểu chữ.
  • Vị trí linh hoạt: đặt badge ở các góc như top_left, top_right, bottom_left, bottom_right.
  • BadgeLimitValue: tùy chọn giới hạn giá trị tối đa hiển thị (ví dụ: >999 sẽ hiện 999+).
  • BadgePosition: hỗ trợ đặt badge ở góc bất kỳ thông qua XML hoặc code.
  • BadgeBackground tùy chỉnh: sử dụng drawable riêng cho nền badge.
  • BadgePadding & OvalAfterFirst: tăng padding và tùy chỉnh hình dạng badge sau lần đầu.
  • Maven Central hỗ trợ: dễ dàng tích hợp qua Gradle.

💡 Vì sao đáng chú ý

Không cần phải tự viết logic vẽ badge lên ImageView phức tạp — ImageBadgeView đã làm điều đó sẵn. Bạn chỉ cần thay thế ImageView bằng ImageBadgeView trong layout hoặc gán badge sau bằng code. Đặc biệt hữu ích cho các tính năng như giỏ hàng mua sắm, hộp thư đến, hoặc bất kỳ nơi cần đếm số lượng phần tử liên quan đến một biểu tượng.


#Android #ImageView #Badge #CustomView #OpenSource #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryJava
yarolegovich/DiscreteScrollView

A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.

5.8k
Aug 19, 2024
RepositoryKotlin
Tapadoo/Alerter

An Android Alerting Library

5.5k
Jul 21, 2023
RepositoryKotlin
mikepenz/AboutLibraries

AboutLibraries automatically collects all dependencies and licenses of any gradle project (Kotlin MultiPlatform), and provides easy to integrate UI components for Android and Compose Multiplatform environments

4.5k
Nov 15, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

475.2k
Nov 23, 2026
RepositoryDart
flutter/flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

181.3k
Nov 18, 2026
RepositoryJava
ksoichiro/Android-ObservableScrollView

Android library to observe scroll events on scrollable views.

9.6k
Jun 1, 2021
RepositoryJava
aritraroy/UltimateAndroidReference

:rocket: Ultimate Android Reference - Your Road to Become a Better Android Developer

8.1k
Jul 18, 2024
RepositoryJava
Bearded-Hen/Android-Bootstrap

Bootstrap style widgets for Android, with Glyph Icons

7.2k
Sep 2, 2021
RepositoryJava
nisrulz/android-tips-tricks

:ballot_box_with_check: [Cheatsheet] Tips and tricks for Android Development

4.7k
Jun 8, 2025