Giter Site home page Giter Site logo

android-icon-badge's People

Contributors

empty2k12 avatar pragtob avatar taig avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-icon-badge's Issues

[Feature Request] Font size control, dynamic size

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

Rename (get/set)CircleColor to (get/set)BackgroundShapeColor

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

Background Color doesn't appears on API 16

<?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

Warnings during build

[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

Add background shape preset methods

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.