Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '4.2.10' propVersionName = '4.3.27' kotlin_version = '1.2.50' support_libs = '27.1.1' } Loading commons/src/main/kotlin/com/simplemobiletools/commons/activities/LicenseActivity.kt +4 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ class LicenseActivity : BaseSimpleActivity() { License(LICENSE_ESPRESSO, R.string.espresso_title, R.string.espresso_text, R.string.espresso_url), License(LICENSE_GSON, R.string.gson_title, R.string.gson_text, R.string.gson_url), License(LICENSE_LEAK_CANARY, R.string.leak_canary_title, R.string.leakcanary_text, R.string.leakcanary_url), License(LICENSE_NUMBER_PICKER, R.string.number_picker_title, R.string.number_picker_text, R.string.number_picker_url) License(LICENSE_NUMBER_PICKER, R.string.number_picker_title, R.string.number_picker_text, R.string.number_picker_url), License(LICENSE_EXOPLAYER, R.string.exoplayer_title, R.string.exoplayer_text, R.string.exoplayer_url), License(LICENSE_PANORAMA_VIEW, R.string.panorama_view_title, R.string.panorama_view_text, R.string.panorama_view_url), License(LICENSE_SANSELAN, R.string.sanselan_title, R.string.sanselan_text, R.string.sanselan_url) ) } commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class FilepickerItemsAdapter(activity: BaseSimpleActivity, val fileDirItems: Lis override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) { val fileDirItem = fileDirItems[position] val view = holder.bindView(fileDirItem, false) { itemView, adapterPosition -> val view = holder.bindView(fileDirItem, true, false) { itemView, adapterPosition -> setupView(itemView, fileDirItem) } bindViewHolder(holder, position, view) Loading commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +6 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected fun isOneItemSelected() = selectedPositions.size == 1 init { fastScroller?.resetScrollPositions() } protected fun toggleItemSelection(select: Boolean, pos: Int) { if (select && !getIsItemSelectable(pos)) { return Loading Loading @@ -300,11 +304,11 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc open class ViewHolder(view: View, val adapterListener: MyAdapterListener? = null, val activity: BaseSimpleActivity? = null, val multiSelectorCallback: ModalMultiSelectorCallback? = null, val multiSelector: MultiSelector, val positionOffset: Int = 0, val itemClick: ((Any) -> (Unit))? = null) : SwappingHolder(view, multiSelector) { fun bindView(any: Any, allowLongClick: Boolean = true, callback: (itemView: View, adapterPosition: Int) -> Unit): View { fun bindView(any: Any, allowSingleClick: Boolean, allowLongClick: Boolean, callback: (itemView: View, adapterPosition: Int) -> Unit): View { return itemView.apply { callback(this, adapterPosition) if (isClickable) { if (allowSingleClick) { setOnClickListener { viewClicked(any) } setOnLongClickListener { if (allowLongClick) viewLongClicked() else viewClicked(any); true } } else { Loading commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/FilePickerDialog.kt +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ class FilePickerDialog(val activity: BaseSimpleActivity, layoutManager.onRestoreInstanceState(mScrollStates[currPath.trimEnd('/')]) filepicker_list.onGlobalLayout { filepicker_fastscroller.setScrollTo(filepicker_list.computeVerticalScrollOffset()) filepicker_fastscroller.setScrollToY(filepicker_list.computeVerticalScrollOffset()) } } Loading Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '4.2.10' propVersionName = '4.3.27' kotlin_version = '1.2.50' support_libs = '27.1.1' } Loading
commons/src/main/kotlin/com/simplemobiletools/commons/activities/LicenseActivity.kt +4 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ class LicenseActivity : BaseSimpleActivity() { License(LICENSE_ESPRESSO, R.string.espresso_title, R.string.espresso_text, R.string.espresso_url), License(LICENSE_GSON, R.string.gson_title, R.string.gson_text, R.string.gson_url), License(LICENSE_LEAK_CANARY, R.string.leak_canary_title, R.string.leakcanary_text, R.string.leakcanary_url), License(LICENSE_NUMBER_PICKER, R.string.number_picker_title, R.string.number_picker_text, R.string.number_picker_url) License(LICENSE_NUMBER_PICKER, R.string.number_picker_title, R.string.number_picker_text, R.string.number_picker_url), License(LICENSE_EXOPLAYER, R.string.exoplayer_title, R.string.exoplayer_text, R.string.exoplayer_url), License(LICENSE_PANORAMA_VIEW, R.string.panorama_view_title, R.string.panorama_view_text, R.string.panorama_view_url), License(LICENSE_SANSELAN, R.string.sanselan_title, R.string.sanselan_text, R.string.sanselan_url) ) }
commons/src/main/kotlin/com/simplemobiletools/commons/adapters/FilepickerItemsAdapter.kt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class FilepickerItemsAdapter(activity: BaseSimpleActivity, val fileDirItems: Lis override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) { val fileDirItem = fileDirItems[position] val view = holder.bindView(fileDirItem, false) { itemView, adapterPosition -> val view = holder.bindView(fileDirItem, true, false) { itemView, adapterPosition -> setupView(itemView, fileDirItem) } bindViewHolder(holder, position, view) Loading
commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +6 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,10 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected fun isOneItemSelected() = selectedPositions.size == 1 init { fastScroller?.resetScrollPositions() } protected fun toggleItemSelection(select: Boolean, pos: Int) { if (select && !getIsItemSelectable(pos)) { return Loading Loading @@ -300,11 +304,11 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc open class ViewHolder(view: View, val adapterListener: MyAdapterListener? = null, val activity: BaseSimpleActivity? = null, val multiSelectorCallback: ModalMultiSelectorCallback? = null, val multiSelector: MultiSelector, val positionOffset: Int = 0, val itemClick: ((Any) -> (Unit))? = null) : SwappingHolder(view, multiSelector) { fun bindView(any: Any, allowLongClick: Boolean = true, callback: (itemView: View, adapterPosition: Int) -> Unit): View { fun bindView(any: Any, allowSingleClick: Boolean, allowLongClick: Boolean, callback: (itemView: View, adapterPosition: Int) -> Unit): View { return itemView.apply { callback(this, adapterPosition) if (isClickable) { if (allowSingleClick) { setOnClickListener { viewClicked(any) } setOnLongClickListener { if (allowLongClick) viewLongClicked() else viewClicked(any); true } } else { Loading
commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/FilePickerDialog.kt +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ class FilePickerDialog(val activity: BaseSimpleActivity, layoutManager.onRestoreInstanceState(mScrollStates[currPath.trimEnd('/')]) filepicker_list.onGlobalLayout { filepicker_fastscroller.setScrollTo(filepicker_list.computeVerticalScrollOffset()) filepicker_fastscroller.setScrollToY(filepicker_list.computeVerticalScrollOffset()) } } Loading