From 80e6694ec9766e36d07171a2ccdcb8d9efd3854a Mon Sep 17 00:00:00 2001 From: dankl Date: Sun, 12 Jan 2020 16:18:22 +0100 Subject: [PATCH] Implemented Navigation side bar to show and select bank accounts --- .../fints4java/android/MainActivity.kt | 110 ++++++++++++++++-- .../android/ui/home/HomeFragment.kt | 50 ++++++-- .../res/drawable-hdpi/ic_build_white_48dp.png | Bin 0 -> 547 bytes .../ic_settings_applications_white_48dp.png | Bin 0 -> 726 bytes .../res/drawable-mdpi/ic_build_white_48dp.png | Bin 0 -> 344 bytes .../ic_settings_applications_white_48dp.png | Bin 0 -> 469 bytes .../drawable-xhdpi/ic_build_white_48dp.png | Bin 0 -> 655 bytes .../ic_settings_applications_white_48dp.png | Bin 0 -> 931 bytes .../drawable-xxhdpi/ic_build_white_48dp.png | Bin 0 -> 980 bytes .../ic_settings_applications_white_48dp.png | Bin 0 -> 1388 bytes .../drawable-xxxhdpi/ic_build_white_48dp.png | Bin 0 -> 1373 bytes .../ic_settings_applications_white_48dp.png | Bin 0 -> 1893 bytes .../layout/action_view_account_menu_item.xml | 32 +++++ .../src/main/res/layout/activity_main.xml | 5 +- .../src/main/res/layout/nav_header_main.xml | 23 +++- .../main/res/menu/activity_main_drawer.xml | 30 ++++- .../src/main/res/values/dimens.xml | 3 + .../src/main/res/values/strings.xml | 7 +- .../src/main/res/values/styles.xml | 9 ++ 19 files changed, 237 insertions(+), 32 deletions(-) create mode 100755 fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_build_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-hdpi/ic_settings_applications_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-mdpi/ic_build_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-mdpi/ic_settings_applications_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_build_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-xhdpi/ic_settings_applications_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_build_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxhdpi/ic_settings_applications_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxxhdpi/ic_build_white_48dp.png create mode 100755 fints4javaAndroidApp/src/main/res/drawable-xxxhdpi/ic_settings_applications_white_48dp.png create mode 100644 fints4javaAndroidApp/src/main/res/layout/action_view_account_menu_item.xml diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt index f6103edc..52b91765 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/MainActivity.kt @@ -2,10 +2,16 @@ package net.dankito.banking.fints4java.android import android.os.Bundle import android.support.design.widget.NavigationView +import android.support.v4.view.GravityCompat import android.support.v4.widget.DrawerLayout +import android.support.v7.app.ActionBarDrawerToggle import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.view.Menu +import android.view.MenuItem +import android.view.MotionEvent +import android.view.SubMenu +import android.widget.TextView import androidx.navigation.findNavController import com.github.clans.fab.FloatingActionMenu import kotlinx.android.synthetic.main.action_view_account_menu_item.view.* @@ -14,12 +20,20 @@ import net.dankito.banking.fints4java.android.util.Base64ServiceAndroid import net.dankito.banking.fints4javaBankingClientCreator import net.dankito.banking.ui.model.Account import net.dankito.banking.ui.presenter.MainWindowPresenter +import org.slf4j.LoggerFactory class MainActivity : AppCompatActivity() { + companion object { + private val log = LoggerFactory.getLogger(MainActivity::class.java) + } + + // private lateinit var appBarConfiguration: AppBarConfiguration + private lateinit var drawerToggle: ActionBarDrawerToggle + private lateinit var floatingActionMenuButton: MainActivityFloatingActionMenuButton @@ -39,7 +53,7 @@ class MainActivity : AppCompatActivity() { setSupportActionBar(toolbar) val drawerLayout: DrawerLayout = findViewById(R.id.drawer_layout) - val navView: NavigationView = findViewById(R.id.nav_view) + val navigationView: NavigationView = findViewById(R.id.nav_view) val navController = findNavController(R.id.nav_host_fragment) // // Passing each menu ID as a set of Ids because each @@ -54,6 +68,13 @@ class MainActivity : AppCompatActivity() { // setupActionBarWithNavController(navController, appBarConfiguration) // navigationView.setupWithNavController(navController) + drawerToggle = ActionBarDrawerToggle( + this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) + drawerLayout.addDrawerListener(drawerToggle) + drawerToggle.syncState() + + setupNavigationView(navigationView, drawerLayout) + val floatingActionMenu = findViewById(R.id.floatingActionMenu) floatingActionMenuButton = MainActivityFloatingActionMenuButton(floatingActionMenu, presenter) } @@ -64,6 +85,84 @@ class MainActivity : AppCompatActivity() { return true } + + private fun setupNavigationView(navigationView: NavigationView, drawerLayout: DrawerLayout) { + showAppVersion(navigationView) + + val navigationMenu = navigationView.menu + val accountsMenuItem = navigationMenu.findItem(R.id.navBankAccountsSectionItem) + val accountsMenu = accountsMenuItem.subMenu + + presenter.addAccountsChangedListener { + runOnUiThread { updateNavigationMenuItems(accountsMenu) } + } + + updateNavigationMenuItems(accountsMenu) + + navigationView.setNavigationItemSelectedListener { navigationItemSelected(it) } + } + + private fun updateNavigationMenuItems(accountsMenu: SubMenu) { + accountsMenu.findItem(R.id.navAllBankAccounts).isVisible = presenter.accounts.isNotEmpty() + + // removes previously shown accounts; index 0 = 'Add account', 1 = 'All accounts', don't remove these + for (index in (accountsMenu.size() - 1) downTo 2) { + accountsMenu.removeItem(accountsMenu.getItem(index).itemId) + } + + presenter.accounts.forEach { account -> + val accountMenuItem = accountsMenu.add("") + + accountMenuItem.setActionView(R.layout.action_view_account_menu_item) + accountMenuItem.actionView.txtvwAccountName.text = account.displayName + accountMenuItem.actionView.imgvwEditAccount.setImageResource(R.drawable.ic_build_white_48dp) + accountMenuItem.actionView.imgvwEditAccount.setOnClickListener { editAccount(account) } + + accountMenuItem.setOnMenuItemClickListener { setSelectedAccount(account) } + } + } + + private fun setSelectedAccount(account: Account): Boolean { + presenter.selectedAccount(account) + + closeDrawer() + + return true + } + + private fun editAccount(account: Account) { + // TODO: implement + log.info("Edit account $account") + + closeDrawer() + } + + private fun showAppVersion(navigationView: NavigationView) { + try { + val packageInfo = this.packageManager.getPackageInfo(packageName, 0) + val version = packageInfo.versionName + (navigationView.getHeaderView(0).findViewById(R.id.txtAppVersion) as? TextView)?.text = version + } catch (e: Exception) { + log.error("Could not read application version") + } + } + + private fun navigationItemSelected(item: MenuItem): Boolean { + when (item.itemId) { + R.id.navAddBankAccount -> presenter.showAddAccountDialog() + R.id.navAllBankAccounts -> presenter.selectedAllBankAccounts() + } + + closeDrawer() + + return true + } + + private fun closeDrawer() { + val drawer = findViewById(R.id.drawer_layout) as DrawerLayout + drawer.closeDrawer(GravityCompat.START) + } + // override fun onSupportNavigateUp(): Boolean { // val navController = findNavController(R.id.nav_host_fragment) // return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp() @@ -86,13 +185,4 @@ class MainActivity : AppCompatActivity() { super.onBackPressed() } - - private fun getTanFromUserOffUiThread(account: Account, tanChallenge: TanChallenge): EnterTanResult { - return router.getTanFromUserOffUiThread(account, tanChallenge) - } - - private fun getAtcFromUserOffUiThread(tanMedium: TanGeneratorTanMedium): EnterTanGeneratorAtcResult { - return router.getAtcFromUserOffUiThread(tanMedium) - } - } diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt index 4b35df7f..9110e636 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/home/HomeFragment.kt @@ -15,7 +15,9 @@ import android.widget.EditText import net.dankito.banking.fints4java.android.MainActivity import net.dankito.banking.fints4java.android.R import net.dankito.banking.fints4java.android.ui.adapter.AccountTransactionAdapter +import net.dankito.banking.ui.model.Account import net.dankito.banking.ui.model.AccountTransaction +import net.dankito.banking.ui.model.BankAccount import net.dankito.banking.ui.model.parameters.TransferMoneyData import net.dankito.banking.ui.model.responses.GetTransactionsResponse import net.dankito.banking.ui.presenter.MainWindowPresenter @@ -35,6 +37,8 @@ class HomeFragment : Fragment() { private val transactionAdapter = AccountTransactionAdapter() + protected var appliedTransactionsFilter = "" + private lateinit var presenter: MainWindowPresenter @@ -127,6 +131,10 @@ class HomeFragment : Fragment() { (context as? MainActivity)?.presenter?.let { presenter -> this.presenter = presenter + presenter.addAccountsChangedListener { handleAccountsChanged(it) } + + presenter.addSelectedBankAccountsChangedListener { handleSelectedBankAccountsChanged(it) } + presenter.addRetrievedAccountTransactionsResponseListener { _, response -> handleGetTransactionsResponse(response) } @@ -134,6 +142,23 @@ class HomeFragment : Fragment() { } + private fun handleAccountsChanged(accounts: List) { + context?.asActivity()?.let { activity -> + activity.runOnUiThread { + mnitmSearchTransactions.isVisible = accounts.isNotEmpty() + mnitmUpdateTransactions.isVisible = accounts.isNotEmpty() + } + } + } + + private fun handleSelectedBankAccountsChanged(selectedBankAccounts: List) { + context?.asActivity()?.let { activity -> + activity.runOnUiThread { + updateTransactionsToDisplay() + } + } + } + private fun updateAccountsTransactions() { presenter.updateAccountsTransactionsAsync { } } @@ -142,15 +167,9 @@ class HomeFragment : Fragment() { context?.asActivity()?.let { activity -> activity.runOnUiThread { if (response.isSuccessful) { - val allTransactions = presenter.allTransactions - transactionAdapter.items = allTransactions - - mnitmSearchTransactions.isVisible = allTransactions.isNotEmpty() - mnitmUpdateTransactions.isVisible = allTransactions.isNotEmpty() - - mnitmBalance.title = presenter.balanceOfAllAccounts.toString() - mnitmBalance.isVisible = true - } else { + updateTransactionsToDisplay() + } + else { AlertDialog.Builder(activity) // TODO: may show account name in message .setMessage(activity.getString(R.string.fragment_home_could_not_retrieve_account_transactions, response.errorToShowToUser)) .setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() } @@ -178,7 +197,9 @@ class HomeFragment : Fragment() { private val searchAccountTransactionsTextListener: SearchView.OnQueryTextListener = object : SearchView.OnQueryTextListener { override fun onQueryTextChange(query: String): Boolean { - searchAccountTransactions(query) + appliedTransactionsFilter = query + + updateTransactionsToDisplay() return true } @@ -187,8 +208,13 @@ class HomeFragment : Fragment() { } } - private fun searchAccountTransactions(query: String) { - transactionAdapter.items = presenter.searchAccountTransactions(query) + + private fun updateTransactionsToDisplay() { + transactionAdapter.items = presenter.searchSelectedAccountTransactions(appliedTransactionsFilter) + + // TODO: if transactions are filtered calculate and show balance of displayed transactions? + mnitmBalance.title = presenter.balanceOfSelectedBankAccounts.toString() + mnitmBalance.isVisible = true } } \ No newline at end of file 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 new file mode 100755 index 0000000000000000000000000000000000000000..ae11b916cdca12ba5d9b402a363397510485c7ea GIT binary patch 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- literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..8c04514d8638d90506310021bcf6b895c06c7bfe GIT binary patch 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&% literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..874a0eb603514cc1b7e7a2b7c03de4d293232a7e GIT binary patch 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 literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..b3cc107a6f9bf69b132202bc255687dc9bd0dcb2 GIT binary patch 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=!z73v8>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 literal 0 HcmV?d00001 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 new file mode 100755 index 0000000000000000000000000000000000000000..d003ced7278f66b7c730e7755841c4c47bc4b81b GIT binary patch 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~Ba$|&c#Agh184w(Nj4$#YRqmGZ_x+223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a 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 literal 0 HcmV?d00001 diff --git a/fints4javaAndroidApp/src/main/res/layout/action_view_account_menu_item.xml b/fints4javaAndroidApp/src/main/res/layout/action_view_account_menu_item.xml new file mode 100644 index 00000000..7ea8d692 --- /dev/null +++ b/fints4javaAndroidApp/src/main/res/layout/action_view_account_menu_item.xml @@ -0,0 +1,32 @@ + + + + + + + + \ No newline at end of file diff --git a/fints4javaAndroidApp/src/main/res/layout/activity_main.xml b/fints4javaAndroidApp/src/main/res/layout/activity_main.xml index f4df16d8..bc641837 100644 --- a/fints4javaAndroidApp/src/main/res/layout/activity_main.xml +++ b/fints4javaAndroidApp/src/main/res/layout/activity_main.xml @@ -20,6 +20,9 @@ android:layout_gravity="start" android:fitsSystemWindows="true" app:headerLayout="@layout/nav_header_main" - app:menu="@menu/activity_main_drawer" /> + app:menu="@menu/activity_main_drawer" + android:theme="@style/AppTheme.NavigationView" + android:background="@color/backgroundColor_Dark" + /> diff --git a/fints4javaAndroidApp/src/main/res/layout/nav_header_main.xml b/fints4javaAndroidApp/src/main/res/layout/nav_header_main.xml index b697ad54..c3e1a028 100644 --- a/fints4javaAndroidApp/src/main/res/layout/nav_header_main.xml +++ b/fints4javaAndroidApp/src/main/res/layout/nav_header_main.xml @@ -27,10 +27,23 @@ android:text="@string/nav_header_title" android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - + + + + + + + diff --git a/fints4javaAndroidApp/src/main/res/menu/activity_main_drawer.xml b/fints4javaAndroidApp/src/main/res/menu/activity_main_drawer.xml index d761f80d..ceaa8c09 100644 --- a/fints4javaAndroidApp/src/main/res/menu/activity_main_drawer.xml +++ b/fints4javaAndroidApp/src/main/res/menu/activity_main_drawer.xml @@ -1,6 +1,32 @@ + xmlns:tools="http://schemas.android.com/tools" + tools:showIn="navigation_view" +> + + + + + + + + + + + + diff --git a/fints4javaAndroidApp/src/main/res/values/dimens.xml b/fints4javaAndroidApp/src/main/res/values/dimens.xml index 47b9addc..63cc85b7 100644 --- a/fints4javaAndroidApp/src/main/res/values/dimens.xml +++ b/fints4javaAndroidApp/src/main/res/values/dimens.xml @@ -4,6 +4,9 @@ 16dp 8dp 176dp + 8dp + 56dp + 24dp 16dp 16dp 42dp diff --git a/fints4javaAndroidApp/src/main/res/values/strings.xml b/fints4javaAndroidApp/src/main/res/values/strings.xml index 81665732..04c6f5e7 100644 --- a/fints4javaAndroidApp/src/main/res/values/strings.xml +++ b/fints4javaAndroidApp/src/main/res/values/strings.xml @@ -13,9 +13,12 @@ Open navigation drawer Close navigation drawer - Android Studio - android.studio@android.com + @string/app_name + Version\u0020 Navigation header + Accounts + Add account + All accounts Account Transfer money diff --git a/fints4javaAndroidApp/src/main/res/values/styles.xml b/fints4javaAndroidApp/src/main/res/values/styles.xml index b0aa1e40..21e5e413 100644 --- a/fints4javaAndroidApp/src/main/res/values/styles.xml +++ b/fints4javaAndroidApp/src/main/res/values/styles.xml @@ -21,6 +21,15 @@ +