fix #142, make address field multiline

This commit is contained in:
tibbi 2018-04-18 11:04:34 +02:00
parent 05f8bf71cf
commit e572ecb678
4 changed files with 3 additions and 9 deletions

View File

@ -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 {

View File

@ -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))
}
}

View File

@ -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"/>

View File

@ -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