Coder Social home page Coder Social logo

dragbubbleview's Introduction

Android DragBubbleVIew

模仿QQ未读消息

效果图

使用方法:

Gradle
1:In the project root directory build.gradle

repositories {
            //Rely on the warehouse
           maven { url 'https://jitpack.io' }
          }
        }

2:The project directory build.gradle relies on the DashBoard framework

dependencies {
	        implementation 'com.github.trc1993:DragBubbleView:-SNAPSHOT'
	}

使用方法

在XML中使用

    <com.tianrongchuang.dragbubble.DragBubbleView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        app:bubble_text="12"
        app:bubble_textColor="#ffffff"
        app:bubble_textSize="12dp"
        app:bubble_radius="12dp"
        app:bubble_color="#ff0000"/>

java中使用

  reset()

    //设置 气泡半径
 setmBubbleRadius(float mBubbleRadius) 
 
    //设置 气泡颜色
setmBubbleColor(int mBubbleColor) 

    //设置 气泡消息文字
setmTextStr(String mTextStr)

    //设置 气泡消息文字颜色
 setmTextColor(int mTextColor)
 
    //设置 气泡消息文字大小
setmTextSize(float mTextSize) 

    //设置 不动气泡的半径
setmBubStillRadius(float mBubStillRadius) 

    //设置 可动气泡的半径
setmBubMoveableRadius(float mBubMoveableRadius)

    //设置 气泡爆炸的图片id数组
setmBurstDrawablesArray(int[] mBurstDrawablesArray) 

attrs

<resources>
    <declare-styleable name="DragBubbleView">
        <attr name="bubble_radius" format="dimension"/>
        <attr name="bubble_color" format="color"/>
        <attr name="bubble_text" format="string"/>
        <attr name="bubble_textSize" format="dimension"/>
        <attr name="bubble_textColor" format="color"/>
    </declare-styleable>
</resources>

dragbubbleview's People

Watchers

 avatar

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.