Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '3.14.1' propVersionName = '3.14.2' kotlin_version = '1.2.21' support_libs = '27.0.2' } Loading commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/CreateNewFolderDialog.kt +1 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ package com.simplemobiletools.commons.dialogs import android.support.v7.app.AlertDialog import android.view.View import android.view.WindowManager import com.simplemobiletools.commons.R import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.extensions.* Loading @@ -18,8 +17,8 @@ class CreateNewFolderDialog(val activity: BaseSimpleActivity, val path: String, .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) activity.setupDialogStuff(view, this, R.string.create_new_folder) { showKeyboard(view.folder_name) getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener { val name = view.folder_name.value when { Loading commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/RenameItemDialog.kt +1 −2 Original line number Diff line number Diff line package com.simplemobiletools.commons.dialogs import android.support.v7.app.AlertDialog import android.view.WindowManager import com.simplemobiletools.commons.R import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.extensions.* Loading Loading @@ -32,8 +31,8 @@ class RenameItemDialog(val activity: BaseSimpleActivity, val path: String, val c .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) activity.setupDialogStuff(view, this, R.string.rename) { showKeyboard(view.rename_item_name) getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { var newName = view.rename_item_name.value val newExtension = view.rename_item_extension.value Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/AlertDialog.kt 0 → 100644 +14 −0 Original line number Diff line number Diff line package com.simplemobiletools.commons.extensions import android.support.v7.app.AlertDialog import android.view.WindowManager import android.widget.EditText fun AlertDialog.showKeyboard(editText: EditText) { window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) editText.apply { onGlobalLayout { setSelection(text.toString().length) } } } Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '3.14.1' propVersionName = '3.14.2' kotlin_version = '1.2.21' support_libs = '27.0.2' } Loading
commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/CreateNewFolderDialog.kt +1 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ package com.simplemobiletools.commons.dialogs import android.support.v7.app.AlertDialog import android.view.View import android.view.WindowManager import com.simplemobiletools.commons.R import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.extensions.* Loading @@ -18,8 +17,8 @@ class CreateNewFolderDialog(val activity: BaseSimpleActivity, val path: String, .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) activity.setupDialogStuff(view, this, R.string.create_new_folder) { showKeyboard(view.folder_name) getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener { val name = view.folder_name.value when { Loading
commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/RenameItemDialog.kt +1 −2 Original line number Diff line number Diff line package com.simplemobiletools.commons.dialogs import android.support.v7.app.AlertDialog import android.view.WindowManager import com.simplemobiletools.commons.R import com.simplemobiletools.commons.activities.BaseSimpleActivity import com.simplemobiletools.commons.extensions.* Loading Loading @@ -32,8 +31,8 @@ class RenameItemDialog(val activity: BaseSimpleActivity, val path: String, val c .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) activity.setupDialogStuff(view, this, R.string.rename) { showKeyboard(view.rename_item_name) getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { var newName = view.rename_item_name.value val newExtension = view.rename_item_extension.value Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/AlertDialog.kt 0 → 100644 +14 −0 Original line number Diff line number Diff line package com.simplemobiletools.commons.extensions import android.support.v7.app.AlertDialog import android.view.WindowManager import android.widget.EditText fun AlertDialog.showKeyboard(editText: EditText) { window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE) editText.apply { onGlobalLayout { setSelection(text.toString().length) } } }