Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
com.chinnsenn:submitbutton
Advanced tools
0、在工程根目录 build.gradle 中添加
allprojects {
repositories {
google()
mavenCentral() //0.2.2 开始
}
}
1、在 gradle 里引用: 这里查看最新版本号
implementation 'com.chinnsenn:submitbutton:#last_version'
2、在 xml 中添加控件
<com.chinnsenn.submitbutton.SubmitButton
android:id="@+id/submitbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:buttonColor="#11aa03"
app:buttonStrokeWidth="15"
app:buttonTextSize="15sp"
app:completeText="上传完成"
app:failureText="上传失败"
app:progressColor="#6377ff"
app:unKnownProgress = "true"
app:submitText="确认" />
val submitButton:SubmitButton = findViewById(R.id.submitbutton)
submitButton.submitText = "开始上传"
submitButton.completeText = "上传完成"
submitButton.failureText = "上传失败"
submitButton.unKnownProgress = false
属性介绍
属性名 | 描述 |
---|---|
buttonColor | 按钮颜色 |
buttonStrokeWidth | 线框宽度 |
buttonTextSize | 按钮文字大小 |
completeText | 完成文案 |
failureText | 失败文案 |
progressColor | 进度条颜色 |
submitText | 起始文字 |
unKnownProgress | 不能确定进度 |
submitButton.unKnownProgress = true
这种情况下需要手动调用 SubmitButton#stop() 方法结束转进度
submitButton.unKnownProgress = false
但需要在你网络请求进度中或者其他地方调用
SubmitButton#setProgress(percent:Float) //需要你计算好百分比
或者
SubmitButton#setProgressAndTotal(progress: Float, total: Float) //传入当前数值和总进度
否则进度圈不会变化。
在网络请求失败的回调里调用 SubmitButton#failure()
此控件为还原 Dribble 上一个动效而制作
因为没有具体参数,只能摸索的仿造,而且没有使用场景可能导致兼容性不好,有许多不足之处,也欢迎PR。
FAQs
A button with animation.
We found that com.chinnsenn:submitbutton demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.