count the long pressed items cnt

This commit is contained in:
tibbi 2016-09-18 11:06:43 +02:00
parent 7ae80e70d3
commit 212914e0b4
2 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,6 @@ class DayActivity : SimpleActivity(), NavigationListener {
private val PREFILLED_DAYS = 61
private var mDayCode: String? = null
private var mEvents: MutableList<Event>? = null
private var mSelectedItemsCnt: Int = 0
private var mSnackbar: Snackbar? = null
private var mToBeDeleted: MutableList<Int>? = null
private var mPagerDays: MutableList<String>? = null

View File

@ -26,6 +26,7 @@ class DayFragment : Fragment(), DBHelper.DBOperationsListener, AdapterView.OnIte
private val EDIT_EVENT = 1
private var mTextColor: Int = 0
private var mSelectedItemsCnt: Int = 0
private var mDayCode: String = ""
private var mEvents: MutableList<Event>? = null
private var mListener: NavigationListener? = null
@ -159,18 +160,18 @@ class DayFragment : Fragment(), DBHelper.DBOperationsListener, AdapterView.OnIte
}
override fun onDestroyActionMode(mode: ActionMode) {
//mSelectedItemsCnt = 0
mSelectedItemsCnt = 0
}
override fun onItemCheckedStateChanged(mode: ActionMode, position: Int, id: Long, checked: Boolean) {
/*if (checked) {
if (checked) {
mSelectedItemsCnt++
} else {
mSelectedItemsCnt--
}
mode.title = mSelectedItemsCnt.toString()
mode.invalidate()*/
mode.invalidate()
}
override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {