javanoober/backgroundlibrary

A framework for directly generating shape through Tags, no need to write shape.xml again(通过标签直接生成shape,无需再写shape.xml)

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 46 minutes ago
Added to GitGenius on September 17th, 2026
Created on September 9th, 2018
Open Issues & Pull Requests: 10 (+0)
GitHub issues: Enabled
Number of forks: 472
Total Stargazers: 3,885 (+0)
Total Subscribers: 48 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 77.1 days
Mean response time: 279.8 days
90th percentile: 908.5 days
Tracked items: 13

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 5
New in 7 days: 0
Closed in 7 days: 1
Avg open age: 456 days
Stale 30+ days: 5
Stale 90+ days: 5

Recent activity

Opened in 7 days: 0
Closed in 7 days: 1
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Detailed Description

BackgroundLibrary is an Android framework that generates shape drawables directly through XML attributes without requiring separate shape.xml files.

The tool solves the tedious problem of creating shape and selector XML files for Android views by allowing developers to define shapes, gradients, strokes, and corners directly as attributes on view elements in layout XML. Instead of writing separate drawable resources, developers add attributes prefixed with "bl_" to their views, and the framework generates the corresponding shape drawables at runtime. This eliminates boilerplate and keeps shape definitions colocated with their views.

The framework suits Android projects where developers want to reduce the number of drawable XML files and simplify layout definitions. It works seamlessly with standard Android views and requires no code changes beyond adding XML attributes. The tool supports rounded corners, solid colors, strokes with dashes, gradients with configurable angles and colors, text gradients, and RTL layout mirroring. It provides separate artifacts for projects using the legacy Android Support Library and those using AndroidX.

The project has addressed compatibility issues with newer AndroidX versions and fixed edge cases including white color parsing, RadioButton and CheckBox styling, and text gradient rendering in specific orientations. RTL support was added as an optional feature requiring explicit enablement. The tool maintains active issue response through community channels and includes comprehensive documentation in its wiki rather than inline README examples.