android loading 组件

发布时间:2022-06-11 00:44:54

暂时主要使用在两个地方 一个是 登录, 一个是main tab加载数据

开源地址 (选择还有一个原因是mit协议)

https://github.com/cloudist/ACProgressLite

引入

implementation 'cc.cloudist.acplibrary:library:1.2.1'

使用

private ACProgressFlower dialog=null; //声明

//在加载前 实例化并显示
  dialog = new ACProgressFlower.Builder(this)
                .direction(ACProgressConstant.DIRECT_CLOCKWISE)
                .themeColor(getResources().getColor(R.color.btn_blue))
                .text("加载中")
                .bgColor(getResources().getColor(R.color.page_bg))
                .fadeColor(Color.DKGRAY).build();
        dialog.show();
        
        //在加载完的地方消失
        dialog.dismiss();

Card image cap
APP STORE
Card image cap
应用宝
Card image cap
小米
Card image cap
华为