LoadingButton
一个带圆点进度显示的按钮-Android
Install / Use
/learn @teresazl/LoadingButtonREADME
LoadingButton
一个带圆点进度显示的按钮 模仿windows效果
Demo

Sample Usage
There are four status in LoadingButton
- Normal ----> 1
- Process ----> 2 ~ 99
- Complete ----> 100
- Error ----> -1
Layout
<com.teresazl.library.impl.LoadingButton
android:id="@+id/loading_btn_normal"
android:layout_width="match_parent"
android:layout_height="48dp"
android:text="Send"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="18sp"
app:complete_text="DONE" />
Activity
// normal
normalBtn = (LoadingButton) findViewById(R.id.loading_btn_normal);
normalBtn.setOnLoadCompleteListener(this);
normalBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
...
}
});
// complete
completeBtn = (LoadingButton) findViewById(R.id.loading_btn_complete);
completeBtn.setProgress(100);
// error
errorBtn = (LoadingButton) findViewById(R.id.loading_btn_error);
errorBtn.setProgress(-1);
// process
processBtn = (LoadingButton) findViewById(R.id.loading_btn_process);
processBtn.setProgress(50);
CallBack
public class MainActivity extends AppCompatActivity implements ProcessButton.LoadingListener {
....
....
normalBtn.setOnLoadingListener(this);
@Override
public void loadComplete() {
Toast.makeText(this, "complete", Toast.LENGTH_SHORT).show();
}
@Override
public void loadError() {
Toast.makeText(this, "error", Toast.LENGTH_SHORT).show();
}
}
About
If you like this project, please star me
If you have any questions, please email me: teresazl@yeah.net
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
