File tree Expand file tree Collapse file tree
Samples/Advanced/DocumentReader-Kotlin
src/main/java/com/regula/documentreader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,4 +85,5 @@ lint/tmp/
8585# lint/reports/
8686
8787
88- app /src /main /assets /Regula /db.dat
88+ app /src /main /assets /Regula /db.dat
89+ .idea /
Original file line number Diff line number Diff line change @@ -37,16 +37,15 @@ android {
3737 }
3838
3939 compileOptions {
40- sourceCompatibility JavaVersion . VERSION_1_8
41- targetCompatibility JavaVersion . VERSION_1_8
40+ sourceCompatibility JavaVersion . VERSION_11
41+ targetCompatibility JavaVersion . VERSION_11
4242 }
4343 kotlinOptions {
4444 jvmTarget = ' 11'
4545 }
4646}
4747
4848dependencies {
49- implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
5049 implementation ' androidx.core:core-ktx:1.6.0'
5150 implementation ' androidx.appcompat:appcompat:1.3.1'
5251 implementation ' com.google.android.material:material:1.4.0'
@@ -59,7 +58,9 @@ dependencies {
5958 androidTestImplementation ' androidx.test.ext:junit:1.1.3'
6059 androidTestImplementation ' androidx.test.espresso:espresso-core:3.4.0'
6160
61+ // noinspection GradleDynamicVersion
6262 implementation ' com.regula.documentreader.core:fullrfid:5.8.+@aar'
63+ // noinspection GradleDynamicVersion
6364 implementation(' com.regula.documentreader:api:5.8.+@aar' ) {
6465 transitive = true
6566 }
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ class CommonRecyclerAdapter(private val items: List<Base>) :
134134 binding.switcher.isChecked = switch.get() ? : false
135135 binding.switcher.setOnCheckedChangeListener { _, isChecked -> switch.set(isChecked) }
136136
137- val enabled = switch.enabled()
137+ val enabled = switch.enabled() ? : false
138138 binding.switcher.isEnabled = enabled
139139 binding.alphaChanger.alpha = grayedOutAlpha(enabled)
140140 }
@@ -168,7 +168,7 @@ class CommonRecyclerAdapter(private val items: List<Base>) :
168168 stepper.get(),
169169 stepper.valueUnits
170170 )
171- val enabled = stepper.enabled()
171+ val enabled = stepper.enabled() ? : false
172172 binding.plus.isEnabled = enabled
173173 binding.minus.isEnabled = enabled
174174 binding.alphaChanger.alpha = grayedOutAlpha(enabled)
Original file line number Diff line number Diff line change @@ -55,15 +55,15 @@ class Switch(
5555 title : String ,
5656 val get : () -> Boolean? ,
5757 val set : (input: Boolean ) -> Unit ,
58- val enabled : () -> Boolean = { true },
58+ val enabled : () -> Boolean? = { true },
5959) : Base(title)
6060
6161class Stepper (
6262 title : String ,
6363 val valueUnits : String ,
6464 val get : () -> Int? ,
6565 val set : (input: Int ) -> Unit ,
66- val enabled : () -> Boolean = { true },
66+ val enabled : () -> Boolean? = { true },
6767 val step : Int = 1 ,
6868 val min : Int = -1 ,
6969 val addMinusOne : Boolean = false
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
55 mavenCentral()
66 }
77 dependencies {
8- classpath ' com.android.tools.build:gradle:4.2.1 '
8+ classpath ' com.android.tools.build:gradle:7.0.2 '
99 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
1010 }
1111}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6- distributionUrl =https\://services.gradle.org/distributions/gradle-6.7.1 -all.zip
6+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.0.2 -all.zip
You can’t perform that action at this time.
0 commit comments