Skip to content

Commit 7ffd6b5

Browse files
committed
experimental feature
1 parent 574a1fc commit 7ffd6b5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

checkabletextview/src/main/java/com/devzone/checkabletextview/CheckableTextView.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import android.util.TypedValue
99
import android.view.LayoutInflater
1010
import android.view.View
1111
import android.widget.RelativeLayout
12+
import androidx.annotation.RestrictTo
1213
import androidx.appcompat.app.AppCompatDelegate
1314
import androidx.core.content.ContextCompat
1415
import kotlinx.android.synthetic.main.layout_checkable_text.view.*
@@ -139,6 +140,12 @@ class CheckableTextView : RelativeLayout {
139140
/*-------------------------------------------------public functions------------------------------------------------------------------------------------------*/
140141

141142

143+
144+
/**
145+
* Change [CheckableTextView] click state
146+
* @param isClickable = pass true for enable clicks and false for disable clicks.
147+
*/
148+
@RestrictTo(RestrictTo.Scope.TESTS)
142149
fun setClickEnabled(isClickable: Boolean) {
143150
// 0.5 second delay added to ongoing ripple animation to complete (if any)
144151
rootRL.postDelayed(

0 commit comments

Comments
 (0)