Added empty string val.
This commit is contained in:
parent
5113edc458
commit
083d2a7097
1 changed files with 5 additions and 3 deletions
|
@ -56,6 +56,7 @@ import java.util.*
|
||||||
|
|
||||||
@RuntimePermissions
|
@RuntimePermissions
|
||||||
class ProgrammingActivity : AppCompatActivity(), AnkoLogger {
|
class ProgrammingActivity : AppCompatActivity(), AnkoLogger {
|
||||||
|
val empty = ""
|
||||||
|
|
||||||
inline fun ViewManager.autofitTextView(theme: Int = 0, init: AutoResizeTextView.() -> Unit) = ankoView({ AutoResizeTextView(it) }, theme, init)
|
inline fun ViewManager.autofitTextView(theme: Int = 0, init: AutoResizeTextView.() -> Unit) = ankoView({ AutoResizeTextView(it) }, theme, init)
|
||||||
|
|
||||||
|
@ -166,19 +167,20 @@ class ProgrammingActivity : AppCompatActivity(), AnkoLogger {
|
||||||
val begin = if (params.begin.isNotBlank()) {
|
val begin = if (params.begin.isNotBlank()) {
|
||||||
"${params.begin}${MainActivity.PAUSE}"
|
"${params.begin}${MainActivity.PAUSE}"
|
||||||
} else {
|
} else {
|
||||||
""
|
empty
|
||||||
}
|
}
|
||||||
|
|
||||||
val end = if (params.end.isNotBlank()) {
|
val end = if (params.end.isNotBlank()) {
|
||||||
"${MainActivity.PAUSE}${params.end}"
|
"${MainActivity.PAUSE}${params.end}"
|
||||||
} else {
|
} else {
|
||||||
""
|
empty
|
||||||
}
|
}
|
||||||
|
|
||||||
startActivity<StepsActivity>(
|
startActivity<StepsActivity>(
|
||||||
StepsActivity.EXTRA_STEPS to "$begin$dtmf$end".split(','))
|
StepsActivity.EXTRA_STEPS to "$begin$dtmf$end".split(','))
|
||||||
} else {
|
} else {
|
||||||
Snackbar.make(this@coordinatorLayout, getString(R.string.error_invalid_dtmf, dtmf),
|
Snackbar.make(this@coordinatorLayout,
|
||||||
|
getString(R.string.error_invalid_dtmf, dtmf),
|
||||||
Snackbar.LENGTH_LONG).show()
|
Snackbar.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue