+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/.idea/vcs.xml b/App_Santander_Test/.idea/vcs.xml
new file mode 100644
index 000000000..35eb1ddfb
--- /dev/null
+++ b/App_Santander_Test/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/LICENSE b/App_Santander_Test/LICENSE
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/App_Santander_Test/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/App_Santander_Test/README.md b/App_Santander_Test/README.md
new file mode 100644
index 000000000..9e8f0286a
--- /dev/null
+++ b/App_Santander_Test/README.md
@@ -0,0 +1,33 @@
+# appBank_Santander
+
+Teste realizado por Ivan Costa em 10 de dezembro de 2020;
+
+A arquitetura utilizada para desenvolvimento do App foi uma arquitetura limpa/hexagonal, baseada em MVP.
+
+A estrutura do app está divida em alguns pacotes principais, sendo eles:
+
+- Adapter - que contém uma classe adapter para o objeto Statement que será exibido na tela por meio de uma recycler view
+- Api - Que contém boa parte da arquitetura, sendo responsável por configurar e estabelecer a conexão com as Apis;
+- Dagger - Onde estão as classes responsáveis por implementar toda parte de programação Reativa utilizando RxAndroid.
+- Database - Importante para a manutenção e Persistência de Dados utilizando o Realm;
+- Infraestrutura - Com uma classe WorkerOperator que instancia um Observable para testes;
+- Model - Criação de modelos de objetos que são consumidos dentro do app, como User e Statement;
+- Utils - Classes utilizadas para formatação de campos e validação de força de senha;
+- View - Package onde estão contidas as classes referentes a camada de UI da aplicação.
+
+Para testar o funcionamento das chamadas de API, utilizei os dados que estavam pré-cadastrados no json enviado e adicionei mais alguns.
+Para testar, utilizar o usuário test_user com senha Test@123
+
+A validação de senha também foi feita. Para que o usuário consiga se logar, solicito uma senha com pelo menos 8 caracteres, uma letra maíuscula e um caracter especial. Sem isso,
+é retornado um toast informando que é necessário adicionar uma senha forte.
+
+Fiz uma validação para campo vazio. Caso o usuário não preencha um dos campos, é retornado para ele a necessidade de preencher esses campos.
+
+O preenchimento dos dados vindos da api de Statements é feito por meio de um recycler view. O adapter recebe os dados que vem da api por meio de uma chamada
+ao Retrofit e seta esses dados na tela num fragment que foi criado (uma espécie de card).
+
+Nas chamadas ao Retrofit, também utilizei Clean Architeture. As chamadas são feitas em background e os objetos são setados na tela
+sem oneração ao processamento do App. As chamadas estão sendo realizadas na classe BreedApiService, que está
+dentro do repositório Api.
+
+Com relação aos testes, implementei os testes unitários do próprio Android, além do Junit, o Espresso, o Mockito e o Hamcrest.
diff --git a/App_Santander_Test/app/.DS_Store b/App_Santander_Test/app/.DS_Store
new file mode 100644
index 000000000..74191dd36
Binary files /dev/null and b/App_Santander_Test/app/.DS_Store differ
diff --git a/App_Santander_Test/app/.gitignore b/App_Santander_Test/app/.gitignore
new file mode 100644
index 000000000..42afabfd2
--- /dev/null
+++ b/App_Santander_Test/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/App_Santander_Test/app/build.gradle b/App_Santander_Test/app/build.gradle
new file mode 100644
index 000000000..37bce0096
--- /dev/null
+++ b/App_Santander_Test/app/build.gradle
@@ -0,0 +1,107 @@
+apply plugin: 'com.android.application'
+apply plugin: 'realm-android'
+
+android {
+ compileSdkVersion 30
+ buildToolsVersion "30.0.2"
+
+ defaultConfig {
+ applicationId "com.ivan.bankapp"
+ minSdkVersion 19
+ targetSdkVersion 30
+ versionCode 1
+ versionName "1.0"
+ multiDexEnabled true
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+
+ packagingOptions{
+ exclude 'META-INF/rxjava.properties'
+ }
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ lintOptions {
+ abortOnError false
+ }
+
+ buildFeatures {
+ viewBinding = true
+ }
+
+ packagingOptions {
+ exclude 'META-INF/services/javax.annotation.processing.Processor'
+ exclude 'META-INF/LICENSE'
+ exclude 'META-INF/LICENSE.txt'
+ }
+}
+
+dependencies {
+
+ implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'com.google.android.material:material:1.2.1'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+
+ //Arquitetura and Api Call
+ implementation 'com.squareup.retrofit2:retrofit:2.3.0'
+ implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
+ implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
+ compileOnly 'com.android.support:support-annotations:25.3.1'
+
+ //Rx
+ implementation 'io.reactivex:rxandroid:1.1.0'
+ implementation 'io.reactivex:rxjava:1.1.0'
+
+
+ //Dagger
+ implementation 'com.google.dagger:dagger:2.24'
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+ annotationProcessor 'com.google.dagger:dagger-compiler:2.24'
+
+ //ButterKnife
+
+ implementation 'com.jakewharton:butterknife:8.1.0'
+ annotationProcessor 'com.jakewharton:butterknife-compiler:8.1.0'
+
+ //Tests
+ testImplementation 'junit:junit:4.+'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.1'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+ testImplementation 'org.mockito:mockito-core:2.28.2'
+ androidTestImplementation 'org.mockito:mockito-android:2.28.2'
+ testImplementation 'org.mockito:mockito-inline:2.28.2'
+ testImplementation 'org.robolectric:robolectric:4.4'
+ androidTestImplementation 'com.android.support.test:runner:0.3'
+ androidTestImplementation 'com.android.support.test:rules:0.3'
+ androidTestImplementation 'org.hamcrest:hamcrest-library:1.1'
+
+ //Retrofit
+
+ def RETROFIT_VERSION = "2.1.0"
+ compile "com.squareup.retrofit2:retrofit:${RETROFIT_VERSION}"
+ compile "com.squareup.retrofit2:converter-gson:${RETROFIT_VERSION}"
+ compile "com.squareup.retrofit2:converter-scalars:${RETROFIT_VERSION}"
+ compile("com.squareup.retrofit2:converter-simplexml:${RETROFIT_VERSION}") {
+ exclude group: 'xpp3', module: 'xpp3'
+ exclude group: 'stax', module: 'stax-api'
+ exclude group: 'stax', module: 'stax'
+ }
+
+ //Observable
+
+ def OKHTTP_VERSION = "3.4.2"
+ compile "com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}"
+ compile "com.squareup.okhttp3:logging-interceptor:${OKHTTP_VERSION}"
+ implementation 'com.facebook.stetho:stetho:1.5.1'
+ implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/proguard-rules.pro b/App_Santander_Test/app/proguard-rules.pro
new file mode 100644
index 000000000..481bb4348
--- /dev/null
+++ b/App_Santander_Test/app/proguard-rules.pro
@@ -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
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/.DS_Store b/App_Santander_Test/app/src/.DS_Store
new file mode 100644
index 000000000..21590c6a4
Binary files /dev/null and b/App_Santander_Test/app/src/.DS_Store differ
diff --git a/App_Santander_Test/app/src/androidTest/java/com/ivan/bankapp/ExampleInstrumentedTest.java b/App_Santander_Test/app/src/androidTest/java/com/ivan/bankapp/ExampleInstrumentedTest.java
new file mode 100644
index 000000000..b66d48616
--- /dev/null
+++ b/App_Santander_Test/app/src/androidTest/java/com/ivan/bankapp/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.ivan.bankapp;
+
+import android.content.Context;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
+ assertEquals("com.ivan.bankapp", appContext.getPackageName());
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/.DS_Store b/App_Santander_Test/app/src/main/.DS_Store
new file mode 100644
index 000000000..7d1fe1992
Binary files /dev/null and b/App_Santander_Test/app/src/main/.DS_Store differ
diff --git a/App_Santander_Test/app/src/main/AndroidManifest.xml b/App_Santander_Test/app/src/main/AndroidManifest.xml
new file mode 100644
index 000000000..4df59b14a
--- /dev/null
+++ b/App_Santander_Test/app/src/main/AndroidManifest.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/.DS_Store b/App_Santander_Test/app/src/main/java/.DS_Store
new file mode 100644
index 000000000..793b98017
Binary files /dev/null and b/App_Santander_Test/app/src/main/java/.DS_Store differ
diff --git a/App_Santander_Test/app/src/main/java/com/.DS_Store b/App_Santander_Test/app/src/main/java/com/.DS_Store
new file mode 100644
index 000000000..a23325ca2
Binary files /dev/null and b/App_Santander_Test/app/src/main/java/com/.DS_Store differ
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/.DS_Store b/App_Santander_Test/app/src/main/java/com/ivan/.DS_Store
new file mode 100644
index 000000000..b5f0555d8
Binary files /dev/null and b/App_Santander_Test/app/src/main/java/com/ivan/.DS_Store differ
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/.DS_Store b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/.DS_Store
new file mode 100644
index 000000000..c8610cd6c
Binary files /dev/null and b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/.DS_Store differ
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/App.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/App.java
new file mode 100644
index 000000000..a17b08e60
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/App.java
@@ -0,0 +1,33 @@
+package com.ivan.bankapp;
+
+import android.app.Application;
+
+import java.lang.ref.WeakReference;
+
+import io.realm.Realm;
+import io.realm.RealmConfiguration;
+
+public class App extends Application {
+
+ private static WeakReference instance;
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+
+ instance = new WeakReference(this);
+
+ Realm.init(this);
+ RealmConfiguration realmConfig = new RealmConfiguration.Builder()
+ .name("bankApp.realm")
+ .schemaVersion(0)
+ .build();
+ Realm.setDefaultConfiguration(realmConfig);
+
+ }
+
+ public static Application getInstance() {
+ return instance != null ? instance.get() : null;
+ }
+
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/adapter/BillAdapter.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/adapter/BillAdapter.java
new file mode 100644
index 000000000..015ac0044
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/adapter/BillAdapter.java
@@ -0,0 +1,81 @@
+package com.ivan.bankapp.adapter;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Filter;
+import android.widget.Filterable;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.ivan.bankapp.R;
+import com.ivan.bankapp.view.fragment.FragmentBills;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BillAdapter extends RecyclerView.Adapter {
+ private ArrayList billsList;
+ private Context context;
+ private TextView billDescription, billDate, billValue, billTitle;
+
+
+ public BillAdapter(@NonNull ArrayList list) {
+
+ billsList = new ArrayList<>();
+
+ for(int i = 0; i getStatements(
+ @Path("id") Integer id
+ );
+
+ @FormUrlEncoded
+ @POST("login")
+ Call login(
+ @Field("user") String user,
+ @Field("password") String password
+ );
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/BreedApiService.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/BreedApiService.java
new file mode 100644
index 000000000..259f5e142
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/BreedApiService.java
@@ -0,0 +1,82 @@
+package com.ivan.bankapp.api;
+
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+
+import com.ivan.bankapp.App;
+import com.ivan.bankapp.model.StatementList;
+import com.ivan.bankapp.model.User;
+import com.ivan.bankapp.view.presentation.Login;
+import com.ivan.bankapp.view.presentation.MainActivity;
+import retrofit2.Call;
+import retrofit2.Callback;
+import retrofit2.Response;
+
+public class BreedApiService {
+
+ Login loginPage;
+ MainActivity mainPage;
+
+ public void getStatement(final NetworkResponseListener listener, Api api) {
+
+ int userID = mainPage.getUserID();
+
+ Call call = api.getStatements(userID);
+ call.enqueue(new Callback() {
+ @Override
+ public void onResponse(@NonNull Call call, @NonNull Response response) {
+ if (listener != null) {
+ listener.onResponseReceived(response.body());
+ }
+ }
+
+ @Override
+ public void onFailure(@NonNull Call call, @NonNull Throwable t) {
+ if (App.getInstance() != null) {
+ Toast.makeText(
+ App.getInstance(),
+ "An error occurred: " + t.getMessage(),
+ Toast.LENGTH_SHORT
+ ).show();
+ }
+
+ if (listener != null) {
+ listener.onError();
+ }
+ }
+ });
+ }
+
+ public void login(final NetworkResponseListener listener, Api api) {
+
+ String user = loginPage.getUsername();
+ String password = loginPage.getPassword();
+
+
+ Call call = api.login(user, password);
+ call.enqueue(new Callback() {
+ @Override
+ public void onResponse(@NonNull Call call, @NonNull Response response) {
+ if (listener != null) {
+ listener.onResponseReceived(response.body());
+ }
+ }
+
+ @Override
+ public void onFailure(@NonNull Call call, @NonNull Throwable t) {
+ if (App.getInstance() != null) {
+ Toast.makeText(
+ App.getInstance(),
+ "An error occurred: " + t.getMessage(),
+ Toast.LENGTH_SHORT
+ ).show();
+ }
+
+ if (listener != null) {
+ listener.onError();
+ }
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkManager.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkManager.java
new file mode 100644
index 000000000..24dd8a902
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkManager.java
@@ -0,0 +1,41 @@
+package com.ivan.bankapp.api;
+
+import com.ivan.bankapp.model.StatementList;
+import com.ivan.bankapp.model.User;
+
+import okhttp3.OkHttpClient;
+import retrofit2.Retrofit;
+import retrofit2.converter.gson.GsonConverterFactory;
+
+public class NetworkManager {
+ private static final NetworkManager instance = new NetworkManager();
+ private final Api api;
+
+ private final BreedApiService breedApiService;
+
+ private NetworkManager() {
+ Retrofit retrofitCore =
+ new Retrofit
+ .Builder()
+ .baseUrl("https://bank-app-test.herokuapp.com/api/")
+ .addConverterFactory(GsonConverterFactory.create())
+ .client(new OkHttpClient())
+ .build();
+
+ api = retrofitCore.create(Api.class);
+
+ breedApiService = new BreedApiService();
+ }
+
+ public static NetworkManager getInstance() {
+ return instance;
+ }
+
+ public void getStatements(NetworkResponseListener listener) {
+ breedApiService.getStatement(listener, api);
+ }
+
+ public void login(NetworkResponseListener listener) {
+ breedApiService.login(listener, api);
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkResponse.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkResponse.java
new file mode 100644
index 000000000..fec593220
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkResponse.java
@@ -0,0 +1,31 @@
+package com.ivan.bankapp.api;
+
+import androidx.annotation.NonNull;
+
+import java.lang.ref.WeakReference;
+
+import retrofit2.Call;
+import retrofit2.Callback;
+
+class NetworkResponse implements Callback {
+
+ private WeakReference> listener;
+
+ NetworkResponse(NetworkResponseListener listener) {
+ this.listener = new WeakReference<>(listener);
+ }
+ @Override
+ public void onResponse(Call call, retrofit2.Response response) {
+
+ if (listener != null && listener.get() != null) {
+ listener.get().onResponseReceived(response.body());
+ }
+ }
+
+ @Override
+ public void onFailure(@NonNull Call call, @NonNull Throwable t) {
+ if (listener != null && listener.get() != null) {
+ listener.get().onError();
+ }
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkResponseListener.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkResponseListener.java
new file mode 100644
index 000000000..1f90fe7ac
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/NetworkResponseListener.java
@@ -0,0 +1,8 @@
+package com.ivan.bankapp.api;
+
+public interface NetworkResponseListener {
+
+ void onResponseReceived(Response response);
+
+ void onError();
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/Response.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/Response.java
new file mode 100644
index 000000000..2db44d847
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/Response.java
@@ -0,0 +1,21 @@
+package com.ivan.bankapp.api;
+
+import androidx.annotation.Nullable;
+
+import okhttp3.ResponseBody;
+
+public final class Response {
+
+ private okhttp3.Response rawResponse;
+ private @Nullable T body;
+ private @Nullable
+ ResponseBody errorBody;
+
+ public @Nullable T body() {
+ return body;
+ }
+
+ public @Nullable ResponseBody errorBody() {
+ return errorBody;
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/RetrofitClient.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/RetrofitClient.java
new file mode 100644
index 000000000..cc2b31078
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/api/RetrofitClient.java
@@ -0,0 +1,56 @@
+package com.ivan.bankapp.api;
+
+import com.facebook.stetho.okhttp3.StethoInterceptor;
+import com.ivan.bankapp.model.StatementList;
+
+import okhttp3.OkHttpClient;
+import okhttp3.logging.HttpLoggingInterceptor;
+import retrofit2.Retrofit;
+import retrofit2.converter.gson.GsonConverterFactory;
+
+public class RetrofitClient {
+
+ private static final String AUTH = "";
+
+ public static final String BASE_URL = "https://bank-app-test.herokuapp.com/api/";
+ private static RetrofitClient mInstance;
+ private Retrofit retrofit;
+
+ private final BreedApiService breedApiService;
+
+ private RetrofitClient() {
+ HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
+ interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
+ OkHttpClient client = new OkHttpClient.Builder()
+ .addNetworkInterceptor(new StethoInterceptor())
+ .addInterceptor(interceptor)
+ .build();
+
+ breedApiService = new BreedApiService();
+
+
+ if(retrofit==null){
+ retrofit = new Retrofit.Builder()
+ .baseUrl(BASE_URL)
+ .addConverterFactory(GsonConverterFactory.create())
+ .client(client)
+ .build();
+ }
+ }
+
+ public static synchronized RetrofitClient getInstance() {
+ if (mInstance == null) {
+ mInstance = new RetrofitClient();
+ }
+ return mInstance;
+ }
+
+ public Api getApi() {
+ return retrofit.create(Api.class);
+ }
+
+ public void getStatemtns(NetworkResponseListener listener) {
+ breedApiService.getStatement(listener, getApi());
+ }
+
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/ApplicationModule.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/ApplicationModule.java
new file mode 100644
index 000000000..c58621d62
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/ApplicationModule.java
@@ -0,0 +1,31 @@
+package com.ivan.bankapp.dagger.module;
+
+import android.app.Application;
+import android.content.Context;
+
+import javax.inject.Singleton;
+
+import dagger.Module;
+import dagger.Provides;
+
+@Module
+public class ApplicationModule {
+
+ private Application application;
+
+ public ApplicationModule(Application application) {
+ this.application = application;
+ }
+
+ @Provides
+ @Singleton
+ Application providesApplication() {
+ return application;
+ }
+
+ @Provides
+ @Singleton
+ Context providesContext(Application application) {
+ return application.getBaseContext();
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/PreferenceModule.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/PreferenceModule.java
new file mode 100644
index 000000000..68f26361d
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/PreferenceModule.java
@@ -0,0 +1,20 @@
+package com.ivan.bankapp.dagger.module;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.preference.PreferenceManager;
+
+import javax.inject.Singleton;
+
+import dagger.Module;
+import dagger.Provides;
+
+@Module
+public class PreferenceModule {
+
+ @Provides
+ @Singleton
+ SharedPreferences providesSharedPreferences(Context context) {
+ return PreferenceManager.getDefaultSharedPreferences(context);
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/SettingModule.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/SettingModule.java
new file mode 100644
index 000000000..d2e2a9c9e
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/SettingModule.java
@@ -0,0 +1,22 @@
+package com.ivan.bankapp.dagger.module;
+
+import android.content.Context;
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import dagger.Module;
+import dagger.Provides;
+
+@Module
+public class SettingModule {
+
+ public static final String BASE_URL = "Settings.ServerUrl";
+
+ @Provides
+ @Singleton
+ @Named(BASE_URL)
+ String providesServerUrl(Context context) {
+ return "http://private-c60ade-guidebook1.apiary-mock.com";
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/domain/RepositoryModule.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/domain/RepositoryModule.java
new file mode 100644
index 000000000..98d817e20
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/domain/RepositoryModule.java
@@ -0,0 +1,12 @@
+package com.ivan.bankapp.dagger.module.domain;
+
+import dagger.Module;
+
+@Module
+public class RepositoryModule {
+
+ // @Provides
+ // UserRepository providesUserRepository() {
+ // return new UserManager();
+ // }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/infraestruture/RxJavaModule.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/infraestruture/RxJavaModule.java
new file mode 100644
index 000000000..d58e01c97
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/dagger/module/infraestruture/RxJavaModule.java
@@ -0,0 +1,18 @@
+package com.ivan.bankapp.dagger.module.infraestruture;
+
+import com.ivan.bankapp.infraestruture.operator.WorkerOperator;
+
+import javax.inject.Singleton;
+
+import dagger.Module;
+import dagger.Provides;
+
+@Module
+public class RxJavaModule {
+
+ @Singleton
+ @Provides
+ WorkerOperator providesWorkerOperator() {
+ return new WorkerOperator();
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/database/UserDB.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/database/UserDB.java
new file mode 100644
index 000000000..b712e9424
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/database/UserDB.java
@@ -0,0 +1,59 @@
+package com.ivan.bankapp.database;
+
+import com.google.gson.annotations.SerializedName;
+
+import io.realm.RealmObject;
+import io.realm.annotations.PrimaryKey;
+
+public class UserDB extends RealmObject {
+
+ @PrimaryKey
+ private Integer id;
+ private String name;
+ private String bankAccount;
+ private String agency;
+ private Double balance;
+
+ public UserDB() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getBankAccount() {
+ return bankAccount;
+ }
+
+ public void setBankAccount(String bankAccount) {
+ this.bankAccount = bankAccount;
+ }
+
+ public String getAgency() {
+ return agency;
+ }
+
+ public void setAgency(String agency) {
+ this.agency = agency;
+ }
+
+ public Double getBalance() {
+ return balance;
+ }
+
+ public void setBalance(Double balance) {
+ this.balance = balance;
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/infraestruture/operator/WorkerOperator.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/infraestruture/operator/WorkerOperator.java
new file mode 100644
index 000000000..6bd9763fe
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/infraestruture/operator/WorkerOperator.java
@@ -0,0 +1,14 @@
+package com.ivan.bankapp.infraestruture.operator;
+
+import io.reactivex.schedulers.Schedulers;
+import rx.Observable;
+import rx.android.schedulers.AndroidSchedulers;
+
+public class WorkerOperator implements rx.Observable.Transformer {
+
+
+ @Override
+ public Observable call(Observable tObservable) {
+ return null;
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/StatementList.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/StatementList.java
new file mode 100644
index 000000000..dea213123
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/StatementList.java
@@ -0,0 +1,21 @@
+package com.ivan.bankapp.model;
+
+import com.google.gson.annotations.SerializedName;
+
+public class StatementList {
+
+ @SerializedName("statementList")
+ private Statements[] statementList;
+
+ public StatementList(Statements[] statementList) {
+ this.statementList = statementList;
+ }
+
+ public Statements[] getStatementList() {
+ return statementList;
+ }
+
+ public void setStatementList(Statements[] statementList) {
+ this.statementList = statementList;
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/Statements.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/Statements.java
new file mode 100644
index 000000000..6dcc7b26f
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/Statements.java
@@ -0,0 +1,57 @@
+package com.ivan.bankapp.model;
+
+import com.google.gson.annotations.SerializedName;
+
+public class Statements {
+
+ @SerializedName("title")
+ private String title;
+
+ @SerializedName("desc")
+ private String desc;
+
+ @SerializedName("date")
+ private String date;
+
+ @SerializedName("value")
+ private Double value;
+
+ public Statements(String tittle, String desc, String date, Double value) {
+ this.title = tittle;
+ this.desc = desc;
+ this.date = date;
+ this.value = value;
+ }
+
+ public String getTittle() {
+ return title;
+ }
+
+ public void setTittle(String tittle) {
+ this.title = tittle;
+ }
+
+ public String getDesc() {
+ return desc;
+ }
+
+ public void setDesc(String desc) {
+ this.desc = desc;
+ }
+
+ public String getDate() {
+ return date;
+ }
+
+ public void setDate(String date) {
+ this.date = date;
+ }
+
+ public Double getValue() {
+ return value;
+ }
+
+ public void setValue(Double value) {
+ this.value = value;
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/User.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/User.java
new file mode 100644
index 000000000..78bec7a0f
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/model/User.java
@@ -0,0 +1,81 @@
+package com.ivan.bankapp.model;
+
+import com.google.gson.annotations.SerializedName;
+
+public class User {
+
+ @SerializedName("userAccount")
+ private User userAccount;
+
+ @SerializedName("userId")
+ private Integer id;
+
+ @SerializedName("name")
+ private String name;
+
+ @SerializedName("bankAccount")
+ private String bankAccount;
+
+ @SerializedName("agency")
+ private String agency;
+
+ @SerializedName("balance")
+ private Double balance;
+
+ public User(User userAccount, Integer id, String name, String bankAccount, String agency, Double balance) {
+ this.userAccount = userAccount;
+ this.id = id;
+ this.name = name;
+ this.bankAccount = bankAccount;
+ this.agency = agency;
+ this.balance = balance;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getBankAccount() {
+ return bankAccount;
+ }
+
+ public void setBankAccount(String bankAccount) {
+ this.bankAccount = bankAccount;
+ }
+
+ public String getAgency() {
+ return agency;
+ }
+
+ public void setAgency(String agency) {
+ this.agency = agency;
+ }
+
+ public Double getBalance() {
+ return balance;
+ }
+
+ public void setBalance(Double balance) {
+ this.balance = balance;
+ }
+
+ public User getUserAccount() {
+ return userAccount;
+ }
+
+ public void setUserAccount(User userAccount) {
+ this.userAccount = userAccount;
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/utils/MaskCNPJCPF.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/utils/MaskCNPJCPF.java
new file mode 100644
index 000000000..7906cbd8f
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/utils/MaskCNPJCPF.java
@@ -0,0 +1,80 @@
+package com.ivan.bankapp.utils;
+
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.widget.EditText;
+
+public abstract class MaskCNPJCPF {
+
+ private static final String maskCNPJ = "##.###.###/####-##";
+ private static final String maskCPF = "###.###.###-##";
+
+
+ public static String unmask(String s) {
+ return s.replaceAll("[^0-9]*", "");
+ }
+
+ public static TextWatcher insert(final EditText editText) {
+ return new TextWatcher() {
+ boolean isUpdating;
+ String old = "";
+
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ String str = MaskCNPJCPF.unmask(s.toString());
+ String mask;
+ String defaultMask = getDefaultMask(str);
+ switch (str.length()) {
+ case 11:
+ mask = maskCPF;
+ break;
+ case 14:
+ mask = maskCNPJ;
+ break;
+
+ default:
+ mask = defaultMask;
+ break;
+ }
+
+ String mascara = "";
+ if (isUpdating) {
+ old = str;
+ isUpdating = false;
+ return;
+ }
+ int i = 0;
+ for (char m : mask.toCharArray()) {
+ if ((m != '#' && str.length() > old.length()) || (m != '#' && str.length() < old.length() && str.length() != i)) {
+ mascara += m;
+ continue;
+ }
+
+ try {
+ mascara += str.charAt(i);
+ } catch (Exception e) {
+ break;
+ }
+ i++;
+ }
+ isUpdating = true;
+ editText.setText(mascara);
+ editText.setSelection(mascara.length());
+ }
+
+ public void beforeTextChanged(CharSequence s, int start, int count,
+ int after) {
+ }
+
+ public void afterTextChanged(Editable s) {
+ }
+ };
+ }
+
+ private static String getDefaultMask(String str) {
+ String defaultMask = maskCPF;
+ if (str.length() > 11) {
+ defaultMask = maskCNPJ;
+ }
+ return defaultMask;
+ }
+ }
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/utils/PasswordStrength.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/utils/PasswordStrength.java
new file mode 100644
index 000000000..b14e4cb29
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/utils/PasswordStrength.java
@@ -0,0 +1,82 @@
+package com.ivan.bankapp.utils;
+
+import android.graphics.Color;
+
+import com.ivan.bankapp.R;
+
+public enum PasswordStrength {
+
+
+ WEAK(R.string.fraca, Color.parseColor("#61ad85")),
+ MEDIUM(R.string.media, Color.parseColor("#4d8a6a")),
+ STRONG(R.string.forte, Color.parseColor("#3a674f")),
+ VERY_STRONG(R.string.muitoForte, Color.parseColor("#264535"));
+
+ public int msg;
+ public int color;
+ public int passwordScore;
+ private static int MIN_LENGTH = 8;
+ private static int MAX_LENGTH = 15;
+
+ PasswordStrength(int msg, int color) {
+ this.msg = msg;
+ this.color = color;
+ }
+
+ public static PasswordStrength calculate(String password) {
+ int score = 0;
+ // boolean indicating if password has an upper case
+ boolean upper = false;
+ // boolean indicating if password has a lower case
+ boolean lower = false;
+ // boolean indicating if password has at least one digit
+ boolean digit = false;
+ // boolean indicating if password has a leat one special char
+ boolean specialChar = false;
+
+ for (int i = 0; i < password.length(); i++) {
+ char c = password.charAt(i);
+
+ if (!specialChar && !Character.isLetterOrDigit(c)) {
+ score++;
+ specialChar = true;
+ } else {
+ if (!digit && Character.isDigit(c)) {
+ score++;
+ digit = true;
+ } else {
+ if (!upper || !lower) {
+ if (Character.isUpperCase(c)) {
+ upper = true;
+ } else {
+ lower = true;
+ }
+
+ if (upper && lower) {
+ score++;
+ }
+ }
+ }
+ }
+ }
+
+ int length = password.length();
+
+ if (length > MAX_LENGTH) {
+ score++;
+ } else if (length < MIN_LENGTH) {
+ score = 0;
+ }
+
+ // return enum following the score
+ switch(score) {
+ case 0 : return WEAK;
+ case 1 : return MEDIUM;
+ case 2 : return STRONG;
+ case 3 : return VERY_STRONG;
+ default:
+ }
+
+ return VERY_STRONG;
+ }
+}
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/.DS_Store b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/.DS_Store
new file mode 100644
index 000000000..57d2d1a03
Binary files /dev/null and b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/.DS_Store differ
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/fragment/FragmentBillList.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/fragment/FragmentBillList.java
new file mode 100644
index 000000000..abfcad9d5
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/fragment/FragmentBillList.java
@@ -0,0 +1,28 @@
+package com.ivan.bankapp.view.fragment;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.ivan.bankapp.R;
+
+public class FragmentBillList extends Fragment {
+
+
+ public FragmentBillList() {
+ // Required empty public constructor
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+
+ View view = inflater.inflate(R.layout.fragment_bill_list, container, false);
+
+ return view;
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/fragment/FragmentBills.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/fragment/FragmentBills.java
new file mode 100644
index 000000000..461f330e6
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/fragment/FragmentBills.java
@@ -0,0 +1,63 @@
+package com.ivan.bankapp.view.fragment;
+
+import android.os.Bundle;
+
+import androidx.fragment.app.Fragment;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.ivan.bankapp.R;
+
+public class FragmentBills extends Fragment {
+
+ private String billDescription, billDate, title;
+ private Double billValue;
+
+
+
+ public FragmentBills() {
+ }
+
+ public String getBillDescription() {
+ return billDescription;
+ }
+
+ public void setBillDescription(String billDescription) {
+ this.billDescription = billDescription;
+ }
+
+ public String getBillDate() {
+ return billDate;
+ }
+
+ public void setBillDate(String billDate) {
+ this.billDate = billDate;
+ }
+
+ public Double getBillValue() {
+ return billValue;
+ }
+
+ public void setBillValue(Double billValue) {
+ this.billValue = billValue;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ View view = inflater.inflate(R.layout.fragment_bills, container, false);
+
+ return view;
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/Login.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/Login.java
new file mode 100644
index 000000000..34d7ffd26
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/Login.java
@@ -0,0 +1,136 @@
+package com.ivan.bankapp.view.presentation;
+
+import androidx.annotation.IdRes;
+import androidx.appcompat.app.AppCompatActivity;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Patterns;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+import com.ivan.bankapp.R;
+import com.ivan.bankapp.database.UserDB;
+import com.ivan.bankapp.utils.PasswordStrength;
+
+import io.realm.Realm;
+import io.realm.RealmConfiguration;
+
+public class Login extends AppCompatActivity implements ViewContract.IView {
+
+ public static EditText user, password;
+ Button buttonLogin;
+ public String username, userpassword;
+ public RealmConfiguration realmConfig;
+ public Realm realm;
+ private ViewContract.IPresenter presenter;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_login);
+
+ user = findViewById(R.id.editUser);
+ password = findViewById(R.id.editPassword);
+ buttonLogin = findViewById(R.id.buttonLogin);
+
+ presenter = new Presenter(this);
+
+ Realm.init(getApplicationContext());
+ realmConfig = new RealmConfiguration.Builder().deleteRealmIfMigrationNeeded().build();
+ realm = Realm.getInstance(realmConfig);
+
+ buttonLogin.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ validateFields(user.getText().toString(), password.getText().toString());
+ }
+ });
+
+ }
+
+ private ViewType find(@IdRes int viewId) {
+ return (ViewType) findViewById(viewId);
+ }
+
+ private boolean validatePassword(String str){
+
+ PasswordStrength passwordStrength = PasswordStrength.calculate(str);
+
+ String strength = passwordStrength.name().toLowerCase();
+
+ if(strength.equals("weak") || strength.equals("medium")) return false;
+ else return true;
+
+ }
+
+ private void goHome(){
+
+ if(validatePassword(password.getText().toString())) {
+ Intent i = new Intent(getApplicationContext(), MainActivity.class);
+ startActivity(i);
+ } else {
+ Toast.makeText(this, "Insira uma senha forte", Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ @Override
+ public void getStatements(String title, String desc, String data, Double value) {
+
+ }
+
+ @Override
+ public void login(Integer id, String name, String account, String agency, Double value) {
+
+ //Salvar no Realm
+
+ UserDB userDB = new UserDB();
+
+ userDB.setId(id);
+ userDB.setName(name);
+ userDB.setBankAccount(account);
+ userDB.setAgency(agency);
+ userDB.setBalance(value);
+
+ realm.beginTransaction();
+ realm.copyToRealmOrUpdate(userDB);
+ realm.commitTransaction();
+
+ goHome();
+
+ }
+
+ public static String getUsername(){
+ String username = "";
+ username = user.getText().toString();
+ return username;
+ }
+
+ public static String getPassword(){
+ String userpassword = "";
+ userpassword = password.getText().toString();
+ return userpassword;
+ }
+
+ private void validateFields(String username, String userpassword){
+
+ if (username.isEmpty()) {
+ user.setError("Necessário inserir um e-mail");
+ user.requestFocus();
+ return;
+ }
+
+
+ if (userpassword.isEmpty()) {
+ password.setError("Por favor, insira sua senha!");
+ password.requestFocus();
+ return;
+ }
+
+ if (presenter != null) {
+ presenter.onLogin();
+ }
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/MainActivity.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/MainActivity.java
new file mode 100644
index 000000000..95555459e
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/MainActivity.java
@@ -0,0 +1,136 @@
+package com.ivan.bankapp.view.presentation;
+
+import androidx.annotation.IdRes;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.ivan.bankapp.R;
+import com.ivan.bankapp.adapter.BillAdapter;
+import com.ivan.bankapp.database.UserDB;
+import com.ivan.bankapp.view.fragment.FragmentBills;
+
+import java.util.ArrayList;
+
+import io.realm.Realm;
+import io.realm.RealmConfiguration;
+import io.realm.RealmResults;
+
+public class MainActivity extends AppCompatActivity implements ViewContract.IView {
+
+ TextView nomeUsuario, numeroConta, valorSaldo;
+ public FragmentBills billsCard;
+ public RecyclerView billsRecycler;
+ public BillAdapter billAdapter;
+ public ArrayList billsList = new ArrayList<>();
+ public ImageView logout;
+ private ViewContract.IPresenter presenter;
+ public static int userID;
+ public RealmConfiguration realmConfig;
+ public static Realm realm;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ realm.init(getApplicationContext());
+ realmConfig = new RealmConfiguration.Builder().deleteRealmIfMigrationNeeded().build();
+ realm = Realm.getInstance(realmConfig);
+
+ presenter = new Presenter(this);
+
+ nomeUsuario = findViewById(R.id.nomeUsuario);
+ numeroConta = findViewById(R.id.numeroConta);
+ valorSaldo = findViewById(R.id.valorConta);
+ billsRecycler = findViewById(R.id.billRecycler);
+ logout = findViewById(R.id.logout);
+
+ LinearLayoutManager llm = new LinearLayoutManager(getApplicationContext());
+ llm.setOrientation(LinearLayoutManager.VERTICAL);
+ billsRecycler.setLayoutManager(llm);
+
+ logout.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent i = new Intent(getApplicationContext(), Login.class);
+ startActivity(i);
+ }
+ });
+
+ if (presenter != null) {
+ presenter.onHomeLoaded();
+ setUserData();
+ }
+ }
+
+ private ViewType find(@IdRes int viewId) {
+ return (ViewType) findViewById(viewId);
+ }
+
+ @Override
+ public void getStatements(String title, String desc, String data, Double value) {
+
+ billsCard = new FragmentBills();
+
+ billsCard.setTitle(title);
+ billsCard.setBillDate(data);
+ billsCard.setBillDescription(desc);
+ billsCard.setBillValue(value);
+ billsList.add(billsCard);
+
+ billAdapter = new BillAdapter(billsList);
+ billsRecycler.setAdapter(billAdapter);
+ billAdapter.notifyDataSetChanged();
+ }
+
+ @Override
+ public void login(Integer id, String name, String account, String agency, Double value) {
+
+ }
+
+ public void setUserData() {
+
+ String userName = "";
+ String account = "";
+ String agency = "";
+ Double value = 0.0;
+
+ RealmResults results =
+ realm.where(UserDB.class).findAll();
+ if(results.size() > 0){
+ assert results.get(0) != null;
+
+ userName = results.get(0).getName();
+ account = results.get(0).getBankAccount();
+ agency = results.get(0).getAgency();
+ value = results.get(0).getBalance();
+
+ nomeUsuario.setText(userName);
+ numeroConta.setText(account + "/" + agency);
+ valorSaldo.setText("R$ " + String.valueOf(value));
+ }
+
+
+ }
+
+ public static int getUserID(){
+
+ int userID = 0;
+
+ RealmResults results =
+ realm.where(UserDB.class).findAll();
+ if(results.size() > 0){
+ assert results.get(0) != null;
+ userID = results.get(0).getId();
+ }
+
+ return userID;
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/Presenter.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/Presenter.java
new file mode 100644
index 000000000..e5e8aac6e
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/Presenter.java
@@ -0,0 +1,55 @@
+package com.ivan.bankapp.view.presentation;
+
+import com.ivan.bankapp.api.NetworkManager;
+import com.ivan.bankapp.api.NetworkResponseListener;
+import com.ivan.bankapp.model.StatementList;
+import com.ivan.bankapp.model.User;
+
+import java.lang.ref.WeakReference;
+
+class Presenter implements ViewContract.IPresenter {
+
+ private WeakReference view;
+
+ Presenter(ViewContract.IView view) {
+ this.view = new WeakReference<>(view);
+ }
+
+ @Override
+ public void onHomeLoaded() {
+ NetworkManager.getInstance().getStatements(new NetworkResponseListener() {
+ @Override
+ public void onResponseReceived(StatementList s) {
+
+ for (int i = 0; i() {
+ @Override
+ public void onResponseReceived(User user) {
+
+ view.get().login(user.getUserAccount().getId(), user.getUserAccount().getName(),user.getUserAccount().getBankAccount(), user.getUserAccount().getAgency(),user.getUserAccount().getBalance());
+ }
+
+ @Override
+ public void onError() {
+ }
+ });
+
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/ViewContract.java b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/ViewContract.java
new file mode 100644
index 000000000..9e6de706c
--- /dev/null
+++ b/App_Santander_Test/app/src/main/java/com/ivan/bankapp/view/presentation/ViewContract.java
@@ -0,0 +1,14 @@
+package com.ivan.bankapp.view.presentation;
+
+interface ViewContract {
+ interface IPresenter {
+ void onHomeLoaded();
+ void onLogin();
+ }
+
+ interface IView {
+ void getStatements(String title, String desc, String data, Double value);
+ void login(Integer id, String name, String account, String agency, Double value);
+
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/App_Santander_Test/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 000000000..2b068d114
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/drawable-v24/logo.png b/App_Santander_Test/app/src/main/res/drawable-v24/logo.png
new file mode 100644
index 000000000..66bdc8d5d
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/drawable-v24/logo.png differ
diff --git a/App_Santander_Test/app/src/main/res/drawable-v24/logout.png b/App_Santander_Test/app/src/main/res/drawable-v24/logout.png
new file mode 100644
index 000000000..de1e4ae3c
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/drawable-v24/logout.png differ
diff --git a/App_Santander_Test/app/src/main/res/drawable/bills_bg.xml b/App_Santander_Test/app/src/main/res/drawable/bills_bg.xml
new file mode 100644
index 000000000..be291e02c
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/drawable/bills_bg.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/drawable/button_bg.xml b/App_Santander_Test/app/src/main/res/drawable/button_bg.xml
new file mode 100644
index 000000000..6d7ad1336
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/drawable/button_bg.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/drawable/field_bg.xml b/App_Santander_Test/app/src/main/res/drawable/field_bg.xml
new file mode 100644
index 000000000..c6d539b44
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/drawable/field_bg.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/drawable/ic_launcher_background.xml b/App_Santander_Test/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 000000000..07d5da9cb
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/App_Santander_Test/app/src/main/res/layout/activity_login.xml b/App_Santander_Test/app/src/main/res/layout/activity_login.xml
new file mode 100644
index 000000000..f3dafc20e
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/layout/activity_login.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/layout/activity_main.xml b/App_Santander_Test/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 000000000..364b449ab
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/layout/fragment_bill_list.xml b/App_Santander_Test/app/src/main/res/layout/fragment_bill_list.xml
new file mode 100644
index 000000000..66b8c1d04
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/layout/fragment_bill_list.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/layout/fragment_bills.xml b/App_Santander_Test/app/src/main/res/layout/fragment_bills.xml
new file mode 100644
index 000000000..51d4cd253
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/layout/fragment_bills.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/layout/header_main.xml b/App_Santander_Test/app/src/main/res/layout/header_main.xml
new file mode 100644
index 000000000..6ed97cde9
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/layout/header_main.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/App_Santander_Test/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 000000000..eca70cfe5
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/App_Santander_Test/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 000000000..eca70cfe5
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/mipmap-hdpi/ic_launcher.png b/App_Santander_Test/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..a571e6009
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/App_Santander_Test/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 000000000..61da551c5
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-mdpi/ic_launcher.png b/App_Santander_Test/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..c41dd2853
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/App_Santander_Test/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 000000000..db5080a75
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/App_Santander_Test/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..6dba46dab
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/App_Santander_Test/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..da31a871c
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/App_Santander_Test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..15ac68172
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/App_Santander_Test/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..b216f2d31
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/App_Santander_Test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 000000000..f25a41974
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/App_Santander_Test/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/App_Santander_Test/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 000000000..e96783ccc
Binary files /dev/null and b/App_Santander_Test/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/App_Santander_Test/app/src/main/res/values-night/themes.xml b/App_Santander_Test/app/src/main/res/values-night/themes.xml
new file mode 100644
index 000000000..fe9edbda8
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/values/colors.xml b/App_Santander_Test/app/src/main/res/values/colors.xml
new file mode 100644
index 000000000..175c58c07
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/values/colors.xml
@@ -0,0 +1,14 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+ #3B48EE
+ #485465
+ #A8B4C4
+ #FEFEFE
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/values/strings.xml b/App_Santander_Test/app/src/main/res/values/strings.xml
new file mode 100644
index 000000000..ee771efb8
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/values/strings.xml
@@ -0,0 +1,9 @@
+
+ bankapp
+
+ Hello blank fragment
+ Fraca
+ Média
+ Forte
+ Muito Forte
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/main/res/values/themes.xml b/App_Santander_Test/app/src/main/res/values/themes.xml
new file mode 100644
index 000000000..1017d8977
--- /dev/null
+++ b/App_Santander_Test/app/src/main/res/values/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/App_Santander_Test/app/src/test/java/com/ivan/bankapp/ExampleUnitTest.java b/App_Santander_Test/app/src/test/java/com/ivan/bankapp/ExampleUnitTest.java
new file mode 100644
index 000000000..b3f35a89d
--- /dev/null
+++ b/App_Santander_Test/app/src/test/java/com/ivan/bankapp/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.ivan.bankapp;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/App_Santander_Test/build.gradle b/App_Santander_Test/build.gradle
new file mode 100644
index 000000000..4c25f80b9
--- /dev/null
+++ b/App_Santander_Test/build.gradle
@@ -0,0 +1,33 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ maven {
+ url 'https://maven.fabric.io/public'
+ }
+ }
+ dependencies {
+ classpath "com.android.tools.build:gradle:4.1.1"
+ classpath "io.realm:realm-gradle-plugin:6.0.2"
+ classpath 'io.fabric.tools:gradle:1.31.2'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ maven { url "https://oss.jfrog.org/libs-snapshot" }
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
+ maven { url "https://maven.google.com" }
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
\ No newline at end of file
diff --git a/App_Santander_Test/gradle.properties b/App_Santander_Test/gradle.properties
new file mode 100644
index 000000000..52f5917cb
--- /dev/null
+++ b/App_Santander_Test/gradle.properties
@@ -0,0 +1,19 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app"s APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
\ No newline at end of file
diff --git a/App_Santander_Test/gradle/wrapper/gradle-wrapper.jar b/App_Santander_Test/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 000000000..f6b961fd5
Binary files /dev/null and b/App_Santander_Test/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/App_Santander_Test/gradle/wrapper/gradle-wrapper.properties b/App_Santander_Test/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000..f96a0e4ab
--- /dev/null
+++ b/App_Santander_Test/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Dec 09 17:45:04 BRT 2020
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
diff --git a/App_Santander_Test/gradlew b/App_Santander_Test/gradlew
new file mode 100755
index 000000000..cccdd3d51
--- /dev/null
+++ b/App_Santander_Test/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/App_Santander_Test/gradlew.bat b/App_Santander_Test/gradlew.bat
new file mode 100644
index 000000000..e95643d6a
--- /dev/null
+++ b/App_Santander_Test/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/App_Santander_Test/local.properties b/App_Santander_Test/local.properties
new file mode 100644
index 000000000..881822b9a
--- /dev/null
+++ b/App_Santander_Test/local.properties
@@ -0,0 +1,10 @@
+## This file is automatically generated by Android Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file should *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+sdk.dir=/Users/appleuser/Library/Android/sdk
\ No newline at end of file
diff --git a/App_Santander_Test/settings.gradle b/App_Santander_Test/settings.gradle
new file mode 100644
index 000000000..2d3689db4
--- /dev/null
+++ b/App_Santander_Test/settings.gradle
@@ -0,0 +1,2 @@
+include ':app'
+rootProject.name = "bankapp"
\ No newline at end of file