Skip to content

Commit

Permalink
1. 更换圆环进度控件,官方的不能控制线条粗细,不能改成圆角等 控件地址:https://github.com/rahatarmanahm…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjh committed May 29, 2024
1 parent dcf5990 commit ab235af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions multilibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ dependencies {
// 自制按钮进度 https://github.com/zhongjhATC/CircularProgressView
api 'com.github.zhongjhATC:CircularProgressView:1.8'

// 圆环进度,官方的不能控制线条粗细,不能改成圆角等 https://github.com/rahatarmanahmed/CircularProgressView
api 'com.github.rahatarmanahmed:circularprogressview:2.5.0'

compileOnly project(path: ':common')
compileOnly project(path: ':imageedit')
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.github.rahatarmanahmed.cpv.CircularProgressView;
import com.zhongjh.albumcamerarecorder.R;
import com.zhongjh.albumcamerarecorder.camera.listener.ClickOrLongListener;
import com.zhongjh.albumcamerarecorder.widget.clickorlongbutton.ClickOrLongButton;
Expand Down Expand Up @@ -566,7 +567,7 @@ public static class ViewHolder {
public ClickOrLongButton btnClickOrLong;
TextView tvTip;
public TextView tvSectionRecord;
public ProgressBar pbConfirm;
public CircularProgressView pbConfirm;

public ViewHolder(View rootView) {
this.rootView = rootView;
Expand Down
18 changes: 12 additions & 6 deletions multilibrary/src/main/res/layout/layout_photovideo_operate_zjh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,26 @@
app:operationButtonZhongjhType="confirm"
tools:visibility="visible" />

<ProgressBar
<com.github.rahatarmanahmed.cpv.CircularProgressView
android:id="@+id/pbConfirm"
android:layout_width="0dp"
android:layout_height="0dp"
android:indeterminateTint="?attr/colorPrimary"
android:layout_marginTop="6dp"
app:cpv_animAutostart="true"
app:cpv_indeterminate="true"
app:layout_constraintBottom_toBottomOf="@+id/btnClickOrLong"
app:layout_constraintEnd_toStartOf="@+id/guideline88"
app:layout_constraintStart_toStartOf="@+id/guideline72"
app:layout_constraintTop_toTopOf="@+id/btnClickOrLong"
android:layout_width="0dp"
android:layout_height="0dp"/>
app:layout_constraintTop_toTopOf="@+id/btnClickOrLong" />

<!-- 中间的操作按钮 -->
<com.zhongjh.albumcamerarecorder.widget.clickorlongbutton.ClickOrLongButton
android:id="@+id/btnClickOrLong"
android:layout_width="120dp"
android:layout_height="120dp"
android:focusable="true"
android:layout_marginBottom="20dp"
android:focusable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -100,7 +103,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_margin="13dp"
android:layout_marginStart="13dp"
android:layout_marginTop="13dp"
android:layout_marginEnd="13dp"
android:layout_marginBottom="13dp"
android:contentDescription="外圈"
android:src="@drawable/shape_ring_white"
tools:ignore="HardcodedText" />
Expand Down

0 comments on commit ab235af

Please sign in to comment.