update commons to 4.3.28
This commit is contained in:
parent
867b499eab
commit
21551a6050
|
@ -45,7 +45,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:4.2.6'
|
||||
implementation 'com.simplemobiletools:commons:4.3.28'
|
||||
implementation 'joda-time:joda-time:2.9.9'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ class GroupContactsActivity : SimpleActivity(), RemoveFromGroupListener, Refresh
|
|||
group_contacts_list.adapter = this
|
||||
}
|
||||
|
||||
group_contacts_fastscroller.setScrollTo(0)
|
||||
group_contacts_fastscroller.setScrollToY(0)
|
||||
group_contacts_fastscroller.setViews(group_contacts_list) {
|
||||
val item = (group_contacts_list.adapter as ContactsAdapter).contactItems.getOrNull(it)
|
||||
group_contacts_fastscroller.updateBubbleText(item?.getBubbleText() ?: "")
|
||||
|
|
|
@ -96,6 +96,8 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
|
||||
override fun getSelectableItemCount() = contactItems.size
|
||||
|
||||
override fun getIsItemSelectable(position: Int) = true
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||
val layout = if (showPhoneNumbers) R.layout.item_contact_with_number else R.layout.item_contact_without_number
|
||||
return createViewHolder(layout, parent)
|
||||
|
@ -103,7 +105,7 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
|
||||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||
val contact = contactItems[position]
|
||||
val view = holder.bindView(contact, true) { itemView, layoutPosition ->
|
||||
val view = holder.bindView(contact, true, true) { itemView, layoutPosition ->
|
||||
setupView(itemView, contact)
|
||||
}
|
||||
bindViewHolder(holder, position, view)
|
||||
|
|
|
@ -37,7 +37,7 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
|
|||
|
||||
override fun prepareActionMode(menu: Menu) {
|
||||
menu.apply {
|
||||
findItem(R.id.cab_edit).isVisible = isOneItemSelected()
|
||||
findItem(R.id.cab_rename).isVisible = isOneItemSelected()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
|
|||
}
|
||||
|
||||
when (id) {
|
||||
R.id.cab_edit -> editGroup()
|
||||
R.id.cab_rename -> renameGroup()
|
||||
R.id.cab_select_all -> selectAll()
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
}
|
||||
|
@ -61,11 +61,13 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
|
|||
|
||||
override fun getSelectableItemCount() = groups.size
|
||||
|
||||
override fun getIsItemSelectable(position: Int) = true
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = createViewHolder(R.layout.item_group, parent)
|
||||
|
||||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||
val group = groups[position]
|
||||
val view = holder.bindView(group, true) { itemView, layoutPosition ->
|
||||
val view = holder.bindView(group, true, true) { itemView, layoutPosition ->
|
||||
setupView(itemView, group)
|
||||
}
|
||||
bindViewHolder(holder, position, view)
|
||||
|
@ -80,7 +82,7 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val
|
|||
fastScroller?.measureRecyclerView()
|
||||
}
|
||||
|
||||
private fun editGroup() {
|
||||
private fun renameGroup() {
|
||||
RenameGroupDialog(activity, groups[selectedPositions.first()]) {
|
||||
finishActMode()
|
||||
refreshListener?.refreshContacts(GROUPS_TAB_MASK)
|
||||
|
|
|
@ -150,7 +150,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
fragment_list.adapter = this
|
||||
}
|
||||
|
||||
fragment_fastscroller.setScrollTo(0)
|
||||
fragment_fastscroller.setScrollToY(0)
|
||||
fragment_fastscroller.setViews(fragment_list) {
|
||||
val item = (fragment_list.adapter as GroupsAdapter).groups.getOrNull(it)
|
||||
fragment_fastscroller.updateBubbleText(item?.getBubbleText() ?: "")
|
||||
|
@ -190,7 +190,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
fragment_list.adapter = this
|
||||
}
|
||||
|
||||
fragment_fastscroller.setScrollTo(0)
|
||||
fragment_fastscroller.setScrollToY(0)
|
||||
fragment_fastscroller.setViews(fragment_list) {
|
||||
val item = (fragment_list.adapter as ContactsAdapter).contactItems.getOrNull(it)
|
||||
fragment_fastscroller.updateBubbleText(item?.getBubbleText() ?: "")
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/cab_edit"
|
||||
android:icon="@drawable/ic_rename"
|
||||
android:icon="@drawable/ic_edit"
|
||||
android:title="@string/edit_contact"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/cab_edit"
|
||||
android:icon="@drawable/ic_rename"
|
||||
android:title="@string/edit_contact"
|
||||
android:id="@+id/cab_rename"
|
||||
android:icon="@drawable/ic_rename_new"
|
||||
android:title="@string/rename"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/cab_select_all"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/edit"
|
||||
android:icon="@drawable/ic_rename"
|
||||
android:icon="@drawable/ic_edit"
|
||||
android:title="@string/edit_contact"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
|
|
Loading…
Reference in New Issue