Skip to content

Commit f914416

Browse files
committed
纠正状态布局中重试按钮的控件 id 命名
1 parent 3867203 commit f914416

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/src/main/java/com/hjq/demo/widget/StatusLayout.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class StatusLayout @JvmOverloads constructor(
121121
mainLayout = LayoutInflater.from(context).inflate(R.layout.widget_status_layout, this, false) as ViewGroup
122122
lottieView = mainLayout?.findViewById(R.id.iv_status_icon)
123123
textView = mainLayout?.findViewById(R.id.tv_status_text)
124-
retryView = mainLayout?.findViewById(R.id.iv_status_retry)
124+
retryView = mainLayout?.findViewById(R.id.btn_status_retry)
125125
if (mainLayout?.background == null) {
126126
// 默认使用 windowBackground 作为背景
127127
val typedArray: TypedArray = context.obtainStyledAttributes(intArrayOf(android.R.attr.windowBackground))

app/src/main/res-common/layout/widget_status_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
tools:text="@string/status_layout_error_network" />
3434

3535
<com.hjq.shape.view.ShapeButton
36-
android:id="@+id/iv_status_retry"
36+
android:id="@+id/btn_status_retry"
3737
android:layout_width="wrap_content"
3838
android:layout_height="wrap_content"
3939
android:layout_marginTop="@dimen/dp_20"

0 commit comments

Comments
 (0)