Skip to content

Commit 36bd5dc

Browse files
committed
更新展示gif
1 parent ccb3db9 commit 36bd5dc

24 files changed

+34
-1
lines changed

app/src/main/java/com/lihang/mysmartloadingview/MainActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ class MainActivity : AppCompatActivity() {
9090
}, 2000)
9191
}
9292

93+
//不带动画的 ”关注“ 和 ”取消关注“
94+
smartButtonNoanimal.setOnClickListener {
95+
smartButtonNoanimal.isFinished = !smartButtonNoanimal.isFinished
96+
}
97+
9398

9499
/**
95100
* 3.smart_tick

app/src/main/java/com/lihang/mysmartloadingview/MainJavaActivity.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
9595
});
9696

9797

98+
//不带动画的 ”关注“ 和 ”取消关注“
99+
mBinding.smartButtonNoanimal.setOnClickListener(it->{
100+
if (!mBinding.smartButtonNoanimal.isFinished()){
101+
mBinding.smartButtonNoanimal.setFinished(true);
102+
}else {
103+
mBinding.smartButtonNoanimal.setFinished(false);
104+
}
105+
});
106+
107+
98108
/**
99109
* 3.smart_tick
100110
* 支持关注模式

app/src/main/res/layout/activity_main.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,24 @@
131131
app:layout_constraintRight_toRightOf="parent"
132132
app:layout_constraintTop_toBottomOf="@+id/smart_button_success" />
133133

134+
<com.lihang.SmartLoadingView
135+
android:id="@+id/smart_button_noanimal"
136+
android:layout_width="wrap_content"
137+
android:layout_height="wrap_content"
138+
android:layout_marginTop="15dp"
139+
android:background="#F44336"
140+
android:text="点击关注,不带动画"
141+
android:textColor="#ffffff"
142+
android:textSize="16sp"
143+
app:hl_animaled_background="#A6A6A6"
144+
app:hl_animaled_text="关注成功"
145+
app:hl_animaled_textColor="#ffffff"
146+
app:hl_button_type="smart_button"
147+
app:hl_corners_radius="30dp"
148+
app:layout_constraintLeft_toLeftOf="parent"
149+
app:layout_constraintRight_toRightOf="parent"
150+
app:layout_constraintTop_toBottomOf="@+id/smart_button_fail" />
151+
134152

135153
<TextView
136154
android:id="@+id/txt_smarttick_title"
@@ -142,7 +160,7 @@
142160
android:textColor="#0353F4"
143161
android:textSize="14sp"
144162
app:layout_constraintLeft_toLeftOf="parent"
145-
app:layout_constraintTop_toBottomOf="@+id/smart_button_fail"
163+
app:layout_constraintTop_toBottomOf="@+id/smart_button_noanimal"
146164
/>
147165

148166

gif/cannot_click.gif

-156 KB
Binary file not shown.

gif/demo_follow.gif

-2 MB
Binary file not shown.

gif/demo_login.gif

-1.54 MB
Binary file not shown.

gif/error_1.gif

-596 KB
Binary file not shown.

gif/error_2.gif

-432 KB
Binary file not shown.

gif/follow_1.gif

-1.09 MB
Binary file not shown.

gif/follow_2.gif

-1000 KB
Binary file not shown.

0 commit comments

Comments
 (0)