mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-04-13 01:21:57 +02:00
fix #142, make address field multiline
This commit is contained in:
parent
05f8bf71cf
commit
e572ecb678
@ -55,7 +55,7 @@ class VcfExporter {
|
||||
contact.addresses.forEach {
|
||||
val type = getAddressTypeLabel(it.type)
|
||||
val delimiterType = if (type.isEmpty()) "" else ";$type"
|
||||
out.writeLn("$ADR$delimiterType:;;${it.value};;;;")
|
||||
out.writeLn("$ADR$delimiterType:;;${it.value.replace("\n", "\\n")};;;;")
|
||||
}
|
||||
|
||||
contact.events.forEach {
|
||||
|
@ -187,7 +187,7 @@ class VcfImporter(val activity: SimpleActivity) {
|
||||
val type = getAddressTypeId(rawType.toUpperCase())
|
||||
val addresses = addressParts[1].split(";")
|
||||
if (addresses.size == 7) {
|
||||
curAddresses.add(Address(addresses[2], type))
|
||||
curAddresses.add(Address(addresses[2].replace("\\n", "\n"), type))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,10 +13,7 @@
|
||||
android:layout_toLeftOf="@+id/contact_address_type"
|
||||
android:layout_toStartOf="@+id/contact_address_type"
|
||||
android:hint="@string/address"
|
||||
android:inputType="textCapWords"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:inputType="textCapWords|textMultiLine"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
|
@ -15,9 +15,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@+id/contact_address_type"
|
||||
android:layout_toStartOf="@+id/contact_address_type"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/bigger_text_size"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
|
Loading…
x
Reference in New Issue
Block a user