├── common ├── .gitignore ├── build.gradle └── src │ └── main │ └── java │ └── com │ └── code44 │ └── finance │ └── common │ ├── utils │ └── Strings.java │ ├── Constants.java │ └── model │ ├── DecimalSeparator.java │ ├── GroupSeparator.java │ ├── TransactionState.java │ ├── ModelState.java │ ├── TransactionType.java │ └── SymbolPosition.java ├── financius ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── menu │ │ │ │ ├── common.xml │ │ │ │ ├── currencies.xml │ │ │ │ ├── user.xml │ │ │ │ ├── models.xml │ │ │ │ └── model.xml │ │ │ ├── values │ │ │ │ ├── ids.xml │ │ │ │ └── consts.xml │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_arrow_down_small.png │ │ │ │ ├── ic_arrow_right_small.png │ │ │ │ ├── ic_action_chevron_left.png │ │ │ │ ├── ic_action_chevron_right.png │ │ │ │ └── navigation_header_placeholder.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── btn_fab_normal.png │ │ │ │ ├── ic_action_date.png │ │ │ │ ├── ic_action_edit.png │ │ │ │ ├── ic_action_new.png │ │ │ │ ├── ic_action_note.png │ │ │ │ ├── ic_action_tags.png │ │ │ │ ├── ic_empty_add.png │ │ │ │ ├── btn_fab_pressed.png │ │ │ │ ├── ic_action_account.png │ │ │ │ ├── ic_action_overview.png │ │ │ │ ├── ic_action_refresh.png │ │ │ │ ├── ic_action_reports.png │ │ │ │ ├── ic_action_settings.png │ │ │ │ ├── ic_action_category_type.png │ │ │ │ └── ic_action_transactions.png │ │ │ ├── values-land │ │ │ │ ├── consts.xml │ │ │ │ └── dimens.xml │ │ │ ├── values-sw600dp │ │ │ │ └── consts.xml │ │ │ ├── values-sw720dp │ │ │ │ └── consts.xml │ │ │ ├── values-sw600dp-land │ │ │ │ └── consts.xml │ │ │ ├── values-sw720dp-land │ │ │ │ └── consts.xml │ │ │ ├── values-v16 │ │ │ │ └── consts.xml │ │ │ ├── layout │ │ │ │ ├── toolbar.xml │ │ │ │ ├── toolbar_transparent.xml │ │ │ │ ├── fragment_navigation.xml │ │ │ │ ├── li_navigation_divider.xml │ │ │ │ ├── activity_settings.xml │ │ │ │ ├── activity_simple.xml │ │ │ │ ├── include_navigation.xml │ │ │ │ ├── li_dialog_multiple_choice.xml │ │ │ │ ├── activity_export.xml │ │ │ │ ├── activity_import.xml │ │ │ │ ├── activity_drawer.xml │ │ │ │ ├── li_settings.xml │ │ │ │ ├── li_dialog_simple.xml │ │ │ │ ├── li_navigation_header.xml │ │ │ │ ├── li_category_header.xml │ │ │ │ ├── li_transaction_header.xml │ │ │ │ ├── activity_unlock.xml │ │ │ │ ├── view_empty_container.xml │ │ │ │ ├── view_pin_lock.xml │ │ │ │ ├── activity_lock.xml │ │ │ │ ├── view_balance_graph.xml │ │ │ │ ├── view_trends_graph.xml │ │ │ │ ├── activity_categories.xml │ │ │ │ ├── li_dialog_single_choice.xml │ │ │ │ ├── activity_transactions.xml │ │ │ │ ├── li_settings_subtitle.xml │ │ │ │ ├── include_account.xml │ │ │ │ ├── li_currency_account.xml │ │ │ │ ├── activity_tags.xml │ │ │ │ ├── view_categories_report.xml │ │ │ │ ├── fragment_reports.xml │ │ │ │ ├── dialog_fragment_list.xml │ │ │ │ ├── li_category.xml │ │ │ │ ├── li_tag.xml │ │ │ │ ├── include_dialog_buttons.xml │ │ │ │ ├── li_navigation.xml │ │ │ │ ├── fragment_user.xml │ │ │ │ ├── activity_categories_report.xml │ │ │ │ ├── li_currency.xml │ │ │ │ ├── include_edit_buttons.xml │ │ │ │ ├── li_account.xml │ │ │ │ ├── li_category_report_tag.xml │ │ │ │ ├── view_overview_graph.xml │ │ │ │ ├── view_accounts.xml │ │ │ │ ├── view_active_interval.xml │ │ │ │ ├── dialog_fragment_alert.xml │ │ │ │ ├── activity_accounts.xml │ │ │ │ └── activity_tag_edit.xml │ │ │ ├── drawable-v21 │ │ │ │ └── btn_fab.xml │ │ │ ├── drawable │ │ │ │ ├── btn_fab.xml │ │ │ │ └── circle.xml │ │ │ └── layout-land │ │ │ │ └── activity_categories_report.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── code44 │ │ │ │ └── finance │ │ │ │ ├── graphs │ │ │ │ ├── plot │ │ │ │ │ └── Plot.java │ │ │ │ ├── bar │ │ │ │ │ └── BarGraphView.java │ │ │ │ ├── GraphValue.java │ │ │ │ ├── line │ │ │ │ │ ├── PathMaker.java │ │ │ │ │ ├── LineGraphValue.java │ │ │ │ │ └── SharpPathMaker.java │ │ │ │ ├── pie │ │ │ │ │ ├── PieChartValue.java │ │ │ │ │ └── PieChartData.java │ │ │ │ └── MoneyGraphValue.java │ │ │ │ ├── ui │ │ │ │ ├── dialogs │ │ │ │ │ └── IntervalDialogFragment.java │ │ │ │ ├── reports │ │ │ │ │ ├── BaseReportFragment.java │ │ │ │ │ ├── BaseReportActivity.java │ │ │ │ │ └── categories │ │ │ │ │ │ ├── TagExpenseComparator.java │ │ │ │ │ │ └── CategoryExpenseComparator.java │ │ │ │ ├── transactions │ │ │ │ │ ├── edit │ │ │ │ │ │ ├── autocomplete │ │ │ │ │ │ │ ├── FinderScore.java │ │ │ │ │ │ │ └── TransactionAutoComplete.java │ │ │ │ │ │ ├── presenters │ │ │ │ │ │ │ ├── AutoCompletePresenter.java │ │ │ │ │ │ │ ├── FlagsPresenter.java │ │ │ │ │ │ │ ├── TransactionStatePresenter.java │ │ │ │ │ │ │ ├── DateTimePresenter.java │ │ │ │ │ │ │ └── TransactionTypePresenter.java │ │ │ │ │ │ └── TransactionEditActivity.java │ │ │ │ │ ├── detail │ │ │ │ │ │ └── TransactionActivity.java │ │ │ │ │ └── list │ │ │ │ │ │ └── TransactionsActivity.java │ │ │ │ ├── common │ │ │ │ │ ├── ViewBackgroundTheme.java │ │ │ │ │ ├── navigation │ │ │ │ │ │ └── NavigationScreen.java │ │ │ │ │ ├── presenters │ │ │ │ │ │ └── Presenter.java │ │ │ │ │ ├── BaseModelsAdapter.java │ │ │ │ │ └── views │ │ │ │ │ │ ├── TintImageView.java │ │ │ │ │ │ └── TintImageButton.java │ │ │ │ ├── BaseFragment.java │ │ │ │ ├── ModelEditActivityOld.java │ │ │ │ ├── tags │ │ │ │ │ ├── edit │ │ │ │ │ │ └── TagEditActivity.java │ │ │ │ │ ├── list │ │ │ │ │ │ ├── TagsActivityPresenter.java │ │ │ │ │ │ ├── TagsActivity.java │ │ │ │ │ │ └── TagsAdapter.java │ │ │ │ │ └── detail │ │ │ │ │ │ └── TagActivity.java │ │ │ │ ├── categories │ │ │ │ │ ├── edit │ │ │ │ │ │ └── CategoryEditActivity.java │ │ │ │ │ ├── detail │ │ │ │ │ │ └── CategoryActivity.java │ │ │ │ │ └── list │ │ │ │ │ │ └── CategoriesActivity.java │ │ │ │ ├── currencies │ │ │ │ │ ├── edit │ │ │ │ │ │ └── CurrencyEditActivity.java │ │ │ │ │ └── detail │ │ │ │ │ │ └── CurrencyActivity.java │ │ │ │ ├── SplashActivity.java │ │ │ │ ├── settings │ │ │ │ │ ├── data │ │ │ │ │ │ └── DataActivity.java │ │ │ │ │ └── security │ │ │ │ │ │ └── LockView.java │ │ │ │ ├── FilePickerActivity.java │ │ │ │ ├── playservices │ │ │ │ │ └── GoogleApiConnection.java │ │ │ │ └── accounts │ │ │ │ │ ├── edit │ │ │ │ │ └── AccountEditActivity.java │ │ │ │ │ └── detail │ │ │ │ │ └── AccountActivity.java │ │ │ │ ├── qualifiers │ │ │ │ ├── Local.java │ │ │ │ ├── Network.java │ │ │ │ ├── AppTracker.java │ │ │ │ └── ApplicationContext.java │ │ │ │ ├── utils │ │ │ │ ├── errors │ │ │ │ │ ├── ExportError.java │ │ │ │ │ ├── ImportError.java │ │ │ │ │ └── AppError.java │ │ │ │ ├── interval │ │ │ │ │ ├── CurrentInterval.java │ │ │ │ │ └── ActiveInterval.java │ │ │ │ ├── EventBus.java │ │ │ │ ├── ThemeUtils.java │ │ │ │ ├── LocalExecutor.java │ │ │ │ ├── AccountUtils.java │ │ │ │ ├── TextBackgroundSpan.java │ │ │ │ ├── LayoutType.java │ │ │ │ ├── analytics │ │ │ │ │ └── Analytics.java │ │ │ │ └── CategoryUtils.java │ │ │ │ ├── api │ │ │ │ ├── currencies │ │ │ │ │ ├── CurrenciesRequestService.java │ │ │ │ │ ├── ExchangeRatesResponse.java │ │ │ │ │ └── CurrenciesApi.java │ │ │ │ ├── Result.java │ │ │ │ ├── requests │ │ │ │ │ ├── PostRequest.java │ │ │ │ │ ├── GetTagsRequest.java │ │ │ │ │ ├── PostTagsRequest.java │ │ │ │ │ ├── GetCategoriesRequest.java │ │ │ │ │ ├── PostAccountsRequest.java │ │ │ │ │ ├── GetCurrenciesRequest.java │ │ │ │ │ ├── PostCategoriesRequest.java │ │ │ │ │ ├── PostCurrenciesRequest.java │ │ │ │ │ └── PostTransactionsRequest.java │ │ │ │ ├── NetworkExecutor.java │ │ │ │ └── Request.java │ │ │ │ ├── modules │ │ │ │ ├── ViewModule.java │ │ │ │ ├── providers │ │ │ │ │ ├── ContextProviderModule.java │ │ │ │ │ └── AnalyticsProviderModule.java │ │ │ │ ├── AppModule.java │ │ │ │ ├── AccountModule.java │ │ │ │ └── CurrenciesApiModule.java │ │ │ │ ├── data │ │ │ │ ├── backup │ │ │ │ │ ├── DataImporter.java │ │ │ │ │ ├── DataExporter.java │ │ │ │ │ ├── DataExporterRunnable.java │ │ │ │ │ └── DataImporterRunnable.java │ │ │ │ ├── model │ │ │ │ │ ├── SyncState.java │ │ │ │ │ └── BaseModel.java │ │ │ │ └── providers │ │ │ │ │ └── BaseProvider.java │ │ │ │ ├── receivers │ │ │ │ └── GcmBroadcastReceiver.java │ │ │ │ ├── services │ │ │ │ └── GcmService.java │ │ │ │ ├── views │ │ │ │ └── SquareButton.java │ │ │ │ └── App.java │ │ └── assets │ │ │ └── fonts │ │ │ ├── Roboto-Light.ttf │ │ │ ├── Roboto-Medium.ttf │ │ │ └── Roboto-Regular.ttf │ ├── test │ │ └── resources │ │ │ └── org.robolectric.Config.properties │ ├── debug │ │ ├── res │ │ │ └── values │ │ │ │ └── strings_consts.xml │ │ └── java │ │ │ └── com │ │ │ └── code44 │ │ │ └── finance │ │ │ └── Modules.java │ └── release │ │ └── java │ │ └── com │ │ └── code44 │ │ └── finance │ │ └── Modules.java ├── debug.keystore ├── libs │ └── hellocharts-library-1.3.aar └── proguard-rules.pro ├── SETUP.md ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── backend ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── code44 │ │ │ └── finance │ │ │ └── backend │ │ │ ├── endpoint │ │ │ └── body │ │ │ │ ├── Body.java │ │ │ │ ├── EntitiesBody.java │ │ │ │ ├── TagsBody.java │ │ │ │ ├── CategoriesBody.java │ │ │ │ ├── CurrenciesBody.java │ │ │ │ ├── AccountsBody.java │ │ │ │ ├── TransactionsBody.java │ │ │ │ ├── RegisterDeviceBody.java │ │ │ │ └── RegisterBody.java │ │ │ ├── entity │ │ │ ├── DeviceEntity.java │ │ │ └── TagEntity.java │ │ │ └── OfyService.java │ │ └── webapp │ │ └── WEB-INF │ │ ├── appengine-web.xml │ │ ├── logging.properties │ │ └── web.xml └── build.gradle ├── .gitignore ├── gradle.properties └── README.md /common/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /financius/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /SETUP.md: -------------------------------------------------------------------------------- 1 | - Add crashlytics.properties to financius module. -------------------------------------------------------------------------------- /financius/src/main/res/menu/common.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':financius', ':backend', ':common' 2 | -------------------------------------------------------------------------------- /financius/src/test/resources/org.robolectric.Config.properties: -------------------------------------------------------------------------------- 1 | emulateSdk: 18 2 | reportSdk: 18 -------------------------------------------------------------------------------- /financius/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /financius/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/debug.keystore -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /common/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | dependencies { 4 | compile fileTree(dir: 'libs', include: ['*.jar']) 5 | } -------------------------------------------------------------------------------- /financius/libs/hellocharts-library-1.3.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/libs/hellocharts-library-1.3.aar -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/plot/Plot.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs.plot; 2 | 3 | public class Plot { 4 | } 5 | -------------------------------------------------------------------------------- /financius/src/main/assets/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/assets/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /financius/src/main/assets/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/assets/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /financius/src/main/assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/bar/BarGraphView.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs.bar; 2 | 3 | public class BarGraphView { 4 | } 5 | -------------------------------------------------------------------------------- /financius/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/Body.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | public interface Body { 4 | } 5 | -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/btn_fab_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/btn_fab_normal.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_date.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_edit.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_new.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_note.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_tags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_tags.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_empty_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_empty_add.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/btn_fab_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/btn_fab_pressed.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxhdpi/ic_arrow_down_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxhdpi/ic_arrow_down_small.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxhdpi/ic_arrow_right_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxhdpi/ic_arrow_right_small.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_account.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_overview.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_reports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_reports.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_settings.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxhdpi/ic_action_chevron_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxhdpi/ic_action_chevron_left.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxhdpi/ic_action_chevron_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxhdpi/ic_action_chevron_right.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_category_type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_category_type.png -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxxhdpi/ic_action_transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxxhdpi/ic_action_transactions.png -------------------------------------------------------------------------------- /financius/src/main/res/values-land/consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | -------------------------------------------------------------------------------- /financius/src/main/res/values-sw600dp/consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2 4 | -------------------------------------------------------------------------------- /financius/src/main/res/values-sw720dp/consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 4 | -------------------------------------------------------------------------------- /financius/src/main/res/values-sw600dp-land/consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 3 4 | -------------------------------------------------------------------------------- /financius/src/main/res/values-sw720dp-land/consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 4 | -------------------------------------------------------------------------------- /financius/src/main/res/drawable-xxhdpi/navigation_header_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mvarnagiris/financius/HEAD/financius/src/main/res/drawable-xxhdpi/navigation_header_placeholder.png -------------------------------------------------------------------------------- /financius/src/debug/res/values/strings_consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Financius D 5 | 6 | 7 | -------------------------------------------------------------------------------- /financius/src/main/res/values-v16/consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | sans-serif-thin 4 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/GraphValue.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs; 2 | 3 | public interface GraphValue { 4 | public double getValue(); 5 | 6 | public abstract String getFormattedValue(); 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | local.properties 4 | build 5 | /.idea/* 6 | !/.idea/codeStyleSettings.xml 7 | financius/crashlytics.properties 8 | com_crashlytics_export_strings.xml 9 | crashlytics-build.properties 10 | .DS_Store 11 | Thumbs.db -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/dialogs/IntervalDialogFragment.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.dialogs; 2 | 3 | import android.app.DialogFragment; 4 | 5 | public class IntervalDialogFragment extends DialogFragment { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/reports/BaseReportFragment.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.reports; 2 | 3 | import com.code44.finance.ui.BaseFragment; 4 | 5 | public abstract class BaseReportFragment extends BaseFragment { 6 | } 7 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /financius/src/main/res/values-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 64dp 4 | 5 | 40dp 6 | 56dp 7 | 8 | 9 | -------------------------------------------------------------------------------- /financius/src/main/res/drawable-v21/btn_fab.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/reports/BaseReportActivity.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.reports; 2 | 3 | import com.code44.finance.ui.common.activities.BaseDrawerActivity; 4 | 5 | public abstract class BaseReportActivity extends BaseDrawerActivity { 6 | } 7 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/toolbar_transparent.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Oct 31 22:04:07 GMT 2014 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/fragment_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /common/src/main/java/com/code44/finance/common/utils/Strings.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.common.utils; 2 | 3 | public final class Strings { 4 | private Strings() { 5 | } 6 | 7 | public static boolean isEmpty(String str) { 8 | return str == null || str.length() == 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/line/PathMaker.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs.line; 2 | 3 | import android.graphics.Path; 4 | import android.graphics.PointF; 5 | 6 | import java.util.List; 7 | 8 | public interface PathMaker { 9 | public Path makePath(List points); 10 | } 11 | -------------------------------------------------------------------------------- /financius/src/main/res/drawable/btn_fab.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /financius/src/main/res/menu/currencies.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/transactions/edit/autocomplete/FinderScore.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.transactions.edit.autocomplete; 2 | 3 | import com.code44.finance.data.model.Transaction; 4 | 5 | public interface FinderScore { 6 | public void add(Transaction transaction); 7 | 8 | public float getScore(); 9 | } 10 | -------------------------------------------------------------------------------- /financius/src/main/res/menu/user.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /financius/src/main/res/menu/models.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/common/ViewBackgroundTheme.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.common; 2 | 3 | public enum ViewBackgroundTheme { 4 | Light, Dark; 5 | 6 | public static ViewBackgroundTheme from(int value) { 7 | if (value == 1) { 8 | return Dark; 9 | } 10 | return Light; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/line/LineGraphValue.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs.line; 2 | 3 | public class LineGraphValue { 4 | private final double value; 5 | 6 | public LineGraphValue(double value) { 7 | this.value = value; 8 | } 9 | 10 | public double getValue() { 11 | return value; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /financius/src/main/res/drawable/circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /financius/src/debug/java/com/code44/finance/Modules.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance; 2 | 3 | import com.code44.finance.modules.AppModule; 4 | 5 | final class Modules { 6 | private Modules() { 7 | // No instances. 8 | } 9 | 10 | static Object[] list(App app) { 11 | return new Object[]{ 12 | new AppModule(app) 13 | }; 14 | } 15 | } -------------------------------------------------------------------------------- /financius/src/release/java/com/code44/finance/Modules.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance; 2 | 3 | import com.code44.finance.modules.AppModule; 4 | 5 | final class Modules { 6 | private Modules() { 7 | // No instances. 8 | } 9 | 10 | static Object[] list(App app) { 11 | return new Object[]{ 12 | new AppModule(app) 13 | }; 14 | } 15 | } -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/qualifiers/Local.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.qualifiers; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.inject.Qualifier; 8 | 9 | @Qualifier 10 | @Documented 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface Local { 13 | } 14 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/qualifiers/Network.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.qualifiers; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.inject.Qualifier; 8 | 9 | @Qualifier 10 | @Documented 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface Network { 13 | } 14 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/utils/errors/ExportError.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.utils.errors; 2 | 3 | public class ExportError extends AppError { 4 | public ExportError(String detailMessage) { 5 | super(detailMessage); 6 | } 7 | 8 | public ExportError(String detailMessage, Throwable throwable) { 9 | super(detailMessage, throwable); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/utils/errors/ImportError.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.utils.errors; 2 | 3 | public class ImportError extends AppError { 4 | public ImportError(String detailMessage) { 5 | super(detailMessage); 6 | } 7 | 8 | public ImportError(String detailMessage, Throwable throwable) { 9 | super(detailMessage, throwable); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/qualifiers/AppTracker.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.qualifiers; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.inject.Qualifier; 8 | 9 | @Qualifier 10 | @Documented 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface AppTracker { 13 | } 14 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/EntitiesBody.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | public class EntitiesBody { 4 | private final String deviceRegId; 5 | 6 | public EntitiesBody(String deviceRegId) { 7 | this.deviceRegId = deviceRegId; 8 | } 9 | 10 | public String getDeviceRegId() { 11 | return deviceRegId; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/api/currencies/CurrenciesRequestService.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.api.currencies; 2 | 3 | import retrofit.http.GET; 4 | import retrofit.http.Query; 5 | 6 | public interface CurrenciesRequestService { 7 | @GET("/v1/public/yql?env=store://datatables.org/alltableswithkeys&format=json") 8 | public ExchangeRatesResponse getExchangeRates(@Query("q") String query); 9 | } 10 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/qualifiers/ApplicationContext.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.qualifiers; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | 7 | import javax.inject.Qualifier; 8 | 9 | @Qualifier 10 | @Documented 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface ApplicationContext { 13 | } 14 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_navigation_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/common/navigation/NavigationScreen.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.common.navigation; 2 | 3 | public enum NavigationScreen { 4 | User(1), Overview(2), Accounts(3), Transactions(4), Reports(5), Settings(6); 5 | 6 | private final int id; 7 | 8 | NavigationScreen(int id) { 9 | this.id = id; 10 | } 11 | 12 | public int getId() { 13 | return id; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/pie/PieChartValue.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs.pie; 2 | 3 | public class PieChartValue { 4 | private final long value; 5 | private final int color; 6 | 7 | public PieChartValue(long value, int color) { 8 | this.value = value; 9 | this.color = color; 10 | } 11 | 12 | public long getValue() { 13 | return value; 14 | } 15 | 16 | public int getColor() { 17 | return color; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/MoneyGraphValue.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs; 2 | 3 | public class MoneyGraphValue implements GraphValue { 4 | private final long value; 5 | 6 | public MoneyGraphValue(long value) { 7 | this.value = value; 8 | } 9 | 10 | @Override 11 | public double getValue() { 12 | return value; 13 | } 14 | 15 | @Override 16 | public String getFormattedValue() { 17 | return String.valueOf(value); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_settings.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/utils/errors/AppError.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.utils.errors; 2 | 3 | public class AppError extends RuntimeException { 4 | public AppError() { 5 | } 6 | 7 | public AppError(String detailMessage) { 8 | super(detailMessage); 9 | } 10 | 11 | public AppError(String detailMessage, Throwable throwable) { 12 | super(detailMessage, throwable); 13 | } 14 | 15 | public AppError(Throwable throwable) { 16 | super(throwable); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/webapp/WEB-INF/appengine-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | financius-app 4 | 1 5 | true 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/include_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /backend/src/main/webapp/WEB-INF/logging.properties: -------------------------------------------------------------------------------- 1 | # A default java.util.logging configuration. 2 | # (All App Engine logging is through java.util.logging by default). 3 | # 4 | # To use this configuration, copy it into your application's WEB-INF 5 | # folder and add the following to your appengine-web.xml: 6 | # 7 | # 8 | # 9 | # 10 | # 11 | 12 | # Set the default logging level for all loggers to WARNING 13 | .level = WARNING 14 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/transactions/edit/presenters/AutoCompletePresenter.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.transactions.edit.presenters; 2 | 3 | import android.view.View; 4 | 5 | import com.code44.finance.ui.transactions.edit.autocomplete.AutoCompleteAdapter; 6 | 7 | public interface AutoCompletePresenter { 8 | public AutoCompleteAdapter showAutoComplete(AutoCompleteAdapter currentAdapter, TransactionEditData transactionEditData, AutoCompleteAdapter.OnAutoCompleteItemClickListener clickListener, View view); 9 | } 10 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_dialog_multiple_choice.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/TagsBody.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | import com.code44.finance.backend.entity.TagEntity; 4 | 5 | import java.util.List; 6 | 7 | public class TagsBody extends EntitiesBody { 8 | private final List tags; 9 | 10 | public TagsBody(List tags, String deviceRegId) { 11 | super(deviceRegId); 12 | this.tags = tags; 13 | } 14 | 15 | public List getTags() { 16 | return tags; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/api/Result.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.api; 2 | 3 | public class Result { 4 | private final T data; 5 | private final Exception error; 6 | 7 | public Result(T data, Exception error) { 8 | this.data = data; 9 | this.error = error; 10 | } 11 | 12 | public T getData() { 13 | return data; 14 | } 15 | 16 | public Exception getError() { 17 | return error; 18 | } 19 | 20 | public boolean isSuccess() { 21 | return error == null; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_export.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_import.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /financius/src/main/res/menu/model.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /financius/src/main/res/values/consts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0 4 | sans-serif 5 | sans-serif-light 6 | 7 | sans-serif-thin 8 | sans-serif-medium 9 | 10 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_dialog_simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_navigation_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/CategoriesBody.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | import com.code44.finance.backend.entity.CategoryEntity; 4 | 5 | import java.util.List; 6 | 7 | public class CategoriesBody extends EntitiesBody { 8 | private final List categories; 9 | 10 | public CategoriesBody(List categories, String deviceRegId) { 11 | super(deviceRegId); 12 | this.categories = categories; 13 | } 14 | 15 | public List getCategories() { 16 | return categories; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/CurrenciesBody.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | import com.code44.finance.backend.entity.CurrencyEntity; 4 | 5 | import java.util.List; 6 | 7 | public class CurrenciesBody extends EntitiesBody { 8 | private final List currencies; 9 | 10 | public CurrenciesBody(List currencies, String deviceRegId) { 11 | super(deviceRegId); 12 | this.currencies = currencies; 13 | } 14 | 15 | public List getCurrencies() { 16 | return currencies; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /common/src/main/java/com/code44/finance/common/Constants.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.common; 2 | 3 | public class Constants { 4 | public static final String WEB_CLIENT_ID = "1007413878843-5t32vfui2r35ufc56usmicfnnfkt3h1u.apps.googleusercontent.com"; 5 | public static final String ANDROID_AUDIENCE = WEB_CLIENT_ID; 6 | public static final String ANDROID_CLIENT_ID = "1007413878843-suhpr9i0apd98bd8louuvs6g3p9nc8vk.apps.googleusercontent.com"; 7 | public static final String IOS_CLIENT_ID = "3-ios-apps.googleusercontent.com"; 8 | public static final String EMAIL_SCOPE = "https://www.googleapis.com/auth/userinfo.email"; 9 | } 10 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/BaseFragment.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui; 2 | 3 | 4 | import android.app.Activity; 5 | import android.support.v4.app.Fragment; 6 | 7 | import com.code44.finance.App; 8 | import com.code44.finance.utils.EventBus; 9 | 10 | import javax.inject.Inject; 11 | 12 | public class BaseFragment extends Fragment { 13 | @Inject EventBus eventBus; 14 | 15 | @Override public void onAttach(Activity activity) { 16 | super.onAttach(activity); 17 | App.with(activity).inject(this); 18 | } 19 | 20 | protected EventBus getEventBus() { 21 | return eventBus; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_category_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_transaction_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_unlock.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/AccountsBody.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | import com.code44.finance.backend.entity.AccountEntity; 4 | import com.code44.finance.backend.entity.CategoryEntity; 5 | 6 | import java.util.List; 7 | 8 | public class AccountsBody extends EntitiesBody { 9 | private final List accounts; 10 | 11 | public AccountsBody(List accounts, String deviceRegId) { 12 | super(deviceRegId); 13 | this.accounts = accounts; 14 | } 15 | 16 | public List getAccounts() { 17 | return accounts; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/view_empty_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/modules/ViewModule.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.modules; 2 | 3 | import com.code44.finance.ui.common.ActiveIntervalView; 4 | import com.code44.finance.ui.overview.OverviewGraphView; 5 | import com.code44.finance.ui.reports.categories.CategoriesReportView; 6 | import com.code44.finance.views.AccountsView; 7 | 8 | import dagger.Module; 9 | 10 | @Module( 11 | complete = false, 12 | injects = { 13 | OverviewGraphView.class, 14 | AccountsView.class, 15 | ActiveIntervalView.class, 16 | CategoriesReportView.class 17 | } 18 | ) 19 | public class ViewModule { 20 | } 21 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/utils/interval/CurrentInterval.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.utils.interval; 2 | 3 | import android.content.Context; 4 | 5 | import com.code44.finance.utils.EventBus; 6 | import com.squareup.otto.Produce; 7 | 8 | /** 9 | * Interval based on user settings and phone timestamp. 10 | */ 11 | public class CurrentInterval extends BaseInterval { 12 | public CurrentInterval(Context context, EventBus eventBus, Type type, int length) { 13 | super(context, eventBus, type, length); 14 | eventBus.register(this); 15 | } 16 | 17 | @Produce public CurrentInterval produceCurrentInterval() { 18 | return this; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/view_pin_lock.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/reports/categories/TagExpenseComparator.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.reports.categories; 2 | 3 | import android.support.v4.util.Pair; 4 | 5 | import com.code44.finance.data.model.Tag; 6 | 7 | import java.util.Comparator; 8 | 9 | class TagExpenseComparator implements Comparator> { 10 | @Override public int compare(Pair leftValue, Pair rightValue) { 11 | if (leftValue.second < rightValue.second) { 12 | return 1; 13 | } else if (leftValue.second > rightValue.second) { 14 | return -1; 15 | } else { 16 | return 0; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/reports/categories/CategoryExpenseComparator.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.reports.categories; 2 | 3 | import android.support.v4.util.Pair; 4 | 5 | import com.code44.finance.data.model.Category; 6 | 7 | import java.util.Comparator; 8 | 9 | class CategoryExpenseComparator implements Comparator> { 10 | @Override public int compare(Pair leftValue, Pair rightValue) { 11 | if (leftValue.second < rightValue.second) { 12 | return 1; 13 | } else if (leftValue.second > rightValue.second) { 14 | return -1; 15 | } else { 16 | return 0; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_lock.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/TransactionsBody.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | import com.code44.finance.backend.entity.CategoryEntity; 4 | import com.code44.finance.backend.entity.TransactionEntity; 5 | 6 | import java.util.List; 7 | 8 | public class TransactionsBody extends EntitiesBody { 9 | private final List transactions; 10 | 11 | public TransactionsBody(List transactions, String deviceRegId) { 12 | super(deviceRegId); 13 | this.transactions = transactions; 14 | } 15 | 16 | public List getTransactions() { 17 | return transactions; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/ModelEditActivityOld.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui; 2 | 3 | import android.os.Bundle; 4 | import android.view.Menu; 5 | 6 | public abstract class ModelEditActivityOld extends ModelActivityOld implements ModelEditFragment.ModelEditListener { 7 | @Override protected void onCreate(Bundle savedInstanceState) { 8 | super.onCreate(savedInstanceState); 9 | getSupportActionBar().hide(); 10 | } 11 | 12 | @Override public boolean onCreateOptionsMenu(Menu menu) { 13 | return false; 14 | } 15 | 16 | @Override public void onModelSaved() { 17 | finish(); 18 | } 19 | 20 | @Override public void onModelCanceled() { 21 | finish(); 22 | } 23 | } -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/modules/providers/ContextProviderModule.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.modules.providers; 2 | 3 | import android.content.Context; 4 | 5 | import com.code44.finance.common.utils.Preconditions; 6 | import com.code44.finance.qualifiers.ApplicationContext; 7 | 8 | import dagger.Module; 9 | import dagger.Provides; 10 | 11 | @Module( 12 | library = true 13 | ) 14 | public class ContextProviderModule { 15 | private final Context context; 16 | 17 | public ContextProviderModule(Context context) { 18 | this.context = Preconditions.notNull(context, "Context cannot be null."); 19 | } 20 | 21 | @Provides @ApplicationContext Context provideApplicationContext() { 22 | return context; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/view_balance_graph.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/view_trends_graph.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/endpoint/body/RegisterDeviceBody.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.endpoint.body; 2 | 3 | import com.code44.finance.common.utils.Strings; 4 | import com.google.api.server.spi.response.BadRequestException; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | public class RegisterDeviceBody implements Body { 8 | @SerializedName(value = "registration_id") 9 | private String regId; 10 | 11 | public void verifyRequiredFields() throws BadRequestException { 12 | if (Strings.isEmpty(regId)) { 13 | throw new BadRequestException("registration_id cannot be empty."); 14 | } 15 | } 16 | 17 | public String getRegId() { 18 | return regId; 19 | } 20 | 21 | public void setRegId(String regId) { 22 | this.regId = regId; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_categories.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 11 | 12 | 15 | 16 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/data/backup/DataImporter.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.data.backup; 2 | 3 | import com.code44.finance.common.utils.Preconditions; 4 | 5 | import java.io.Closeable; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | 9 | public abstract class DataImporter implements Closeable { 10 | private final InputStream inputStream; 11 | 12 | public DataImporter(InputStream inputStream) { 13 | this.inputStream = Preconditions.notNull(inputStream, "InputStream cannot be null."); 14 | } 15 | 16 | @Override public void close() throws IOException { 17 | inputStream.close(); 18 | } 19 | 20 | public void importData() throws Exception { 21 | importData(inputStream); 22 | } 23 | 24 | protected abstract void importData(InputStream inputStream) throws Exception; 25 | } 26 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/ui/common/presenters/Presenter.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.ui.common.presenters; 2 | 3 | import android.app.Activity; 4 | import android.support.annotation.IdRes; 5 | import android.view.View; 6 | 7 | public abstract class Presenter { 8 | protected T findView(Activity activity, @IdRes int viewId) { 9 | return findView(activity.findViewById(android.R.id.content), viewId); 10 | } 11 | 12 | protected T findView(View parent, @IdRes int viewId) { 13 | //noinspection unchecked 14 | T view = (T) parent.findViewById(viewId); 15 | if (view == null) { 16 | throw new IllegalStateException("Layout must contain view with id: " + parent.getContext().getResources().getResourceName(viewId)); 17 | } 18 | 19 | return view; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/data/backup/DataExporter.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.data.backup; 2 | 3 | import com.code44.finance.common.utils.Preconditions; 4 | 5 | import java.io.Closeable; 6 | import java.io.IOException; 7 | import java.io.OutputStream; 8 | 9 | public abstract class DataExporter implements Closeable { 10 | private final OutputStream outputStream; 11 | 12 | protected DataExporter(OutputStream outputStream) { 13 | this.outputStream = Preconditions.notNull(outputStream, "OutputStream cannot be null."); 14 | } 15 | 16 | @Override public void close() throws IOException { 17 | outputStream.close(); 18 | } 19 | 20 | public void exportData() throws Exception { 21 | exportData(outputStream); 22 | } 23 | 24 | public abstract void exportData(OutputStream outputStream) throws Exception; 25 | } 26 | -------------------------------------------------------------------------------- /common/src/main/java/com/code44/finance/common/model/DecimalSeparator.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.common.model; 2 | 3 | public enum DecimalSeparator { 4 | Dot("."), 5 | Comma(","), 6 | Space(" "); 7 | 8 | private final String symbol; 9 | 10 | private DecimalSeparator(String symbol) { 11 | this.symbol = symbol; 12 | } 13 | 14 | public static DecimalSeparator fromSymbol(String symbol) { 15 | switch (symbol) { 16 | case ".": 17 | return Dot; 18 | 19 | case ",": 20 | return Comma; 21 | 22 | case " ": 23 | return Space; 24 | 25 | default: 26 | throw new IllegalArgumentException("Symbol '" + symbol + "' is not supported."); 27 | } 28 | } 29 | 30 | public String symbol() { 31 | return symbol; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/graphs/line/SharpPathMaker.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.graphs.line; 2 | 3 | import android.graphics.Path; 4 | import android.graphics.PointF; 5 | 6 | import java.util.List; 7 | 8 | public class SharpPathMaker implements PathMaker { 9 | @Override public Path makePath(List points) { 10 | final Path path = new Path(); 11 | 12 | for (int i = 0, size = points != null ? points.size() : 0; i < size; i++) { 13 | final PointF point = points.get(i); 14 | if (point == null) { 15 | continue; 16 | } 17 | 18 | if (i == 0 || points.get(i - 1) == null) { 19 | path.moveTo(point.x, point.y); 20 | } else { 21 | path.lineTo(point.x, point.y); 22 | } 23 | } 24 | 25 | return path; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_dialog_single_choice.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 20 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/activity_transactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 12 | 13 | 16 | 17 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_settings_subtitle.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/utils/EventBus.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.utils; 2 | 3 | import android.os.Handler; 4 | import android.os.Looper; 5 | 6 | import com.squareup.otto.Bus; 7 | import com.squareup.otto.ThreadEnforcer; 8 | 9 | import javax.inject.Inject; 10 | 11 | public class EventBus extends Bus { 12 | private final Handler handler = new Handler(Looper.getMainLooper()); 13 | 14 | @Inject public EventBus() { 15 | super(ThreadEnforcer.ANY); 16 | } 17 | 18 | @Override public void post(final Object event) { 19 | if (Looper.myLooper() == Looper.getMainLooper()) { 20 | super.post(event); 21 | } else { 22 | handler.post(new Runnable() { 23 | @Override 24 | public void run() { 25 | EventBus.super.post(event); 26 | } 27 | }); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Settings specified in this file will override any Gradle settings 5 | # configured through the IDE. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/receivers/GcmBroadcastReceiver.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.receivers; 2 | 3 | import android.app.Activity; 4 | import android.content.ComponentName; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.support.v4.content.WakefulBroadcastReceiver; 8 | 9 | import com.code44.finance.services.GcmService; 10 | 11 | public class GcmBroadcastReceiver extends WakefulBroadcastReceiver { 12 | @Override 13 | public void onReceive(Context context, Intent intent) { 14 | // Explicitly specify that GcmIntentService will handle the intent. 15 | ComponentName comp = new ComponentName(context.getPackageName(), GcmService.class.getName()); 16 | // Start the service, keeping the device awake while it is launching. 17 | startWakefulService(context, (intent.setComponent(comp))); 18 | setResultCode(Activity.RESULT_OK); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/utils/ThemeUtils.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.utils; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.graphics.drawable.Drawable; 6 | import android.support.annotation.AttrRes; 7 | 8 | public final class ThemeUtils { 9 | private ThemeUtils() { 10 | } 11 | 12 | public static int getColor(Context context, @AttrRes int resId) { 13 | final TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{resId}); 14 | final int color = a.getColor(0, 0); 15 | a.recycle(); 16 | return color; 17 | } 18 | 19 | public static Drawable getDrawable(Context context, @AttrRes int resId) { 20 | final TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{resId}); 21 | final Drawable drawable = a.getDrawable(0); 22 | a.recycle(); 23 | return drawable; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/services/GcmService.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.services; 2 | 3 | import android.app.IntentService; 4 | import android.content.Intent; 5 | 6 | import com.code44.finance.App; 7 | import com.code44.finance.api.Api; 8 | import com.code44.finance.receivers.GcmBroadcastReceiver; 9 | 10 | import javax.inject.Inject; 11 | 12 | public class GcmService extends IntentService { 13 | @Inject Api api; 14 | 15 | public GcmService() { 16 | super(GcmService.class.getSimpleName()); 17 | } 18 | 19 | @Override public void onCreate() { 20 | super.onCreate(); 21 | App.with(getApplicationContext()).inject(this); 22 | } 23 | 24 | @Override protected void onHandleIntent(Intent intent) { 25 | api.sync(); 26 | 27 | // Release the wake lock provided by the WakefulBroadcastReceiver. 28 | GcmBroadcastReceiver.completeWakefulIntent(intent); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /backend/src/main/java/com/code44/finance/backend/entity/DeviceEntity.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.backend.entity; 2 | 3 | import com.google.api.server.spi.config.AnnotationBoolean; 4 | import com.google.api.server.spi.config.ApiResourceProperty; 5 | import com.googlecode.objectify.Key; 6 | import com.googlecode.objectify.annotation.Entity; 7 | 8 | import static com.code44.finance.backend.OfyService.ofy; 9 | 10 | @Entity 11 | public class DeviceEntity extends BaseEntity { 12 | @ApiResourceProperty(ignored = AnnotationBoolean.TRUE) 13 | private Key userAccount; 14 | 15 | public static DeviceEntity find(String id) { 16 | return ofy().load().type(DeviceEntity.class).id(id).now(); 17 | } 18 | 19 | public Key getUserAccount() { 20 | return userAccount; 21 | } 22 | 23 | public void setUserAccount(Key userAccount) { 24 | this.userAccount = userAccount; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /common/src/main/java/com/code44/finance/common/model/GroupSeparator.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.common.model; 2 | 3 | public enum GroupSeparator { 4 | None(""), 5 | Dot("."), 6 | Comma(","), 7 | Space(" "); 8 | 9 | private final String symbol; 10 | 11 | private GroupSeparator(String symbol) { 12 | this.symbol = symbol; 13 | } 14 | 15 | public static GroupSeparator fromSymbol(String symbol) { 16 | switch (symbol) { 17 | case "": 18 | return None; 19 | 20 | case ".": 21 | return Dot; 22 | 23 | case ",": 24 | return Comma; 25 | 26 | case " ": 27 | return Space; 28 | 29 | default: 30 | throw new IllegalArgumentException("Symbol '" + symbol + "' is not supported."); 31 | } 32 | } 33 | 34 | public String symbol() { 35 | return symbol; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /financius/src/main/java/com/code44/finance/views/SquareButton.java: -------------------------------------------------------------------------------- 1 | package com.code44.finance.views; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.Button; 6 | 7 | @SuppressWarnings("UnusedDeclaration") 8 | public class SquareButton extends Button { 9 | public SquareButton(Context context) { 10 | super(context); 11 | } 12 | 13 | public SquareButton(Context context, AttributeSet attrs) { 14 | super(context, attrs); 15 | } 16 | 17 | public SquareButton(Context context, AttributeSet attrs, int defStyle) { 18 | super(context, attrs, defStyle); 19 | } 20 | 21 | @Override 22 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 23 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 24 | final int size = Math.min(getMeasuredWidth(), getMeasuredHeight()); 25 | setMeasuredDimension(size, size); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/include_account.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 25 | 26 | -------------------------------------------------------------------------------- /financius/src/main/res/layout/li_currency_account.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 |