- Tried to align alerts with material design guidelines.

- Still more work on strings.
This commit is contained in:
Juha Heinanen
2019-05-11 15:27:35 +03:00
parent c061c5d2f9
commit e4fbb71d16
20 changed files with 284 additions and 216 deletions
@@ -31,7 +31,8 @@ class ContactsActivity : AppCompatActivity() {
plusButton.setOnClickListener {
if (Contact.contacts().size >= Contact.CONTACTS_SIZE) {
Utils.alertView(this, getString(R.string.notice),
String.format(getString(R.string.contacts_exceeded), Contact.CONTACTS_SIZE))
String.format(getString(R.string.contacts_exceeded),
Contact.CONTACTS_SIZE))
} else {
val i = Intent(this, ContactActivity::class.java)
val b = Bundle()
@@ -57,7 +58,8 @@ class ContactsActivity : AppCompatActivity() {
when (item.itemId) {
R.id.export_contacts -> {
if (saveContacts(dir))
Utils.alertView(this,"", getString(R.string.exported_contacts))
Utils.alertView(this, "",
getString(R.string.exported_contacts))
else
Utils.alertView(this,getString(R.string.error),
getString(R.string.export_error))
@@ -65,7 +67,7 @@ class ContactsActivity : AppCompatActivity() {
R.id.import_contacts -> {
if (restoreContacts(dir)) {
Utils.alertView(this, "",
"Imported contacts from Download folder.")
getString(R.string.imported_contacts))
clAdapter.notifyDataSetChanged()
saveContacts(applicationContext.filesDir)
} else