update commons to 4.3.27

This commit is contained in:
tibbi 2018-07-04 13:38:34 +02:00
parent 5ae891a354
commit 638d8da787
5 changed files with 20 additions and 14 deletions

View File

@ -46,7 +46,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:4.1.7'
implementation 'com.simplemobiletools:commons:4.3.27'
implementation 'joda-time:joda-time:2.9.9'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.android.support:multidex:1.0.3'

View File

@ -36,10 +36,10 @@ class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList<Event>, r
override fun prepareActionMode(menu: Menu) {}
override fun prepareItemSelection(view: View) {}
override fun prepareItemSelection(viewHolder: ViewHolder) {}
override fun markItemSelection(select: Boolean, view: View?) {
view?.event_item_frame?.isSelected = select
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {
viewHolder?.itemView?.event_item_frame?.isSelected = select
}
override fun actionItemPressed(id: Int) {
@ -51,11 +51,13 @@ class DayEventsAdapter(activity: SimpleActivity, val events: ArrayList<Event>, r
override fun getSelectableItemCount() = events.size
override fun getIsItemSelectable(position: Int) = true
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.event_item_day_view, parent)
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
val event = events[position]
val view = holder.bindView(event) { itemView, layoutPosition ->
val view = holder.bindView(event, true, true) { itemView, layoutPosition ->
setupView(itemView, event)
}
bindViewHolder(holder, position, view)

View File

@ -62,10 +62,10 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
override fun prepareActionMode(menu: Menu) {}
override fun prepareItemSelection(view: View) {}
override fun prepareItemSelection(viewHolder: ViewHolder) {}
override fun markItemSelection(select: Boolean, view: View?) {
view?.event_item_frame?.isSelected = select
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {
viewHolder?.itemView?.event_item_frame?.isSelected = select
}
override fun actionItemPressed(id: Int) {
@ -77,6 +77,8 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
override fun getSelectableItemCount() = listItems.filter { it is ListEvent }.size
override fun getIsItemSelectable(position: Int) = listItems[position] is ListEvent
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyRecyclerViewAdapter.ViewHolder {
val layoutId = when (viewType) {
ITEM_EVENT -> R.layout.event_list_item
@ -88,7 +90,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
val listItem = listItems[position]
val view = holder.bindView(listItem, allowLongClick) { itemView, layoutPosition ->
val view = holder.bindView(listItem, true, allowLongClick) { itemView, layoutPosition ->
if (listItem is ListSection) {
setupListSection(itemView, listItem, position)
} else if (listItem is ListEvent) {

View File

@ -31,10 +31,10 @@ class ManageEventTypesAdapter(activity: SimpleActivity, val eventTypes: ArrayLis
override fun prepareActionMode(menu: Menu) {}
override fun prepareItemSelection(view: View) {}
override fun prepareItemSelection(viewHolder: ViewHolder) {}
override fun markItemSelection(select: Boolean, view: View?) {
view?.event_item_frame?.isSelected = select
override fun markViewHolderSelection(select: Boolean, viewHolder: ViewHolder?) {
viewHolder?.itemView?.event_item_frame?.isSelected = select
}
override fun actionItemPressed(id: Int) {
@ -45,11 +45,13 @@ class ManageEventTypesAdapter(activity: SimpleActivity, val eventTypes: ArrayLis
override fun getSelectableItemCount() = eventTypes.size
override fun getIsItemSelectable(position: Int) = true
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_event_type, parent)
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val eventType = eventTypes[position]
val view = holder.bindView(eventType) { itemView, layoutPosition ->
val view = holder.bindView(eventType, true, true) { itemView, layoutPosition ->
setupView(itemView, eventType)
}
bindViewHolder(holder, position, view)

View File

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.41'
ext.kotlin_version = '1.2.50'
repositories {
jcenter()