mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
display contact organization on the View Details screen
This commit is contained in:
@ -123,6 +123,7 @@ class ViewContactActivity : ContactActivity() {
|
|||||||
contact_event_image.applyColorFilter(textColor)
|
contact_event_image.applyColorFilter(textColor)
|
||||||
contact_source_image.applyColorFilter(textColor)
|
contact_source_image.applyColorFilter(textColor)
|
||||||
contact_notes_image.applyColorFilter(textColor)
|
contact_notes_image.applyColorFilter(textColor)
|
||||||
|
contact_organization_image.applyColorFilter(textColor)
|
||||||
contact_groups_image.applyColorFilter(textColor)
|
contact_groups_image.applyColorFilter(textColor)
|
||||||
|
|
||||||
contact_send_sms.setOnClickListener { trySendSMS() }
|
contact_send_sms.setOnClickListener { trySendSMS() }
|
||||||
@ -164,6 +165,7 @@ class ViewContactActivity : ContactActivity() {
|
|||||||
setupAddresses()
|
setupAddresses()
|
||||||
setupEvents()
|
setupEvents()
|
||||||
setupNotes()
|
setupNotes()
|
||||||
|
setupOrganization()
|
||||||
setupGroups()
|
setupGroups()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,6 +253,13 @@ class ViewContactActivity : ContactActivity() {
|
|||||||
contact_notes.beVisibleIf(notes.isNotEmpty())
|
contact_notes.beVisibleIf(notes.isNotEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupOrganization() {
|
||||||
|
val organization = contact!!.organization
|
||||||
|
contact_organization.text = organization
|
||||||
|
contact_organization_image.beVisibleIf(organization.isNotEmpty())
|
||||||
|
contact_organization.beVisibleIf(organization.isNotEmpty())
|
||||||
|
}
|
||||||
|
|
||||||
private fun setupGroups() {
|
private fun setupGroups() {
|
||||||
contact_groups_holder.removeAllViews()
|
contact_groups_holder.removeAllViews()
|
||||||
val groups = contact!!.groups
|
val groups = contact!!.groups
|
||||||
|
BIN
app/src/main/res/drawable-hdpi/ic_business.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_business.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 152 B |
BIN
app/src/main/res/drawable-xhdpi/ic_business.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_business.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_business.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_business.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_business.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_business.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 114 B |
@ -239,6 +239,30 @@
|
|||||||
android:paddingTop="@dimen/normal_margin"
|
android:paddingTop="@dimen/normal_margin"
|
||||||
android:textSize="@dimen/bigger_text_size"/>
|
android:textSize="@dimen/bigger_text_size"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/contact_organization_image"
|
||||||
|
android:layout_width="@dimen/contact_icons_size"
|
||||||
|
android:layout_height="@dimen/contact_icons_size"
|
||||||
|
android:layout_alignTop="@+id/contact_organization"
|
||||||
|
android:paddingBottom="@dimen/small_margin"
|
||||||
|
android:paddingEnd="@dimen/small_margin"
|
||||||
|
android:paddingRight="@dimen/small_margin"
|
||||||
|
android:paddingTop="@dimen/medium_margin"
|
||||||
|
android:src="@drawable/ic_business"/>
|
||||||
|
|
||||||
|
<com.simplemobiletools.commons.views.MyTextView
|
||||||
|
android:id="@+id/contact_organization"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/contact_notes"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toRightOf="@+id/contact_organization_image"
|
||||||
|
android:lineSpacingExtra="@dimen/medium_margin"
|
||||||
|
android:paddingBottom="@dimen/normal_margin"
|
||||||
|
android:paddingLeft="@dimen/small_margin"
|
||||||
|
android:paddingTop="@dimen/normal_margin"
|
||||||
|
android:textSize="@dimen/bigger_text_size"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/contact_groups_image"
|
android:id="@+id/contact_groups_image"
|
||||||
android:layout_width="@dimen/contact_icons_size"
|
android:layout_width="@dimen/contact_icons_size"
|
||||||
@ -254,7 +278,7 @@
|
|||||||
android:id="@+id/contact_groups_holder"
|
android:id="@+id/contact_groups_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/contact_notes"
|
android:layout_below="@+id/contact_organization"
|
||||||
android:layout_toRightOf="@+id/contact_name_image"
|
android:layout_toRightOf="@+id/contact_name_image"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="@dimen/small_margin"/>
|
android:paddingLeft="@dimen/small_margin"/>
|
||||||
|
Reference in New Issue
Block a user