Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 3796b51

Browse files
committed
removed custom clicklistener
1 parent bf88174 commit 3796b51

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

loadingbutton/src/main/java/com/droidbond/loadingbutton/LoadingButton.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class LoadingButton @JvmOverloads constructor(
2626
private var progressBar: ProgressBar? = null
2727
private var tvText: TextView? = null
2828
private var array: TypedArray? = null
29-
private lateinit var clickListener: OnClickListener
3029

3130
init {
3231
array = context.theme.obtainStyledAttributes(attrs, R.styleable.app, defStyleAttr, 0)
@@ -55,19 +54,11 @@ class LoadingButton @JvmOverloads constructor(
5554
Log.d(TAG, "startLoading: ")
5655
}
5756

58-
override fun setOnClickListener(listener: OnClickListener) {
59-
clickListener = listener
60-
}
61-
6257
private fun initView() {
6358

6459
val view = inflate(context, R.layout.layout_loading_button_lb, null)
6560
addView(view)
6661

67-
view.setOnClickListener {
68-
clickListener.onClick(view)
69-
}
70-
7162
val bg = array?.getResourceId(R.styleable.app_background, 0)
7263

7364
if (bg != 0) {

loadingbutton/src/main/res/layout/layout_loading_button_lb.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
xmlns:tools="http://schemas.android.com/tools"
44
android:id="@+id/btn"
55
style="@style/LoadingButtonStyleLb"
6-
android:clickable="true"
7-
android:focusable="true"
86
android:layout_gravity="center_horizontal"
97
tools:background="@drawable/ic_bg_blue_buttons_style">
108

0 commit comments

Comments
 (0)