
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy 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
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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.