JavaNoober
BackgroundLibrary
Java

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

Last updated Jul 1, 2026
3.9k
Stars
473
Forks
19
Issues
+1
Stars/day
Attention Score
78
Language breakdown
Java 99.9%
Kotlin 0.1%
Files click to expand
README

BackgroundLibrary

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

issue回复不及时,可以添加qq群887686934

English.md

依赖方式:

allprojects { repositories { ... maven { url 'https://jitpack.io' } } }

implementation "com.android.support:appcompat-v7:$supportVersion" implementation 'com.github.JavaNoober.BackgroundLibrary:library:1.7.6'

如果项目使用了androidx:

allprojects { repositories { ... maven { url 'https://jitpack.io' } } }

implementation "androidx.appcompat:appcompat:$supportVersion" implementation 'com.github.JavaNoober.BackgroundLibrary:libraryx:1.7.6'

使用文档

无需任何代码,直接加入bl标签属性即可,与原生view无缝衔接,具体使用方法以及属性内容请查看wiki 重要的事情说3遍!!! wiki wiki wiki

示例效果

使用效果完全和原生shape selector一样,但是只需要直接在xml中加入属性即可,例如

cornersradius="4dp" app:blsolidcolor="#E3B666" app:blstrokecolor="#8c6822" app:blstrokedashGap="5dp" app:blstrokedashWidth="10dp" app:blstrokewidth="2dp" />

1、边框+背景+圆角

cornersradius="4dp" app:blsolidcolor="#E3B666" app:blstrokecolor="#8c6822" app:blstrokewidth="2dp" /> 等同于

2、渐变

等同于

© 2026 GitRepoTrend · JavaNoober/BackgroundLibrary · Updated daily from GitHub