renaming some Select Contacts screen related views

This commit is contained in:
tibbi
2019-12-05 14:37:10 +01:00
parent f939f77323
commit 2f39253a3c
3 changed files with 21 additions and 25 deletions

View File

@ -75,11 +75,11 @@ class InsertOrEditContactActivity : SimpleActivity() {
}
}
existing_contact_label.setTextColor(getAdjustedPrimaryColor())
select_contact_label.setTextColor(getAdjustedPrimaryColor())
}
private fun gotContacts(contacts: ArrayList<Contact>) {
ContactsAdapter(this, contacts, null, LOCATION_INSERT_OR_EDIT, null, existing_contact_list, existing_contact_fastscroller) {
ContactsAdapter(this, contacts, null, LOCATION_INSERT_OR_EDIT, null, select_contact_list, select_contact_fastscroller) {
val contact = it as Contact
val phoneNumber = getPhoneNumberFromIntent(intent) ?: ""
val email = getEmailFromIntent(intent) ?: ""
@ -100,13 +100,13 @@ class InsertOrEditContactActivity : SimpleActivity() {
startActivityForResult(this, START_EDIT_ACTIVITY)
}
}.apply {
existing_contact_list.adapter = this
select_contact_list.adapter = this
}
existing_contact_fastscroller.setScrollToY(0)
existing_contact_fastscroller.setViews(existing_contact_list) {
val item = (existing_contact_list.adapter as ContactsAdapter).contactItems.getOrNull(it)
existing_contact_fastscroller.updateBubbleText(item?.getBubbleText() ?: "")
select_contact_fastscroller.setScrollToY(0)
select_contact_fastscroller.setViews(select_contact_list) {
val item = (select_contact_list.adapter as ContactsAdapter).contactItems.getOrNull(it)
select_contact_fastscroller.updateBubbleText(item?.getBubbleText() ?: "")
}
}

View File

@ -38,12 +38,11 @@
</RelativeLayout>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/existing_contact_label"
android:id="@+id/select_contact_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/new_contact_holder"
android:layout_marginStart="@dimen/bigger_margin"
android:layout_marginLeft="@dimen/bigger_margin"
android:layout_marginTop="@dimen/small_margin"
android:layout_marginBottom="@dimen/activity_margin"
android:text="@string/add_to_existing_contact"
@ -51,23 +50,23 @@
android:textSize="@dimen/smaller_text_size" />
<com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/existing_contact_list"
android:id="@+id/select_contact_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/existing_contact_label"
android:layout_below="@+id/select_contact_label"
android:clipToPadding="false"
android:scrollbars="none"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
<com.simplemobiletools.commons.views.FastScroller
android:id="@+id/existing_contact_fastscroller"
android:id="@+id/select_contact_fastscroller"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/existing_contact_label"
android:layout_below="@+id/select_contact_label"
android:layout_alignTop="@+id/select_contact_list"
android:layout_alignBottom="@+id/select_contact_list"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:paddingStart="@dimen/normal_margin"
android:paddingLeft="@dimen/normal_margin">
android:paddingStart="@dimen/normal_margin">
<include layout="@layout/fastscroller_handle_vertical" />

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/select_contact_holder"
android:layout_width="match_parent"
@ -47,9 +46,7 @@
android:layout_alignTop="@+id/select_contact_list"
android:layout_alignBottom="@+id/select_contact_list"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:paddingStart="@dimen/normal_margin"
android:paddingLeft="@dimen/normal_margin">
android:paddingStart="@dimen/normal_margin">
<include layout="@layout/fastscroller_handle_vertical" />