Kotlin 1.1 update.
This commit is contained in:
parent
f2c7019453
commit
e5ada7422e
5 changed files with 24 additions and 11 deletions
|
@ -29,14 +29,14 @@ dependencies {
|
|||
|
||||
testCompile 'junit:junit:4.12'
|
||||
|
||||
compile 'com.android.support:support-v13:25.0.1'
|
||||
compile 'com.android.support:appcompat-v7:25.0.1'
|
||||
compile 'com.android.support:support-v13:25.2.0'
|
||||
compile 'com.android.support:appcompat-v7:25.2.0'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
compile 'org.jetbrains.anko:anko-sdk23:0.9.1'
|
||||
compile 'org.jetbrains.anko:anko-appcompat-v7:0.9.1'
|
||||
compile 'org.jetbrains.anko:anko-support-v4:0.9.1'
|
||||
compile 'org.jetbrains.anko:anko-design:0.9.1'
|
||||
compile 'com.android.support:design:25.0.1'
|
||||
compile 'com.android.support:design:25.2.0'
|
||||
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
|
||||
|
||||
// https://github.com/JakeWharton/ViewPagerIndicator
|
||||
|
@ -51,7 +51,6 @@ dependencies {
|
|||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'https://dl.bintray.com/jetbrains/anko/'}
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
|
|
|
@ -76,9 +76,9 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
|
|||
val PAUSE = ','
|
||||
}
|
||||
|
||||
inline fun ViewManager.textInputEditText(theme: Int = 0, init: TextInputEditText.() -> Unit) = ankoView({ TextInputEditText(it) }, theme, init)
|
||||
inline fun ViewManager.textInputEditText(theme: Int = 0, init: TextInputEditText.() -> Unit) = ankoView(::TextInputEditText, theme, init)
|
||||
|
||||
fun fromHtml(s: String) : Spanned {
|
||||
fun fromHtml(s: String): Spanned {
|
||||
if (Build.VERSION.SDK_INT >= 24) {
|
||||
return Html.fromHtml(s, Html.FROM_HTML_MODE_LEGACY)
|
||||
} else {
|
||||
|
@ -181,7 +181,7 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
|
|||
// phone
|
||||
textInputLayout {
|
||||
horizontalPadding = dip(40)
|
||||
val editText = textInputEditText() {
|
||||
val editText = textInputEditText {
|
||||
lparams(width = matchParent)
|
||||
inputType = InputType.TYPE_CLASS_PHONE
|
||||
hint = getString(R.string.hint_phone_number)
|
||||
|
@ -204,7 +204,7 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
|
|||
// master code
|
||||
textInputLayout {
|
||||
horizontalPadding = dip(40)
|
||||
val editText = textInputEditText() {
|
||||
val editText = textInputEditText {
|
||||
lparams(width = matchParent)
|
||||
inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_VARIATION_PASSWORD
|
||||
hint = getString(R.string.hint_master_code)
|
||||
|
@ -456,7 +456,7 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
|
|||
if (field == null) {
|
||||
errors.append(getString(
|
||||
R.string.validate_syntax_error,
|
||||
"opts[${i+1}], field[$j]"))
|
||||
"opts[${i + 1}], field[$j]"))
|
||||
} else {
|
||||
with(field) {
|
||||
// size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue