From 88ae4cb045b1ce4a4973690d8f714a338d4fe946 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 22 Apr 2020 22:22:58 +0200 Subject: [PATCH] Implemented deleting an account (TODO: implement dialog to edit account e.g. set display name etc.) --- .../persistence/IBankingPersistence.kt | 2 + .../banking/ui/presenter/BankingPresenter.kt | 15 +++ .../ui/extensions/IDrawerItemExtensions.kt | 7 +- .../android/ui/views/AccountDrawerItem.kt | 6 + .../fints4java/android/ui/views/DrawerView.kt | 36 +++++- .../ui/views/SecondaryIconDrawerItem.kt | 122 ++++++++++++++++++ .../res/drawable-hdpi/ic_add_white_48dp.png | Bin 97 -> 0 bytes .../res/drawable-hdpi/ic_build_white_48dp.png | Bin 547 -> 0 bytes .../ic_settings_applications_white_48dp.png | Bin 726 -> 0 bytes .../res/drawable-mdpi/ic_add_white_48dp.png | Bin 97 -> 0 bytes .../res/drawable-mdpi/ic_build_white_48dp.png | Bin 344 -> 0 bytes .../ic_settings_applications_white_48dp.png | Bin 469 -> 0 bytes .../res/drawable-xhdpi/ic_add_white_48dp.png | Bin 102 -> 0 bytes .../drawable-xhdpi/ic_build_white_48dp.png | Bin 655 -> 0 bytes .../ic_settings_applications_white_48dp.png | Bin 931 -> 0 bytes .../res/drawable-xxhdpi/ic_add_white_48dp.png | Bin 113 -> 0 bytes .../drawable-xxhdpi/ic_build_white_48dp.png | Bin 980 -> 0 bytes .../ic_settings_applications_white_48dp.png | Bin 1388 -> 0 bytes .../drawable-xxxhdpi/ic_add_white_48dp.png | Bin 116 -> 0 bytes .../drawable-xxxhdpi/ic_build_white_48dp.png | Bin 1373 -> 0 bytes .../ic_settings_applications_white_48dp.png | Bin 1893 -> 0 bytes .../material_drawer_item_secondary_icon.xml | 68 ++++++++++ .../src/main/res/values-de/strings.xml | 4 + .../src/main/res/values/colors.xml | 2 + .../src/main/res/values/ids.xml | 7 + .../src/main/res/values/strings.xml | 4 + .../persistence/BankingPersistenceJson.kt | 4 + 27 files changed, 272 insertions(+), 5 deletions(-) create mode 100644 fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/AccountDrawerItem.kt create mode 100644 fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/SecondaryIconDrawerItem.kt delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_add_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_build_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_settings_applications_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-mdpi/ic_add_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-mdpi/ic_build_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-mdpi/ic_settings_applications_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_add_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_build_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_settings_applications_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_add_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_build_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_settings_applications_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxxhdpi/ic_add_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxxhdpi/ic_build_white_48dp.png delete mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxxhdpi/ic_settings_applications_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/layout/material_drawer_item_secondary_icon.xml create mode 100644 fints4javaAndroidApp/src/main/res/values/ids.xml diff --git a/BankingUiCommon/src/main/java/net/dankito/banking/persistence/IBankingPersistence.kt b/BankingUiCommon/src/main/java/net/dankito/banking/persistence/IBankingPersistence.kt index 8bc002eb..826aabf3 100644 --- a/BankingUiCommon/src/main/java/net/dankito/banking/persistence/IBankingPersistence.kt +++ b/BankingUiCommon/src/main/java/net/dankito/banking/persistence/IBankingPersistence.kt @@ -7,6 +7,8 @@ interface IBankingPersistence { fun saveOrUpdateAccount(account: Account, allAccounts: List) + fun deleteAccount(account: Account, allAccounts: List) + fun readPersistedAccounts(): List } \ No newline at end of file diff --git a/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt b/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt index 444e8a37..16e584d3 100644 --- a/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt +++ b/BankingUiCommon/src/main/java/net/dankito/banking/ui/presenter/BankingPresenter.kt @@ -158,6 +158,21 @@ open class BankingPresenter( } } + open fun deleteAccount(account: Account) { + val wasSelected = isSingleSelectedAccount(account) or // either account or one of its bank accounts is currently selected + (account.bankAccounts.firstOrNull { isSingleSelectedBankAccount(it) } != null) + + clientsForAccounts.remove(account) + + persister.deleteAccount(account, accounts) + + callAccountsChangedListeners() + + if (wasSelected) { + selectedAllBankAccounts() + } + } + open fun getAccountTransactionsAsync(account: Account, callback: (GetTransactionsResponse) -> Unit) { diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/extensions/IDrawerItemExtensions.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/extensions/IDrawerItemExtensions.kt index 8c902c0c..a2f97271 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/extensions/IDrawerItemExtensions.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/extensions/IDrawerItemExtensions.kt @@ -3,13 +3,14 @@ package net.dankito.banking.fints4java.android.ui.extensions import android.content.Context import com.mikepenz.iconics.typeface.IIcon import com.mikepenz.materialdrawer.iconics.withIcon -import com.mikepenz.materialdrawer.model.AbstractBadgeableDrawerItem +import com.mikepenz.materialdrawer.model.BaseDescribeableDrawerItem +import com.mikepenz.materialdrawer.model.BaseViewHolder import com.mikepenz.materialdrawer.model.interfaces.withIconColor import net.dankito.utils.android.extensions.createColorStateList -fun > AbstractBadgeableDrawerItem.withIcon( - context: Context, icon: IIcon, iconColorId: Int): AbstractBadgeableDrawerItem { +fun BaseDescribeableDrawerItem.withIcon(context: Context, icon: IIcon, iconColorId: Int) + : BaseDescribeableDrawerItem { withIcon(icon) diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/AccountDrawerItem.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/AccountDrawerItem.kt new file mode 100644 index 00000000..1935d5bd --- /dev/null +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/AccountDrawerItem.kt @@ -0,0 +1,6 @@ +package net.dankito.banking.fints4java.android.ui.views + + +class AccountDrawerItem : SecondaryIconDrawerItem() { + +} \ No newline at end of file diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/DrawerView.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/DrawerView.kt index 491b82e2..d300a352 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/DrawerView.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/DrawerView.kt @@ -2,7 +2,10 @@ package net.dankito.banking.fints4java.android.ui.views import android.view.View import android.widget.TextView +import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.GravityCompat +import androidx.drawerlayout.widget.DrawerLayout import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.materialdrawer.model.PrimaryDrawerItem @@ -112,10 +115,15 @@ open class DrawerView( }.flatten() } - private fun createAccountDrawerItem(account: Account): PrimaryDrawerItem { - return PrimaryDrawerItem() + private fun createAccountDrawerItem(account: Account): IDrawerItem<*> { + + return AccountDrawerItem() .withName(account.displayName) .withLevel(AccountLevel) +// .withSecondaryIcon(GoogleMaterial.Icon.gmd_settings) // used when editing account is implemented + .withSecondaryIcon(GoogleMaterial.Icon.gmd_delete) + .withSecondaryIconColor(activity, R.color.primaryTextColor_Dark) + .withOnSecondaryIconClickedListener { closeDrawerAndEditAccount(account) } .withIcon(activity, FontAwesome.Icon.faw_piggy_bank, R.color.primaryTextColor_Dark) .withSelected(presenter.isSingleSelectedAccount(account)) .withOnDrawerItemClickListener { _, _, _ -> itemClicked { presenter.selectedAccount(account) } } @@ -137,6 +145,25 @@ open class DrawerView( return false } + private fun closeDrawerAndEditAccount(account: Account) { + closeDrawer() + + editAccount(account) + } + + private fun editAccount(account: Account) { + // TODO: implement editing account (e.g. displayed name etc.) + + AlertDialog.Builder(activity) + .setMessage(activity.getString(R.string.dialog_edit_account_ask_should_account_be_deleted, account.displayName)) + .setPositiveButton(R.string.delete) { dialog, _ -> + dialog.dismiss() + presenter.deleteAccount(account) + } + .setNegativeButton(R.string.cancel) { dialog, _ -> dialog.dismiss() } + .show() + } + private fun showAppVersion(navigationHeaderView: View?) { try { val packageInfo = activity.packageManager.getPackageInfo(activity.packageName, 0) @@ -147,4 +174,9 @@ open class DrawerView( } } + private fun closeDrawer() { + val drawerLayout = activity.findViewById(R.id.drawer_layout) + drawerLayout.closeDrawer(GravityCompat.START) + } + } \ No newline at end of file diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/SecondaryIconDrawerItem.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/SecondaryIconDrawerItem.kt new file mode 100644 index 00000000..931ddf80 --- /dev/null +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/views/SecondaryIconDrawerItem.kt @@ -0,0 +1,122 @@ +package net.dankito.banking.fints4java.android.ui.views + +import android.content.Context +import android.content.res.ColorStateList +import android.graphics.Bitmap +import android.graphics.drawable.Drawable +import android.net.Uri +import android.view.View +import android.widget.ImageView +import androidx.annotation.DrawableRes +import androidx.annotation.LayoutRes +import com.mikepenz.iconics.typeface.IIcon +import com.mikepenz.materialdrawer.holder.ImageHolder +import com.mikepenz.materialdrawer.iconics.IconicsImageHolder +import com.mikepenz.materialdrawer.model.BaseDescribeableDrawerItem +import com.mikepenz.materialdrawer.model.BaseViewHolder +import net.dankito.banking.fints4java.android.R +import net.dankito.utils.android.extensions.createColorStateList + + +open class SecondaryIconDrawerItem> : BaseDescribeableDrawerItem() { + + var secondaryIcon: ImageHolder? = null + + var secondaryIconColor: ColorStateList? = null + + var onSecondaryIconClicked: (() -> Unit)? = null + + + override val type: Int + get() = R.id.material_drawer_item_secondary_icon + + override val layoutRes: Int + @LayoutRes + get() = R.layout.material_drawer_item_secondary_icon + + + override fun bindView(holder: ViewHolder, payloads: List) { + super.bindView(holder, payloads) + + bindViewHelper(holder) + + if (secondaryIcon == null) { + holder.btnSecondaryIcon.visibility = View.GONE + } + else { + val context = holder.itemView.context + val secondaryIconColor = this.secondaryIconColor ?: getIconColor(context) + val secondaryIcon = ImageHolder.decideIcon(secondaryIcon, context, secondaryIconColor, isIconTinted, 1) + + holder.btnSecondaryIcon.setImageDrawable(secondaryIcon) + + holder.btnSecondaryIcon.setOnClickListener { onSecondaryIconClicked?.invoke() } + + holder.btnSecondaryIcon.visibility = View.VISIBLE + } + + //call the onPostBindView method to trigger post bind view actions (like the listener to modify the item if required) + onPostBindView(this, holder.itemView) + } + + override fun getViewHolder(v: View): ViewHolder { + return ViewHolder(v) + } + + open class ViewHolder(view: View) : BaseViewHolder(view) { + internal val btnSecondaryIcon = view.findViewById(R.id.btnSecondaryIcon) + } + + + open fun withSecondaryIconColor(iconColor: ColorStateList): Item { + this.secondaryIconColor = iconColor + return this as Item + } + + open fun withSecondaryIconColor(context: Context, iconColorResId: Int): Item { + return withSecondaryIconColor(context.createColorStateList(iconColorResId)) + } + + + open fun withSecondaryIcon(icon: Drawable?): Item { + this.secondaryIcon = ImageHolder(icon) + return this as Item + } + + open fun withSecondaryIcon(icon: Bitmap): Item { + this.secondaryIcon = ImageHolder(icon) + return this as Item + } + + open fun withSecondaryIcon(@DrawableRes imageRes: Int): Item { + this.secondaryIcon = ImageHolder(imageRes) + return this as Item + } + + open fun withSecondaryIcon(url: String): Item { + this.secondaryIcon = ImageHolder(url) + return this as Item + } + + open fun withSecondaryIcon(uri: Uri): Item { + this.secondaryIcon = ImageHolder(uri) + return this as Item + } + + open fun withSecondaryIcon(icon: ImageHolder?): Item { + this.secondaryIcon = icon + return this as Item + } + + open fun withSecondaryIcon(icon: IIcon): Item { + this.secondaryIcon = IconicsImageHolder(icon) + return this as Item + } + + + open fun withOnSecondaryIconClickedListener(clickListener: () -> Unit): Item { + this.onSecondaryIconClicked = clickListener + return this as Item + } + +} \ No newline at end of file diff --git a/fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_add_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_add_white_48dp.png deleted file mode 100755 index 0fdced8fce76a0f9a527388935adecebf63d0dae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^9w5vJBp7O^^}Pa8OeH~n!3+##lh0ZJc~YJ(jv*C{ s$r5`OFVdQ&MBb@07vc`*Z=?k diff --git a/fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_build_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_build_white_48dp.png deleted file mode 100755 index ae11b916cdca12ba5d9b402a363397510485c7ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 547 zcmV+;0^I$HP)ACK9E}?NfM?8@(B!d%0QuzOq4L7m@sfiDIdY5Oq5W>L`q3Xh6X4~CNdzB zfjYUJ^EZ)P_PMUNwHNmD0iN}1?|1LDcS|WRe=ii##3*yDvB4@c4B;ckEy@UoIOT<1 zddM;j@)J4tOc+KnPPAOnXd4NpNVAQ!MW$_}9WrbqE!sCreYTMTl-ovHms_lzS`ku> z6zG@$bpoUX8BR3-kJM|E9?6yfjlI`B(V$Igl>lvj)IHOz37VAv-G2GBXw{mc1AR{B zx5`&KG@i2ueNgF-(jc7)zpv5WXsK{04bhz-2MTmS#g4V1uX|I>9LUoJr4tNOJ(vI| zNUHu6U4*S4j*|nI5|90Qgat<9;=rZ^XaKqRB|sH|AesH1eId>*Niv`|u`4tyLL!9| z+ekjaIT9kxTSg*F@U{t&D!I0eRAnEjQuM~n$js8bWhABW30@~5QZg;N5XE1dEC@gsQ35zDYcUTg+6q5b9)@70-^VgH6J(5TANdKEO<&iv+M>0s7 zG;vrH59!9t`BChob5loJv66btowCJ3@+*^xN;1odN;1!hNOFf0mgFACk>oDt2g!Yo lQc97}G662=QeOT>-T-0k?`Rh*v)cdw002ovPDHLkV1h_J@T&j- diff --git a/fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_settings_applications_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_settings_applications_white_48dp.png deleted file mode 100755 index 8c04514d8638d90506310021bcf6b895c06c7bfe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 726 zcmV;{0xA88P)` z*awOf$k2vp6||;V=3i%pv@0lO!*L*`+&~^-Wx@@VC9LG!KtFI#nNm&5xW{(`x#u$- zNKHFg$34cNCy3Ig(SdHOpvmY!BP!@xbfDuZ=wx)DE)~=p251M5DK@F3#A8Hl6SMrH zk~MBI#*Qs$20>_Lh_{r1Mf#CCJSt6;v+QfWio>nPnqoE zJy?QJ7p~xXbmt;igH9-uMc1P{XZ{0_wq$v^O5`%Y-g1_ECudS}%!`D2Y!bYTm@k%$K;B`4U4jPvXboRe*>Y qA0T4KX9$mYGc#(exI|m+$J8&SUCOM6gL_W^0000w6CkU5nA-e?vBT6wP@u(O53!;lv2w%CnnSXd#L_{wx!g{&WXvcx09>_O1c4G zOe(dkQcWqf1QjXZi6NJ9ny1@R9pyy=xTf89VrMWgNLiPcx9Nu82Q5#Fc=eou%HJQ5yj>Jp6Vvm@u}|7Sff~~f9%HRUcO<*i00000 LNkvXXu0mjf@ng&% diff --git a/fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_add_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_add_white_48dp.png deleted file mode 100755 index d64c22e9edfdcf9babea9681c44e2dee53a6d2f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^2_Vb}Bp6OT_L>T$m`Z~Df*BafCZDwc^5i{T978G? xlN*`>5BzUTIj7P7-(I3-fns}2dtZ?oBSS_(`pg9u0+k>GJYD@<);T3K0RZru9Krwq diff --git a/fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_build_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_build_white_48dp.png deleted file mode 100755 index 874a0eb603514cc1b7e7a2b7c03de4d293232a7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 655 zcmV;A0&x9_P)x6k))(Ok@2@4rVrV+xV{jc*V-|RmZX1Ov>5MhzBae@fb>~WuYZI#(%H(`Q^2;;1C zz!^6@(x5?&3MZ6UdOa4|PMi>cbb=F{-~=Z)!3j=qf)kwJ1SdElSwhJ^Vbwa}TEsS? zC1RWKAYz-aC1RQIoev^*3F*y`BBVJ#n2_%LAVS*na|!9s&m`EG-yL3e7?3M_DTQ%002ovPDHLkV1k?(CszOf diff --git a/fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_settings_applications_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_settings_applications_white_48dp.png deleted file mode 100755 index b3cc107a6f9bf69b132202bc255687dc9bd0dcb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 931 zcmV;U16=%xP)kcgyBNUH*q3`z(SqD2t|wFn-EnZ*#6 z61j+4w245(pf>~!#c{0cFDNm?nd{5_w7d+L`E~Ejb2`%be0LY_;OFY~oZt71cv|D} zcsw4D$HNe1_6V>|K#dZEh#o;pfeQaEA!RzU3KUqw1y7YJ~PMtXtlJWmdZha6L6$C|(~Iiy9}2;3LgLX_;fFYvi4@TL0#@2LVG zxGylN3QW5%@R%y_g!=-ws{(hqA#lK3EYTp&k6cj&+F2(~okiZ}(4N4v2tp?_)QH$* z1WAxlej=jED_lbmp0g$J4HAV%_>_P;GqfQI)5dEw2>67Dn^x-YZ3u+ihct&S?nY9k zkFMCY2MEmze25s#qG^FYx!I_|E&OFxU=}f)H%tor%nil`I{3|;z*C5YJY!1WYs6Ak zO$eNEuQh=|&M#iz2gG7FE?%I{gGk~;oodu^CeK3zCfCu^tLP==gKF3=8c{0Y_2*g;z4CcD3ZTagwip>f@Xm-u%^)s0w4 zD?<9!f1`ic5Lo99L`|7i%p+=g%`apX@(E_DRUpnvf_n>mY)+uT3yH_VG9eHVGEW{! zl$XqG=8hRoIg}Ks(xAZ(*XjS)+i5@0oH2k{%7BTH5>~7Utbhpt7)LB*983x9lSd3E z&%QYUm@_Ug2POrM=s^sohafv4A&5Z39uz_$h#~P z5N8AZm^IHfaq2Abj?H6M4SibZbN{6NaaG_+_XS>51zvSu;C)q~=)S-gs=!z73v8mdK II;Vst04bp$H~;_u diff --git a/fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_build_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_build_white_48dp.png deleted file mode 100755 index d63a3b2311b81380f4ab72ada185759812729fc7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 980 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q1xWh(YZ)^zFwgdMaSW-r_4cl{ce10zv5$eB z+I20d6HCGZMYcq+*f;h@y_pnrL~HGhr2#RftxKo&ax^t96-a!1OJ$Om;G?A%6Bah5 zZZSN)`6yeN@Z_1rGnw_%=lxf&`24s+&saTB^O!{PnV%CJxH8uyiL0+z(51fT0b{sE zqP(R}f=unYOG`F%*u*8il1>3Qi@f zsmCU}$O^ccXmD%Xmhk2a^b@@_*0Dx+|Gd)-tEwcfvQIpkyFgmf!GB)cSC5p5 z>^mkietA?F!|xJS*|3Ud0sDDo=?YE!86h$kY$t8% z=u)}Fe3ru|&|AsLJkN89`Yh2(bCs?Y9!jvp6#)_Iso_ z%{s;k6p5X2NVC(&r};!>mGQPp=?x7$?_?FTazs)C56mw7k^Uy}-FrRFNq&NwOGShv z9Hq2x95g&v*lZmV=qTxals3-{%X4(k=T^k?sZ+SqA zi{w&|C9i!ng5 zFWhy4cisV)cOO`kin@=RPpr1t*Ky~`N1rEp{pw2FD|=j?TojtbP0l+XkKL9Uj5 diff --git a/fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_settings_applications_white_48dp.png b/fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_settings_applications_white_48dp.png deleted file mode 100755 index d003ced7278f66b7c730e7755841c4c47bc4b81b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1388 zcmV-y1(W)TP){+ZlX+mr(*tMB{axB#3=p$NA zpiYu3^i0!HE}$4e$0QX>KqEsv#FXpkc(Km%|5i+6w5K@BzJN1=JlrpckxwUJ4)37Av49!Uwe4 z3h1uj08Md)eJ|ww{9|3v&0di3may z*K`9tjm&mAaYo5cjzipv%(E*vOpg4F5X<`$pV16-o+>1-5gy?L835oH?nO%MdM*F} zY5IAX2$I(-e%1?gKQd?Q=;9J@P=h#VEpIbQoE6BN-KZ6)7g5sV8iD?yK@Ctd|LOzU zizw=A+JMHmQ5DcqCUgO{Bg*=eCZMy3x<)vs1!#t~h{CRCMhDQxh|+$h0ceWlYJpZV zU3s8gh~jot8fcgr)j*56R9T>{i1Kz;7HGA4pnEC{bO3SE+4a8ND&C+6D+>hg+nhoc z>-~bOc#GE1t>JUfIqFL~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O{>k4d)1$B%q0BkQgkdm8nedJJyk%=3ru%TLGA1zG*293@{S|>@a-&kjpOa zFcUY~M+Gunc7tmH?y-2vf5!&S5HK6p*+>?mmmI#xKbVa%e#>X4{IqiJx)%W2_yEFd z)YHfOxWP_D>2ChX{P;KDVhKVem)!k2+Y!Q2f+(yY907L$+zFsZHv|3&^!TqdSGWT` z{!9H8HuwNqS`dZ5_5rk9KooZP09twxg~L98mO$~C(+l7O==qT5ey$!LU_BDiZ9aer z_8<|h_W?|B6p83Bd;k-iMIw5|2QWc5644e#g_J+9}mPvhPvtl1@A)Y1MvU$=wJu{003Z+zx62g>q1C?00amaAV2^D1Ry{F0t6sH00IOc fKmY;+AV2^C#YU4K^00000NkvXXu0mjf@ViVL diff --git a/fints4javaAndroidApp/src/main/res/layout/material_drawer_item_secondary_icon.xml b/fints4javaAndroidApp/src/main/res/layout/material_drawer_item_secondary_icon.xml new file mode 100755 index 00000000..962dff5c --- /dev/null +++ b/fints4javaAndroidApp/src/main/res/layout/material_drawer_item_secondary_icon.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fints4javaAndroidApp/src/main/res/values-de/strings.xml b/fints4javaAndroidApp/src/main/res/values-de/strings.xml index 90b3c54b..e3af86eb 100644 --- a/fints4javaAndroidApp/src/main/res/values-de/strings.xml +++ b/fints4javaAndroidApp/src/main/res/values-de/strings.xml @@ -7,6 +7,7 @@ Ja Nein Abrufen + Löschen Suchen @@ -84,4 +85,7 @@ ATC: ATC muss eine Zahl sein.\n\nDer eingebene ATC Wert \'%s\' kann jedoch nicht in eine Zahl konvertiert werden. + Möchten Sie das Konto \'%s\' wirklich löschen? + \n\nDies kann nicht rückgängig gemacht werden und die hierzu gespeicherten Daten gehen unwiederbringlich verloren. + diff --git a/fints4javaAndroidApp/src/main/res/values/colors.xml b/fints4javaAndroidApp/src/main/res/values/colors.xml index 0eca02c5..81fdad27 100644 --- a/fints4javaAndroidApp/src/main/res/values/colors.xml +++ b/fints4javaAndroidApp/src/main/res/values/colors.xml @@ -10,6 +10,8 @@ #303030 #FFFFFF + + @color/primaryTextColor_Dark #43A047 #E53935 diff --git a/fints4javaAndroidApp/src/main/res/values/ids.xml b/fints4javaAndroidApp/src/main/res/values/ids.xml new file mode 100644 index 00000000..f0a94555 --- /dev/null +++ b/fints4javaAndroidApp/src/main/res/values/ids.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/fints4javaAndroidApp/src/main/res/values/strings.xml b/fints4javaAndroidApp/src/main/res/values/strings.xml index 47c6e526..800a18f0 100644 --- a/fints4javaAndroidApp/src/main/res/values/strings.xml +++ b/fints4javaAndroidApp/src/main/res/values/strings.xml @@ -7,6 +7,7 @@ Yes No Fetch + Delete Search @@ -84,4 +85,7 @@ ATC: ATC has to be a number.\n\nBut entered ATC value \'%s\' cannot be converted to a number. + Really delete account \'%s\'? + \n\nThis cannot be undone and data will be lost. + diff --git a/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt b/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt index 6fb5bf88..b33574f0 100644 --- a/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt +++ b/persistence/json/BankingPersistenceJson/src/main/kotlin/net/dankito/banking/persistence/BankingPersistenceJson.kt @@ -21,6 +21,10 @@ open class BankingPersistenceJson( serializer.serializeObject(allAccounts, jsonFile) } + override fun deleteAccount(account: Account, allAccounts: List) { + serializer.serializeObject(allAccounts, jsonFile) + } + override fun readPersistedAccounts(): List { return serializer.deserializeListOr(jsonFile, Account::class.java, listOf()) }