Git Product home page Git Product logo

aroundcircleview's Introduction

圆形图片 周围进度条 类似于音乐播放器的进度

圆角显示图片 来自CircleImageView 在基础上修改 让其可以周边动态显示进度

 app:textBgColor 外围进度的原始背景颜色 
 app:textColor 外围进度条的颜色 
app:textSize="10dp" 宽度0时不显示

使用方法

<com.daemon.aroundcircleview.AroundCircleView
    android:id="@+id/acv_icon"
    android:layout_width="200dp"
    android:layout_height="200dp"
    android:layout_centerInParent="true"
    android:layout_gravity="center"
    android:src="@mipmap/head"
    app:textColor="@color/colorAccent"
    app:textBgColor="#000000"
    app:textSize="10dp" />
  • 直接使用acvIcon.setProgress(progress);即可更新

  • 更新进度条 利用Hanlder更新即可

  •  //更新进度条
      progress=50;
      acvIcon.setProgress(progress);
    
      new Thread(new Runnable() {
          @Override
          public void run() {
              while (falg) {
                  if (progress > 100) {
                      progress = 0;
                  }
                  SystemClock.sleep(1000);
                  progress += 5;
                  weakHandler.sendEmptyMessage(1);
              }
          }
      }).start();
      @Overridepublic void onDestroy() {    
            super.onDestroy();    
            falg = false;
      }
    
      WeakHandler weakHandler = new WeakHandler(new Handler.Callback() {
      @Override
      public boolean handleMessage(Message msg) {
    
          if (msg.what == 1) {
              acvIcon.setProgress(progress);
          }
    
          return false;
      }
    

    });

效果如图

背景虚化也写过相关的blog android 图片 高斯模糊 Blur Android Studio JNI NDK 生成 so 问题汇总

Paste_Image.png

GIF.gif

github地址

相关音乐项目 MVP模式 项目练习 Pas --新闻 音乐 图片 三个模块

aroundcircleview's People

Watchers

coder 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.