show the account source at the details view

This commit is contained in:
tibbi 2017-12-13 13:59:54 +01:00
parent 51030dbff1
commit d290645d5d
6 changed files with 37 additions and 0 deletions

View file

@ -104,11 +104,13 @@ class ContactActivity : SimpleActivity() {
contact_name_image.applyColorFilter(textColor)
contact_number_image.applyColorFilter(textColor)
contact_email_image.applyColorFilter(textColor)
contact_source_image.applyColorFilter(textColor)
contact_photo.setOnClickListener { }
contact_send_sms.setOnClickListener { sendSMSIntent(contact!!.number) }
contact_start_call.setOnClickListener { startCallIntent(contact!!.number) }
contact_send_email.setOnClickListener { sendEmailIntent(contact!!.email) }
contact_source.setOnClickListener { showAccountSourcePicker() }
updateTextColors(contact_scrollview)
wasActivityInitialized = true
@ -140,6 +142,7 @@ class ContactActivity : SimpleActivity() {
contact_surname.setText(contact!!.surname)
contact_number.setText(contact!!.number)
contact_email.setText(contact!!.email)
contact_source.text = contact!!.source
}
private fun setupNewContact() {
@ -162,4 +165,8 @@ class ContactActivity : SimpleActivity() {
private fun deleteContact() {
}
private fun showAccountSourcePicker() {
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/contact_scrollview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -169,5 +170,34 @@
android:singleLine="true"
android:textSize="@dimen/big_text_size"/>
<ImageView
android:id="@+id/contact_source_image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/contact_source"
android:layout_alignTop="@+id/contact_source"
android:paddingBottom="@dimen/medium_margin"
android:paddingTop="@dimen/medium_margin"
android:src="@drawable/ic_account_box"/>
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/contact_source"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/contact_email"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/medium_margin"
android:layout_marginTop="@dimen/activity_margin"
android:layout_toRightOf="@+id/contact_name_image"
android:background="?attr/selectableItemBackground"
android:lines="1"
android:maxLines="1"
android:paddingBottom="@dimen/normal_margin"
android:paddingLeft="@dimen/small_margin"
android:paddingTop="@dimen/normal_margin"
android:singleLine="true"
android:textSize="@dimen/big_text_size"
tools:text="hello@simplemobiletools.com"/>
</RelativeLayout>
</ScrollView>