add Plus buttons for adding new numbers and emails
This commit is contained in:
parent
417c6edc6e
commit
1599334ee0
|
@ -68,9 +68,9 @@ class ContactActivity : SimpleActivity() {
|
||||||
setupEditContact()
|
setupEditContact()
|
||||||
}
|
}
|
||||||
|
|
||||||
//contact_send_sms.beVisibleIf(contact!!.number.isNotEmpty())
|
contact_send_sms.beVisibleIf(contact!!.phoneNumbers.isNotEmpty())
|
||||||
//contact_start_call.beVisibleIf(contact!!.number.isNotEmpty())
|
contact_start_call.beVisibleIf(contact!!.phoneNumbers.isNotEmpty())
|
||||||
//contact_send_email.beVisibleIf(contact!!.email.isNotEmpty())
|
contact_send_email.beVisibleIf(contact!!.emails.isNotEmpty())
|
||||||
|
|
||||||
contact_photo.background = ColorDrawable(config.primaryColor)
|
contact_photo.background = ColorDrawable(config.primaryColor)
|
||||||
|
|
||||||
|
@ -103,6 +103,10 @@ class ContactActivity : SimpleActivity() {
|
||||||
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_source_image.applyColorFilter(textColor)
|
||||||
|
contact_number_add_new.applyColorFilter(config.primaryColor)
|
||||||
|
contact_number_add_new.background.applyColorFilter(textColor)
|
||||||
|
contact_email_add_new.applyColorFilter(config.primaryColor)
|
||||||
|
contact_email_add_new.background.applyColorFilter(textColor)
|
||||||
|
|
||||||
contact_photo.setOnClickListener { }
|
contact_photo.setOnClickListener { }
|
||||||
//contact_send_sms.setOnClickListener { sendSMSIntent(contact!!.number) }
|
//contact_send_sms.setOnClickListener { sendSMSIntent(contact!!.number) }
|
||||||
|
@ -111,6 +115,8 @@ class ContactActivity : SimpleActivity() {
|
||||||
contact_source.setOnClickListener { showAccountSourcePicker() }
|
contact_source.setOnClickListener { showAccountSourcePicker() }
|
||||||
contact_number_type.setOnClickListener { }
|
contact_number_type.setOnClickListener { }
|
||||||
contact_email_type.setOnClickListener { }
|
contact_email_type.setOnClickListener { }
|
||||||
|
contact_number_add_new.setOnClickListener { }
|
||||||
|
contact_email_add_new.setOnClickListener { }
|
||||||
|
|
||||||
updateTextColors(contact_scrollview)
|
updateTextColors(contact_scrollview)
|
||||||
wasActivityInitialized = true
|
wasActivityInitialized = true
|
||||||
|
|
|
@ -166,6 +166,20 @@
|
||||||
android:text="@string/mobile"
|
android:text="@string/mobile"
|
||||||
android:textSize="@dimen/bigger_text_size"/>
|
android:textSize="@dimen/bigger_text_size"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/contact_number_add_new"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/contact_number"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="@dimen/small_margin"
|
||||||
|
android:background="@drawable/button_background"
|
||||||
|
android:paddingBottom="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
|
android:paddingRight="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/medium_margin"
|
||||||
|
android:src="@drawable/ic_plus"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/contact_email_image"
|
android:id="@+id/contact_email_image"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -180,11 +194,11 @@
|
||||||
android:id="@+id/contact_email"
|
android:id="@+id/contact_email"
|
||||||
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_number"
|
android:layout_below="@+id/contact_number_add_new"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="@dimen/medium_margin"
|
android:layout_marginLeft="@dimen/medium_margin"
|
||||||
android:layout_marginStart="@dimen/medium_margin"
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
android:layout_marginTop="@dimen/normal_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:layout_toLeftOf="@+id/contact_email_type"
|
android:layout_toLeftOf="@+id/contact_email_type"
|
||||||
android:layout_toRightOf="@+id/contact_name_image"
|
android:layout_toRightOf="@+id/contact_name_image"
|
||||||
android:hint="@string/email"
|
android:hint="@string/email"
|
||||||
|
@ -209,6 +223,20 @@
|
||||||
android:text="@string/home"
|
android:text="@string/home"
|
||||||
android:textSize="@dimen/bigger_text_size"/>
|
android:textSize="@dimen/bigger_text_size"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/contact_email_add_new"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/contact_email"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="@dimen/small_margin"
|
||||||
|
android:background="@drawable/button_background"
|
||||||
|
android:paddingBottom="@dimen/medium_margin"
|
||||||
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
|
android:paddingRight="@dimen/activity_margin"
|
||||||
|
android:paddingTop="@dimen/medium_margin"
|
||||||
|
android:src="@drawable/ic_plus"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/contact_source_image"
|
android:id="@+id/contact_source_image"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -223,11 +251,11 @@
|
||||||
android:id="@+id/contact_source"
|
android:id="@+id/contact_source"
|
||||||
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_email"
|
android:layout_below="@+id/contact_email_add_new"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="@dimen/medium_margin"
|
android:layout_marginLeft="@dimen/medium_margin"
|
||||||
android:layout_marginStart="@dimen/medium_margin"
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
android:layout_marginTop="@dimen/normal_margin"
|
android:layout_marginTop="@dimen/medium_margin"
|
||||||
android:layout_toRightOf="@+id/contact_name_image"
|
android:layout_toRightOf="@+id/contact_name_image"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
|
|
Loading…
Reference in New Issue