Skip to content

Commit bc34b2e

Browse files
fix minor bugs
1 parent 5ad0bc5 commit bc34b2e

File tree

6 files changed

+18
-35
lines changed

6 files changed

+18
-35
lines changed

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

widget/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ apply plugin: 'kotlin-android'
44
android {
55
compileSdkVersion 28
66

7-
8-
97
defaultConfig {
108
minSdkVersion 19
119
targetSdkVersion 28

widget/src/main/java/com/taleb/widget/SingleChoiceView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class SingleChoiceView : LinearLayout, View.OnClickListener {
156156
}
157157

158158
override fun onClick(p0: View?) {
159-
if (p0 == null) {
159+
if (p0 == null || !isEnabled) {
160160
return
161161
}
162162
val pos = this.indexOfChild(p0)
@@ -170,7 +170,7 @@ class SingleChoiceView : LinearLayout, View.OnClickListener {
170170

171171
fun selectPosition(selectedPosition: Int) {
172172
this.selectedPosition = selectedPosition
173-
for (i in 0..(choices.size - 1)) {
173+
for (i in 0 until choices.size) {
174174
val txtView = this.getChildAt(i) as TextView
175175
val backDrwble = DrawableBuilder()
176176
.rectangle()

0 commit comments

Comments
 (0)