...
 
Commits (3)
package net.dankito.utils.android.extensions
import android.support.v7.widget.RecyclerView
import net.dankito.utils.android.ui.adapter.viewholder.HorizontalDividerItemDecoration
import net.dankito.utils.android.ui.view.recyclerview.HorizontalDividerItemDecoration
fun RecyclerView.addHorizontalDividerItemDecoration() {
......
package net.dankito.utils.android.ui.activities
import java.util.*
class ActivityParameterHolder {
private val parametersHolder = HashMap<String, Any>()
private val resultHolder = HashMap<String, Any>()
fun setParameters(parameters: Any): String {
val id = createId()
parametersHolder.put(id, parameters)
return id
}
fun getParameters(id: String): Any? {
return parametersHolder[id]
}
fun clearParameters(id: String) {
parametersHolder.remove(id)
}
fun setActivityResult(id: String, result: Any) {
resultHolder.put(id, result)
}
fun getActivityResult(id: String): Any? {
return resultHolder[id]
}
fun clearActivityResults(vararg resultIdsToClear: String) {
resultIdsToClear.forEach { resultHolder.remove(it) }
}
fun clearActivityResults() {
resultHolder.clear()
}
private fun createId(): String {
return UUID.randomUUID().toString()
}
}
\ No newline at end of file
package net.dankito.utils.android.ui.image
import android.graphics.drawable.Drawable
import net.dankito.utils.ui.image.Image
class AndroidImage : Image
\ No newline at end of file
class AndroidImage(val drawable: Drawable) : Image
\ No newline at end of file