Started Android app
|
@ -4,7 +4,9 @@ ext {
|
|||
appVersionName = '1.0.0-SNAPSHOT'
|
||||
|
||||
kotlinVersion = '1.3.41'
|
||||
|
||||
javaUtilsVersion = '1.0.8'
|
||||
androidUtilsVersion = '1.1.0'
|
||||
|
||||
junitVersion = '4.12'
|
||||
assertJVersion = '3.12.2'
|
||||
|
@ -12,6 +14,7 @@ ext {
|
|||
mockitoVersion = '2.22.0'
|
||||
mockitoKotlinVersion = '1.6.0'
|
||||
|
||||
slf4JVersion = '1.7.26'
|
||||
logbackVersion = '1.2.3'
|
||||
}
|
||||
|
||||
|
@ -23,7 +26,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||
classpath 'com.android.tools.build:gradle:3.4.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// Nexus staging plugin has to be downgraded to 0.10.0 to be applicable to sub projects, see https://github.com/UweTrottmann/SeriesGuide/commit/ca33e8ad2fa6cc5c426450c8aef3417ba073ca7f
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
|
||||
defaultConfig {
|
||||
applicationId "net.dankito.banking.fints4java.android"
|
||||
minSdkVersion 15
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':fints4javaLib')
|
||||
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
|
||||
|
||||
api "net.dankito.utils:android-utils:$androidUtilsVersion", {
|
||||
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
|
||||
exclude group: 'com.android.support', module: 'appcompat-v7'
|
||||
exclude group: 'com.android.support', module: 'design'
|
||||
}
|
||||
|
||||
api "org.slf4j:slf4j-android:$slf4JVersion"
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.android.support:design:28.0.0'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
implementation 'android.arch.navigation:navigation-fragment:1.0.0'
|
||||
implementation 'android.arch.navigation:navigation-ui:1.0.0'
|
||||
implementation 'android.arch.lifecycle:extensions:1.1.1'
|
||||
implementation 'android.arch.navigation:navigation-fragment-ktx:1.0.0'
|
||||
implementation 'android.arch.navigation:navigation-ui-ktx:1.0.0'
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="net.dankito.banking.fints4java.android">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
|
||||
<application
|
||||
android:testOnly="false"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,22 @@
|
|||
package net.dankito.banking.fints4java.android
|
||||
|
||||
import android.util.Base64
|
||||
import net.dankito.fints.util.IBase64Service
|
||||
import java.nio.charset.Charset
|
||||
|
||||
|
||||
open class Base64ServiceAndroid : IBase64Service {
|
||||
|
||||
override fun encode(text: String, charset: Charset): String {
|
||||
val bytes = text.toByteArray(charset)
|
||||
|
||||
return Base64.encodeToString(bytes, Base64.NO_WRAP)
|
||||
}
|
||||
|
||||
override fun decode(base64: String, charset: Charset): String {
|
||||
val decoded = Base64.decode(base64, Base64.NO_WRAP)
|
||||
|
||||
return String(decoded, charset)
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
package net.dankito.banking.fints4java.android
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.design.widget.FloatingActionButton
|
||||
import android.support.design.widget.NavigationView
|
||||
import android.support.v4.widget.DrawerLayout
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.Toolbar
|
||||
import android.view.Menu
|
||||
import androidx.navigation.findNavController
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.dialogs.AddAccountDialog
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
// private lateinit var appBarConfiguration: AppBarConfiguration
|
||||
|
||||
val presenter = MainWindowPresenter()
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
initUi()
|
||||
}
|
||||
|
||||
private fun initUi() {
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
val toolbar: Toolbar = findViewById(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
val fab: FloatingActionButton = findViewById(R.id.fab)
|
||||
fab.setOnClickListener { view ->
|
||||
AddAccountDialog().show(this, presenter)
|
||||
}
|
||||
|
||||
val drawerLayout: DrawerLayout = findViewById(R.id.drawer_layout)
|
||||
val navView: 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
|
||||
// // menu should be considered as top level destinations.
|
||||
// appBarConfiguration = AppBarConfiguration(
|
||||
// setOf(
|
||||
// R.id.nav_home, R.id.nav_gallery, R.id.nav_slideshow,
|
||||
// R.id.nav_tools, R.id.nav_share, R.id.nav_send
|
||||
// ), drawerLayout
|
||||
// )
|
||||
//
|
||||
// setupActionBarWithNavController(navController, appBarConfiguration)
|
||||
// navView.setupWithNavController(navController)
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
menuInflater.inflate(R.menu.main, menu)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// override fun onSupportNavigateUp(): Boolean {
|
||||
// val navController = findNavController(R.id.nav_host_fragment)
|
||||
// return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp()
|
||||
// }
|
||||
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package net.dankito.banking.fints4java.android.ui
|
||||
|
||||
import net.dankito.banking.fints4java.android.Base64ServiceAndroid
|
||||
import net.dankito.fints.FinTsClient
|
||||
import net.dankito.fints.FinTsClientCallback
|
||||
import net.dankito.fints.banks.BankFinder
|
||||
import net.dankito.fints.model.BankData
|
||||
import net.dankito.fints.model.BankInfo
|
||||
import net.dankito.fints.model.CustomerData
|
||||
import net.dankito.fints.model.TanProcedure
|
||||
import net.dankito.fints.model.mapper.BankDataMapper
|
||||
import net.dankito.fints.response.client.FinTsClientResponse
|
||||
import net.dankito.fints.response.client.GetTransactionsResponse
|
||||
import net.dankito.utils.IThreadPool
|
||||
import net.dankito.utils.ThreadPool
|
||||
|
||||
|
||||
open class MainWindowPresenter {
|
||||
|
||||
protected val callback = object : FinTsClientCallback {
|
||||
|
||||
override fun askUserForTanProcedure(supportedTanProcedures: List<TanProcedure>): TanProcedure? {
|
||||
// TODO: show dialog and ask user
|
||||
return supportedTanProcedures.first()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected val finTsClient = FinTsClient(callback, Base64ServiceAndroid())
|
||||
|
||||
protected val bankFinder: BankFinder = BankFinder()
|
||||
|
||||
protected val threadPool: IThreadPool = ThreadPool()
|
||||
|
||||
protected val bankDataMapper = BankDataMapper()
|
||||
|
||||
|
||||
protected val accountAddedListeners = mutableListOf<(BankData, CustomerData) -> Unit>()
|
||||
|
||||
|
||||
open fun checkIfAccountExists(bankInfo: BankInfo, customerId: String, pin: String,
|
||||
callback: (FinTsClientResponse) -> Unit) {
|
||||
|
||||
val bank = bankDataMapper.mapFromBankInfo(bankInfo)
|
||||
val customer = CustomerData(customerId, pin)
|
||||
|
||||
finTsClient.checkIfAccountExistsAsync(bank, customer) { response ->
|
||||
if (response.isSuccessful) {
|
||||
callAccountAddedListeners(bank, customer)
|
||||
}
|
||||
|
||||
callback(response)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
open fun getAccountTransactionsAsync(bank: BankData, customer: CustomerData,
|
||||
callback: (GetTransactionsResponse) -> Unit) {
|
||||
|
||||
finTsClient.tryGetTransactionsOfLast90DaysWithoutTanAsync(bank, customer, callback)
|
||||
}
|
||||
|
||||
|
||||
open fun searchForBankAsync(enteredBankCode: String, callback: (List<BankInfo>) -> Unit) {
|
||||
threadPool.runAsync {
|
||||
callback(searchForBank(enteredBankCode))
|
||||
}
|
||||
}
|
||||
|
||||
open fun searchForBank(enteredBankCode: String): List<BankInfo> {
|
||||
return bankFinder.findBankByBankCode(enteredBankCode)
|
||||
}
|
||||
|
||||
|
||||
open fun addAccountAddedListener(listener: (BankData, CustomerData) -> Unit) {
|
||||
accountAddedListeners.add(listener)
|
||||
}
|
||||
|
||||
protected open fun callAccountAddedListeners(bank: BankData, customer: CustomerData) {
|
||||
ArrayList(accountAddedListeners).forEach {
|
||||
it(bank, customer) // TODO: use RxJava for this
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package net.dankito.banking.fints4java.android.ui.adapter
|
||||
|
||||
import android.view.View
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.viewholder.AccountTransactionViewHolder
|
||||
import net.dankito.fints.model.AccountTransaction
|
||||
import net.dankito.utils.android.extensions.setTextColorToColorResource
|
||||
import net.dankito.utils.android.ui.adapter.ListRecyclerAdapter
|
||||
import java.math.BigDecimal
|
||||
import java.text.DateFormat
|
||||
|
||||
|
||||
open class AccountTransactionAdapter
|
||||
: ListRecyclerAdapter<AccountTransaction, AccountTransactionViewHolder>() {
|
||||
|
||||
companion object {
|
||||
val BookingDateFormat = DateFormat.getDateInstance(DateFormat.SHORT)
|
||||
}
|
||||
|
||||
|
||||
override fun getListItemLayoutId() = R.layout.list_item_account_transaction
|
||||
|
||||
override fun createViewHolder(itemView: View): AccountTransactionViewHolder {
|
||||
return AccountTransactionViewHolder(itemView)
|
||||
}
|
||||
|
||||
override fun bindItemToView(viewHolder: AccountTransactionViewHolder, item: AccountTransaction) {
|
||||
viewHolder.txtvwBookingDate.text = BookingDateFormat.format(item.bookingDate)
|
||||
|
||||
viewHolder.txtvwBookingText.text = item.bookingText ?: ""
|
||||
|
||||
viewHolder.txtvwOtherPartyName.text = item.otherPartyName ?: ""
|
||||
|
||||
viewHolder.txtvwUsage1.text = item.usage
|
||||
|
||||
viewHolder.txtvwUsage2.visibility = View.GONE // TODO
|
||||
viewHolder.txtvwUsage2.text = "" // TODO
|
||||
|
||||
viewHolder.txtvwAmount.text = item.amount.toString()
|
||||
viewHolder.txtvwAmount.setTextColorToColorResource(if (item.amount >= BigDecimal.ZERO) R.color.positiveAmount else R.color.negativeAmount)
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package net.dankito.banking.fints4java.android.ui.adapter.viewholder
|
||||
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import kotlinx.android.synthetic.main.list_item_account_transaction.view.*
|
||||
|
||||
|
||||
class AccountTransactionViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
|
||||
val txtvwBookingDate: TextView = itemView.txtvwBookingDate
|
||||
|
||||
val txtvwBookingText: TextView = itemView.txtvwBookingText
|
||||
|
||||
val txtvwOtherPartyName: TextView = itemView.txtvwOtherPartyName
|
||||
|
||||
val txtvwUsage1: TextView = itemView.txtvwUsage1
|
||||
|
||||
val txtvwUsage2: TextView = itemView.txtvwUsage2
|
||||
|
||||
val txtvwAmount: TextView = itemView.txtvwAmount
|
||||
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
package net.dankito.banking.fints4java.android.ui.dialogs
|
||||
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.DialogFragment
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import kotlinx.android.synthetic.main.dialog_add_account.*
|
||||
import kotlinx.android.synthetic.main.dialog_add_account.view.*
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.fints.model.BankInfo
|
||||
import net.dankito.fints.response.client.FinTsClientResponse
|
||||
import net.dankito.utils.android.extensions.asActivity
|
||||
|
||||
|
||||
class AddAccountDialog : DialogFragment() {
|
||||
|
||||
companion object {
|
||||
const val DialogTag = "AddAccountDialog"
|
||||
}
|
||||
|
||||
|
||||
private lateinit var presenter: MainWindowPresenter
|
||||
|
||||
private var selectedBank: BankInfo? = null
|
||||
|
||||
|
||||
fun show(activity: AppCompatActivity, presenter: MainWindowPresenter, fullscreen: Boolean = false) {
|
||||
this.presenter = presenter
|
||||
|
||||
val style = if(fullscreen) R.style.FullscreenDialogWithStatusBar else R.style.Dialog
|
||||
setStyle(STYLE_NORMAL, style)
|
||||
|
||||
show(activity.supportFragmentManager, DialogTag)
|
||||
}
|
||||
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
val rootView = inflater.inflate(R.layout.dialog_add_account, container, false)
|
||||
|
||||
rootView?.let {
|
||||
setupUI(rootView)
|
||||
}
|
||||
|
||||
return rootView
|
||||
}
|
||||
|
||||
private fun setupUI(rootView: View) {
|
||||
rootView.edtxtBankCode.addTextChangedListener(bankCodeChangedWatcher)
|
||||
|
||||
rootView.edtxtCustomerId.addTextChangedListener(otherEditTextChangedWatcher)
|
||||
rootView.edtxtPin.addTextChangedListener(otherEditTextChangedWatcher)
|
||||
|
||||
rootView.btnSelect.setOnClickListener { addAccount() }
|
||||
rootView.btnCancel.setOnClickListener { dismiss() }
|
||||
}
|
||||
|
||||
private fun addAccount() {
|
||||
selectedBank?.let { selectedBank -> // should always be non-null at this stage
|
||||
val customerId = edtxtCustomerId.text.toString()
|
||||
val pin = edtxtPin.text.toString()
|
||||
|
||||
presenter.checkIfAccountExists(selectedBank, customerId, pin) { response ->
|
||||
context?.asActivity()?.runOnUiThread {
|
||||
handleAccountCheckResponseOnUiThread(response)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleAccountCheckResponseOnUiThread(response: FinTsClientResponse) {
|
||||
context?.let { context ->
|
||||
if (response.isSuccessful) {
|
||||
AlertDialog.Builder(context)
|
||||
.setMessage("Successfully added account")
|
||||
.setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() }
|
||||
.show()
|
||||
this.dismiss()
|
||||
}
|
||||
else {
|
||||
AlertDialog.Builder(context).setMessage("Could not add account: ${response.exception ?: response.errorsToShowToUser.joinToString("\n")}").show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val bankCodeChangedWatcher = object : TextWatcher {
|
||||
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { }
|
||||
|
||||
override fun onTextChanged(enteredText: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
enteredText?.let { searchForBankAsync(enteredText) }
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) { }
|
||||
|
||||
}
|
||||
|
||||
val otherEditTextChangedWatcher = object : TextWatcher {
|
||||
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { }
|
||||
|
||||
override fun onTextChanged(enteredText: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
checkIfRequiredDataEnteredOnUiThread()
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) { }
|
||||
|
||||
}
|
||||
|
||||
private fun searchForBankAsync(enteredBankCode: CharSequence) {
|
||||
presenter.searchForBankAsync(enteredBankCode.toString()) { foundBanks ->
|
||||
context?.asActivity()?.runOnUiThread {
|
||||
showFoundBanksOnUiThread(foundBanks)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showFoundBanksOnUiThread(foundBanks: List<BankInfo>) {
|
||||
if (foundBanks.isNotEmpty()) {
|
||||
selectedBank = foundBanks.first()
|
||||
}
|
||||
else {
|
||||
selectedBank = null
|
||||
}
|
||||
|
||||
checkIfRequiredDataEnteredOnUiThread()
|
||||
}
|
||||
|
||||
private fun checkIfRequiredDataEnteredOnUiThread() {
|
||||
val requiredDataEntered = selectedBank != null
|
||||
&& edtxtCustomerId.text.toString().isNotEmpty() // TODO: check if it is of length 10?
|
||||
&& edtxtPin.text.toString().isNotEmpty() // TODO: check if it is of length 5?
|
||||
|
||||
btnSelect.isEnabled = requiredDataEntered
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package net.dankito.banking.fints4java.android.ui.home
|
||||
|
||||
import android.arch.lifecycle.ViewModelProviders
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.Fragment
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import net.dankito.banking.fints4java.android.MainActivity
|
||||
import net.dankito.banking.fints4java.android.R
|
||||
import net.dankito.banking.fints4java.android.ui.MainWindowPresenter
|
||||
import net.dankito.banking.fints4java.android.ui.adapter.AccountTransactionAdapter
|
||||
import net.dankito.fints.model.BankData
|
||||
import net.dankito.fints.model.CustomerData
|
||||
import net.dankito.utils.android.extensions.asActivity
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
|
||||
class HomeFragment : Fragment() {
|
||||
|
||||
companion object {
|
||||
private val log = LoggerFactory.getLogger(HomeFragment::class.java)
|
||||
}
|
||||
|
||||
|
||||
private lateinit var homeViewModel: HomeViewModel
|
||||
|
||||
private val transactionAdapter = AccountTransactionAdapter()
|
||||
|
||||
|
||||
private lateinit var presenter: MainWindowPresenter
|
||||
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
homeViewModel =
|
||||
ViewModelProviders.of(this).get(HomeViewModel::class.java)
|
||||
val root = inflater.inflate(R.layout.fragment_home, container, false)
|
||||
// val textView: TextView = root.findViewById(R.id.text_home)
|
||||
// homeViewModel.text.observe(this, Observer {
|
||||
// textView.text = it
|
||||
// })
|
||||
|
||||
|
||||
val rcyvwAccountTransactions: RecyclerView = root.findViewById(R.id.rcyvwAccountTransactions)
|
||||
rcyvwAccountTransactions.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
|
||||
rcyvwAccountTransactions.adapter = transactionAdapter
|
||||
|
||||
initLogic()
|
||||
|
||||
return root
|
||||
}
|
||||
|
||||
|
||||
private fun initLogic() {
|
||||
|
||||
// TODO: this is such a bad code style
|
||||
(context as? MainActivity)?.presenter?.let { presenter ->
|
||||
this.presenter = presenter
|
||||
|
||||
presenter.addAccountAddedListener { bank, customer ->
|
||||
retrieveAccountTransactions(bank, customer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun retrieveAccountTransactions(bank: BankData, customer: CustomerData) {
|
||||
presenter.getAccountTransactionsAsync(bank, customer) { response ->
|
||||
context?.asActivity()?.runOnUiThread {
|
||||
if (response.isSuccessful) {
|
||||
transactionAdapter.items = response.bookedTransactions
|
||||
}
|
||||
else {
|
||||
// TODO: show error
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package net.dankito.banking.fints4java.android.ui.home
|
||||
|
||||
import android.arch.lifecycle.LiveData
|
||||
import android.arch.lifecycle.MutableLiveData
|
||||
import android.arch.lifecycle.ViewModel
|
||||
|
||||
class HomeViewModel : ViewModel() {
|
||||
|
||||
private val _text = MutableLiveData<String>().apply {
|
||||
value = "This is home Fragment"
|
||||
}
|
||||
val text: LiveData<String> = _text
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="78.5885"
|
||||
android:endY="90.9159"
|
||||
android:startX="48.7653"
|
||||
android:startY="61.0927"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:centerColor="#009688"
|
||||
android:endColor="#00695C"
|
||||
android:startColor="#4DB6AC"
|
||||
android:type="linear" />
|
||||
</shape>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<include
|
||||
layout="@layout/app_bar_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<include layout="@layout/content_main" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@android:drawable/ic_input_add" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:showIn="@layout/app_bar_main">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:defaultNavHost="true"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navGraph="@navigation/mobile_navigation" />
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/dialog_add_account_padding"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dialog_add_account_label_height"
|
||||
android:text="@string/dialog_add_account_enter_bank_code"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtxtBankCode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dialog_add_account_edit_text_height"
|
||||
android:layout_marginBottom="@dimen/dialog_add_account_field_bottom_margin"
|
||||
android:text="72051210"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dialog_add_account_label_height"
|
||||
android:text="@string/dialog_add_account_enter_customer_id"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtxtCustomerId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dialog_add_account_edit_text_height"
|
||||
android:layout_marginBottom="@dimen/dialog_add_account_field_bottom_margin"
|
||||
android:text="560165557"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dialog_add_account_label_height"
|
||||
android:text="@string/dialog_add_account_enter_pin"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edtxtPin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dialog_add_account_edit_text_height"
|
||||
android:layout_marginBottom="@dimen/dialog_add_account_field_bottom_margin"
|
||||
android:text="Liebe"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/lytButtonBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSelect"
|
||||
android:layout_width="@dimen/dialog_add_account_buttons_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/select"
|
||||
android:enabled="false"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnCancel"
|
||||
android:layout_width="@dimen/dialog_add_account_buttons_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toLeftOf="@+id/btnSelect"
|
||||
android:layout_toStartOf="@+id/btnSelect"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:text="@string/cancel"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rcyvwAccountTransactions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/list_item_account_transaction_height"
|
||||
android:padding="@dimen/list_item_account_transaction_padding"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvwBookingDate"
|
||||
android:layout_width="@dimen/list_item_account_transaction_date_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center_vertical"
|
||||
android:text="19.08.19"
|
||||
/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toRightOf="@+id/txtvwBookingDate"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toLeftOf="@+id/txtvwAmount"
|
||||
android:layout_toEndOf="@+id/txtvwBookingDate"
|
||||
android:layout_toStartOf="@+id/txtvwAmount"
|
||||
android:layout_marginLeft="@dimen/list_item_account_transaction_transaction_text_margin_left_and_right"
|
||||
android:layout_marginStart="@dimen/list_item_account_transaction_transaction_text_margin_left_and_right"
|
||||
android:layout_marginRight="@dimen/list_item_account_transaction_transaction_text_margin_left_and_right"
|
||||
android:layout_marginEnd="@dimen/list_item_account_transaction_transaction_text_margin_left_and_right"
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvwBookingText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ueberweisung"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvwOtherPartyName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/list_item_account_transaction_other_party_name_margin_top_and_bottom"
|
||||
android:layout_marginBottom="@dimen/list_item_account_transaction_other_party_name_margin_top_and_bottom"
|
||||
android:text="Device Insight GmbH"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvwUsage1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1908301/EUR 8144.36/2019-10-02/..."
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvwUsage2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:text="2019-09-27T19.44 Debitk.3 2019-12"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvwAmount"
|
||||
android:layout_width="@dimen/list_item_account_transaction_amount_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center_vertical|end"
|
||||
android:text="18.123,45"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/nav_header_height"
|
||||
android:background="@drawable/side_nav_bar"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/nav_header_desc"
|
||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||
app:srcCompat="@mipmap/ic_launcher_round" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||
android:text="@string/nav_header_title"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nav_header_subtitle" />
|
||||
|
||||
</LinearLayout>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:showIn="navigation_view">
|
||||
|
||||
</menu>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
</menu>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/mobile_navigation"
|
||||
app:startDestination="@+id/nav_home">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_home"
|
||||
android:name="net.dankito.banking.fints4java.android.ui.home.HomeFragment"
|
||||
android:label="@string/menu_home"
|
||||
tools:layout="@layout/fragment_home" />
|
||||
|
||||
</navigation>
|
|
@ -0,0 +1,8 @@
|
|||
<resources>
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="positiveAmount">#00FF00</color>
|
||||
<color name="negativeAmount">#FF0000</color>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,22 @@
|
|||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="nav_header_vertical_spacing">8dp</dimen>
|
||||
<dimen name="nav_header_height">176dp</dimen>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
|
||||
<dimen name="list_item_account_transaction_height">100dp</dimen>
|
||||
<dimen name="list_item_account_transaction_padding">4dp</dimen>
|
||||
<dimen name="list_item_account_transaction_date_width">60dp</dimen>
|
||||
<dimen name="list_item_account_transaction_amount_width">70dp</dimen>
|
||||
<dimen name="list_item_account_transaction_transaction_text_margin_left_and_right">4dp</dimen>
|
||||
<dimen name="list_item_account_transaction_other_party_name_margin_top_and_bottom">6dp</dimen>
|
||||
|
||||
<dimen name="dialog_add_account_padding">4dp</dimen>
|
||||
<dimen name="dialog_add_account_label_height">24dp</dimen>
|
||||
<dimen name="dialog_add_account_edit_text_height">40dp</dimen>
|
||||
<dimen name="dialog_add_account_field_bottom_margin">12dp</dimen>
|
||||
<dimen name="dialog_add_account_buttons_width">120dp</dimen>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,3 @@
|
|||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,19 @@
|
|||
<resources>
|
||||
<string name="app_name">FinTS</string>
|
||||
|
||||
<string name="select">Select</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
<string name="nav_header_title">Android Studio</string>
|
||||
<string name="nav_header_subtitle">android.studio@android.com</string>
|
||||
<string name="nav_header_desc">Navigation header</string>
|
||||
|
||||
<string name="menu_home">Home</string>
|
||||
|
||||
<string name="dialog_add_account_enter_bank_code">Bank code:</string>
|
||||
<string name="dialog_add_account_enter_customer_id">Customer Id:</string>
|
||||
<string name="dialog_add_account_enter_pin">Pin:</string>
|
||||
|
||||
</resources>
|
|
@ -0,0 +1,20 @@
|
|||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
</resources>
|
|
@ -2,4 +2,6 @@ rootProject.name = 'fints4java'
|
|||
|
||||
include ':fints4javaLib'
|
||||
|
||||
include ':fints4javaAndroidApp'
|
||||
|
||||
include ':BankListCreator'
|