V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
hzw1199

[Android] 半透明镂空、圆形、动画 的进度条,仿微信和微博

  •  
  •   hzw1199 ·
    hzw1199 · Sep 4, 2020 · 1604 views
    This topic created in 2067 days ago, the information mentioned may be changed or developed.

    HoverProcessView

    https://github.com/hzw1199/HoverProcessView

    YouTube:

    IMAGE ALT TEXT

    Features

    • 仿微信和微博的镂空半透明圆形进度

    • 支持开启和关闭动画

    • 背景支持圆角矩形

    • layout

    <com.wuadam.hoverprocess.HoverProcessView
        android:id="@+id/process"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:duration="1000"
        app:hoverColor="#80000000"
        app:max="100"
        app:progress="30"
        app:radius="48dp"
        app:ringWidth="4dp"
        app:roundCornerRadius="8dp" />
    
    • java
    HoverProcessView process = findViewById(R.id.process);
    

    动画模式

    process.setProgress(50, true);
    

    无动画模式

    process.setProgress(50, false);
    

    无限模式

    process.startInfiniteProgress();
    process.stopInfiniteProgress();
    

    onDestroy:

    process.stop();
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1015 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 17:58 · PVG 01:58 · LAX 10:58 · JFK 13:58
    ♥ Do have faith in what you're doing.