liefery-it-legacy / android-icon-badge Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Please add attribute to control text size e.g
<com.liefery.android.icon_badge.IconBadgeView
android:layout_width="50dp"
android:layout_height="50dp"
app:iconBadge_backgroundShapeColor="#bc477b"
app:iconBadge_stopNumber="11"
app:textSize="10sp"
app:iconBadge_foregroundShapeColor="#560027" />
, and please handle auto resizing "wrap_content" for IconBadgeView that doesn't have fixed size yet e.g
<com.liefery.android.icon_badge.IconBadgeView
android:layout_width="wrap_content"
android:layout_height="50dp"
app:iconBadge_backgroundShapeColor="#bc477b"
app:iconBadge_stopNumber="11"
app:iconBadge_foregroundShapeColor="#560027" />
in appove scenario it will never show up
When rendering the icon badge into the bitmap, the icon is currently top-left aligned but should be centered.
Also the statics BACKGROUND_ROUND
and BACKGROUND_SQUARE
should be BACKGROUND_SHAPE_ROUND
and BACKGROUND_SHAPE_SQUARE
setXfermode(...)
should no longer be necessary
Generally make the naming more consistent with backgroundShapeX
and foregroundShapeX
<?xml version="1.0" encoding="utf-8"?>
<com.liefery.android.icon_badge.IconBadgeView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_marginRight="5dp"
app:iconBadge_backgroundShapeColor="@color/packet_color"
app:iconBadge_foregroundShapeColor="@android:color/white"
app:iconBadge_backgroundShape="square">
</com.liefery.android.icon_badge.IconBadgeView>
background color doesn't appears on API 16
[error] [NewApi] src/main/res/drawable/ic_arrow_down.xml:2:<vector> requires API level 21 (current min is 14) or building with Android Gradle plugin 1.4 or higher
[error] <vector xmlns:android="http://schemas.android.com/apk/res/android"
[error] ^
[error] [NewApi] src/main/res/drawable/ic_arrow_up.xml:2:<vector> requires API level 21 (current min is 14) or building with Android Gradle plugin 1.4 or higher
[error] <vector xmlns:android="http://schemas.android.com/apk/res/android"
[error] ^
[error] lint found 2 errors, 0 warnings
...
[error] [NewApi] src/main/res/drawable/ic_checkmark_all.xml:2:<vector> requires API level 21 (current min is 14) or building with Android Gradle plugin 1.4 or higher
[error] <vector xmlns:android="http://schemas.android.com/apk/res/android"
[error] ^
[warn] [UnusedAttribute] src/main/res/layout/main.xml:32:Attribute elevation is only used in API level 21 and higher (current min is 14)
[warn] android:elevation="8dp"/>
[warn] ~~~~~~~~~~~~~~~~~~~~~~~
[warn] [UnusedAttribute] src/main/res/layout/main.xml:61:Attribute elevation is only used in API level 21 and higher (current min is 14)
[warn] android:elevation="2dp"/>
[warn] ~~~~~~~~~~~~~~~~~~~~~~~
[warn] [UnusedAttribute] src/main/res/layout/main.xml:90:Attribute elevation is only used in API level 21 and higher (current min is 14)
[warn] android:elevation="8dp"/>
[warn] ~~~~~~~~~~~~~~~~~~~~~~~
[error] lint found 1 error, 3 warnings
Via xml it is possible to easily specify the background shape, in code the matching methods are missing.
setShapeArrowUp() -> setForegroundShapeArrowUp()
setShapeArrowDown() -> setForegroundShapeArrowDown()
setBackgroundShapeCircle()
setBackgroundShapeSquare()
setBackgroundShapePin()
RoundBackgroundProvider -> CircleBackgroundProvider
setForegroundDrawer
(if possible)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.