mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
show the account source at the details view
This commit is contained in:
@ -104,11 +104,13 @@ class ContactActivity : SimpleActivity() {
|
|||||||
contact_name_image.applyColorFilter(textColor)
|
contact_name_image.applyColorFilter(textColor)
|
||||||
contact_number_image.applyColorFilter(textColor)
|
contact_number_image.applyColorFilter(textColor)
|
||||||
contact_email_image.applyColorFilter(textColor)
|
contact_email_image.applyColorFilter(textColor)
|
||||||
|
contact_source_image.applyColorFilter(textColor)
|
||||||
|
|
||||||
contact_photo.setOnClickListener { }
|
contact_photo.setOnClickListener { }
|
||||||
contact_send_sms.setOnClickListener { sendSMSIntent(contact!!.number) }
|
contact_send_sms.setOnClickListener { sendSMSIntent(contact!!.number) }
|
||||||
contact_start_call.setOnClickListener { startCallIntent(contact!!.number) }
|
contact_start_call.setOnClickListener { startCallIntent(contact!!.number) }
|
||||||
contact_send_email.setOnClickListener { sendEmailIntent(contact!!.email) }
|
contact_send_email.setOnClickListener { sendEmailIntent(contact!!.email) }
|
||||||
|
contact_source.setOnClickListener { showAccountSourcePicker() }
|
||||||
|
|
||||||
updateTextColors(contact_scrollview)
|
updateTextColors(contact_scrollview)
|
||||||
wasActivityInitialized = true
|
wasActivityInitialized = true
|
||||||
@ -140,6 +142,7 @@ class ContactActivity : SimpleActivity() {
|
|||||||
contact_surname.setText(contact!!.surname)
|
contact_surname.setText(contact!!.surname)
|
||||||
contact_number.setText(contact!!.number)
|
contact_number.setText(contact!!.number)
|
||||||
contact_email.setText(contact!!.email)
|
contact_email.setText(contact!!.email)
|
||||||
|
contact_source.text = contact!!.source
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupNewContact() {
|
private fun setupNewContact() {
|
||||||
@ -162,4 +165,8 @@ class ContactActivity : SimpleActivity() {
|
|||||||
private fun deleteContact() {
|
private fun deleteContact() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showAccountSourcePicker() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
BIN
app/src/main/res/drawable-hdpi/ic_account_box.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_account_box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 350 B |
BIN
app/src/main/res/drawable-xhdpi/ic_account_box.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_account_box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 482 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_account_box.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_account_box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 658 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_account_box.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_account_box.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 929 B |
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView
|
<ScrollView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/contact_scrollview"
|
android:id="@+id/contact_scrollview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
@ -169,5 +170,34 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="@dimen/big_text_size"/>
|
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>
|
</RelativeLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
Reference in New Issue
Block a user