Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 21 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '5.0.21' propVersionName = '5.0.22' kotlin_version = '1.2.71' } Loading commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +15 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,21 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected fun isKeySelected(key: Int) = selectedKeys.contains(key) protected fun getSelectedItemPositions(keys: List<Int>, sortDescending: Boolean = true): ArrayList<Int> { val positions = ArrayList<Int>() keys.forEach { val position = getItemKeyPosition(it) if (position != -1) { positions.add(position) } } if (sortDescending) { positions.sortDescending() } return positions } protected fun selectAll() { val cnt = itemCount - positionOffset for (i in 0 until cnt) { Loading Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 21 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '5.0.21' propVersionName = '5.0.22' kotlin_version = '1.2.71' } Loading
commons/src/main/kotlin/com/simplemobiletools/commons/adapters/MyRecyclerViewAdapter.kt +15 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,21 @@ abstract class MyRecyclerViewAdapter(val activity: BaseSimpleActivity, val recyc protected fun isKeySelected(key: Int) = selectedKeys.contains(key) protected fun getSelectedItemPositions(keys: List<Int>, sortDescending: Boolean = true): ArrayList<Int> { val positions = ArrayList<Int>() keys.forEach { val position = getItemKeyPosition(it) if (position != -1) { positions.add(position) } } if (sortDescending) { positions.sortDescending() } return positions } protected fun selectAll() { val cnt = itemCount - positionOffset for (i in 0 until cnt) { Loading