diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..458c9fd
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..3b31283
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 731863b..14ccab6 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,5 +1,32 @@
+
+
+
+
+
+
+
+
+
@@ -39,7 +66,7 @@
-
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 6077a6c..c3931d5 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,8 +2,8 @@
-
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 1e7424a..b2a41f0 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -18,12 +18,28 @@ android {
}
}
}
-
+repositories {
+ maven { url "https://jitpack.io" }
+}
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
+ compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:appcompat-v7:25.2.0'
+ compile 'com.android.support:design:25.2.0'
+ compile 'com.google.android.gms:play-services-auth:10.2.0'
+ compile 'com.github.bumptech.glide:glide:3.7.0'
+ compile 'de.hdodenhof:circleimageview:2.1.0'
+ compile 'com.google.firebase:firebase-auth:10.2.0'
+ compile 'com.android.support:support-v4:25.2.0'
+ compile 'com.android.support:cardview-v7:25.2.0'
+ compile 'com.getbase:floatingactionbutton:1.10.1'
+ compile 'com.google.android.gms:play-services-maps:10.2.0'
+ compile 'com.android.support.constraint:constraint-layout:1.0.2'
+ compile 'com.android.support:recyclerview-v7:25.2.0'
+ compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
testCompile 'junit:junit:4.12'
}
+apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
diff --git a/app/google-services.json b/app/google-services.json
new file mode 100644
index 0000000..c021fa8
--- /dev/null
+++ b/app/google-services.json
@@ -0,0 +1,55 @@
+{
+ "project_info": {
+ "project_number": "631867473063",
+ "firebase_url": "https://smartbudget-71d08.firebaseio.com",
+ "project_id": "smartbudget-71d08",
+ "storage_bucket": "smartbudget-71d08.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:631867473063:android:b67b1d269b5c818f",
+ "android_client_info": {
+ "package_name": "com.example.kenneth.smartbudget"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "631867473063-kipb7r1pgn53erktjomjgr6nev0cuvsp.apps.googleusercontent.com",
+ "client_type": 1,
+ "android_info": {
+ "package_name": "com.example.kenneth.smartbudget",
+ "certificate_hash": "72bdcd44688b8e2af1f17d0044c3c1850eff0f3c"
+ }
+ },
+ {
+ "client_id": "631867473063-ua0m2qtq2gvhrl0fl5lc4omjj2ct320s.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyAeGouVnxTcF-57_Q44b4p5eaaXZCk0eXY"
+ }
+ ],
+ "services": {
+ "analytics_service": {
+ "status": 1
+ },
+ "appinvite_service": {
+ "status": 2,
+ "other_platform_oauth_client": [
+ {
+ "client_id": "631867473063-ua0m2qtq2gvhrl0fl5lc4omjj2ct320s.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ },
+ "ads_service": {
+ "status": 2
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/app/libs/YouTubeAndroidPlayerApi.jar b/app/libs/YouTubeAndroidPlayerApi.jar
new file mode 100644
index 0000000..0acbebd
Binary files /dev/null and b/app/libs/YouTubeAndroidPlayerApi.jar differ
diff --git a/app/src/debug/res/values/google_maps_api.xml b/app/src/debug/res/values/google_maps_api.xml
new file mode 100644
index 0000000..3838c5e
--- /dev/null
+++ b/app/src/debug/res/values/google_maps_api.xml
@@ -0,0 +1,26 @@
+
+
+
+ AIzaSyDVD7AdXiMHT5oAi7VgiowUnli2uKQnfLI
+
+
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index ef446f1..b5197ac 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -2,19 +2,59 @@
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png
new file mode 100644
index 0000000..715a950
Binary files /dev/null and b/app/src/main/ic_launcher-web.png differ
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/AhorrosFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/AhorrosFragment.java
new file mode 100644
index 0000000..30fcd7b
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/AhorrosFragment.java
@@ -0,0 +1,23 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+
+public class AhorrosFragment extends Fragment {
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_ahorros, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getActivity().setTitle("Ahorros");
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/ConfigFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/ConfigFragment.java
new file mode 100644
index 0000000..ceae417
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/ConfigFragment.java
@@ -0,0 +1,102 @@
+package com.example.kenneth.smartbudget;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+
+public class ConfigFragment extends Fragment {
+
+ ListView listView;
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_config, container, false);
+ }
+
+ Integer[] imageIDs = {
+ R.drawable.ic_notifications,
+ R.drawable.ic_account
+ };
+
+ String[] titles = {
+ "Notificaciones",
+ "Cuenta"
+ };
+
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getActivity().setTitle("Configuración");
+
+ listView = (ListView) getActivity().findViewById(R.id.listview_config);
+ final Adaptador adaptador = new Adaptador();
+ listView.setAdapter(adaptador);
+
+ listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+
+ @Override
+ public void onItemClick(AdapterView> arg0, View arg1, int position, long arg3) {
+
+ switch (position) {
+ case 0:
+ Intent intent = new Intent(getActivity(), NotificationsActivity.class);
+ startActivity(intent);
+ break;
+ case 1:
+ Intent intent2 = new Intent(getActivity(), ProfileActivity.class);
+ startActivity(intent2);
+ break;
+
+ default:
+ break;
+ }
+
+ }
+
+ });
+ }
+
+ class Adaptador extends BaseAdapter {
+
+ @Override
+ public int getCount() {
+ return imageIDs.length;
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return null;
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return 0;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ convertView = getActivity().getLayoutInflater().inflate(R.layout.content_list_config, null);
+ TextView title_config = (TextView) convertView.findViewById(R.id.txt_config);
+ ImageView image_config = (ImageView) convertView.findViewById(R.id.image_config);
+ title_config.setText(titles[position]);
+ image_config.setImageResource(imageIDs[position]);
+
+
+ return convertView;
+ }
+
+
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/DashBoardActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/DashBoardActivity.java
new file mode 100644
index 0000000..a1a8ddf
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/DashBoardActivity.java
@@ -0,0 +1,238 @@
+package com.example.kenneth.smartbudget;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.NavigationView;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+import android.support.v4.view.GravityCompat;
+import android.support.v4.widget.DrawerLayout;
+import android.support.v7.app.ActionBarDrawerToggle;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.bumptech.glide.Glide;
+import com.google.android.gms.auth.api.Auth;
+import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.api.GoogleApiClient;
+import com.google.android.gms.common.api.ResultCallback;
+import com.google.android.gms.common.api.Status;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+
+public class DashBoardActivity extends AppCompatActivity
+ implements NavigationView.OnNavigationItemSelectedListener, GoogleApiClient.OnConnectionFailedListener {
+ private GoogleApiClient googleApiClient;
+ private ImageView photoImageView;
+ private TextView nameTextView;
+ private TextView emailTextView;
+ private FirebaseAuth firebaseAuth;
+ private FirebaseAuth.AuthStateListener firebaseAuthListener;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_dash_board);
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+
+ FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
+ fab.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Fragment fragment = null;
+ fragment = new GastosFragment();
+ if (fragment != null) {
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ ft.replace(R.id.contenedor_principal, fragment);
+ ft.commit();
+ }
+
+ }
+ });
+
+ DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+ ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
+ this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
+ drawer.setDrawerListener(toggle);
+ toggle.syncState();
+
+ NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
+ navigationView.setNavigationItemSelectedListener(this);
+ /*Autentificación */
+ View header = navigationView.getHeaderView(0);
+ photoImageView = (ImageView) header.findViewById(R.id.avatar);
+ nameTextView = (TextView) header.findViewById(R.id.user_name);
+ emailTextView = (TextView) header.findViewById(R.id.user_email);
+
+ GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
+ .requestEmail()
+ .build();
+
+ googleApiClient = new GoogleApiClient.Builder(this)
+ .enableAutoManage(this, this)
+ .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
+ .build();
+ firebaseAuth = FirebaseAuth.getInstance();
+ firebaseAuthListener = new FirebaseAuth.AuthStateListener() {
+ @Override
+ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
+ FirebaseUser user = firebaseAuth.getCurrentUser();
+ if (user != null) {
+ setUserData(user);
+ } else {
+ goLogInScreen();
+ }
+ }
+ };
+ displaySelectedScreen(R.id.inicio);
+ }
+
+ private void setUserData(FirebaseUser user) {
+ nameTextView.setText(user.getDisplayName());
+ emailTextView.setText(user.getEmail());
+ if (user.getPhotoUrl() != null) {
+ Glide.with(this).load(user.getPhotoUrl()).into(photoImageView);
+ } else {
+ photoImageView.setImageResource(R.drawable.ic_account);
+ }
+
+ }
+
+ @Override
+ public void onBackPressed() {
+ DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+ if (drawer.isDrawerOpen(GravityCompat.START)) {
+ drawer.closeDrawer(GravityCompat.START);
+ } else {
+ super.onBackPressed();
+ }
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.dash_board, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ // Handle action bar item clicks here. The action bar will
+ // automatically handle clicks on the Home/Up button, so long
+ // as you specify a parent activity in AndroidManifest.xml.
+ int id = item.getItemId();
+
+ //noinspection SimplifiableIfStatement
+ if (id == R.id.action_settings) {
+ Fragment fragment = new ConfigFragment();
+ if (fragment != null) {
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ ft.replace(R.id.contenedor_principal, fragment);
+ ft.commit();
+ }
+
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+ private void displaySelectedScreen(int itemId) {
+ Fragment fragment = null;
+ switch (itemId) {
+ case R.id.inicio:
+ fragment = new HomeFragment();
+ break;
+ case R.id.ingresos:
+ fragment = new IngresosFragment();
+ break;
+ case R.id.ahorros:
+ fragment = new AhorrosFragment();
+ break;
+ case R.id.gastos:
+ fragment = new GastosFragment();
+ break;
+ case R.id.mas:
+ fragment = new MasFragment();
+ break;
+ case R.id.configuracion:
+ fragment = new ConfigFragment();
+ break;
+ case R.id.desarrolladores:
+ fragment = new DesarrolladoresFragment();
+ break;
+ case R.id.logout:
+ firebaseAuth.signOut();
+ Auth.GoogleSignInApi.signOut(googleApiClient).setResultCallback(new ResultCallback() {
+ @Override
+ public void onResult(@NonNull Status status) {
+ if (status.isSuccess()) {
+ goLogInScreen();
+ } else {
+ Toast.makeText(getApplicationContext(), "No hemos podido cerrar sessión", Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+ break;
+ }
+
+ //replacing the fragment
+ if (fragment != null) {
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ ft.replace(R.id.contenedor_principal, fragment);
+ ft.commit();
+ }
+
+ DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
+ drawer.closeDrawer(GravityCompat.START);
+ }
+
+ @SuppressWarnings("StatementWithEmptyBody")
+ @Override
+ public boolean onNavigationItemSelected(MenuItem item) {
+ displaySelectedScreen(item.getItemId());
+ return true;
+ }
+
+ @Override
+ public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
+
+ }
+
+ /*autentificación*/
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ firebaseAuth.addAuthStateListener(firebaseAuthListener);
+
+ }
+
+
+ private void goLogInScreen() {
+ Intent intent = new Intent(this, LoginActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
+
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+
+ if (firebaseAuthListener != null) {
+ firebaseAuth.removeAuthStateListener(firebaseAuthListener);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/DesarrolladoresFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/DesarrolladoresFragment.java
new file mode 100644
index 0000000..c52a742
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/DesarrolladoresFragment.java
@@ -0,0 +1,23 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+
+public class DesarrolladoresFragment extends Fragment {
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_desarrolladores, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getActivity().setTitle("Desarrolladores");
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/DetalleActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/DetalleActivity.java
new file mode 100644
index 0000000..46fec35
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/DetalleActivity.java
@@ -0,0 +1,21 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.webkit.WebView;
+
+public class DetalleActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_detalle);
+
+ Bundle bundle = getIntent().getExtras();
+ String url = getIntent().getStringExtra("url");
+ WebView webView = (WebView) findViewById(R.id.articulo_detalle);
+ webView.loadUrl(url);
+ setTitle("Noticias");
+
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/GastosFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/GastosFragment.java
new file mode 100644
index 0000000..597506e
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/GastosFragment.java
@@ -0,0 +1,77 @@
+package com.example.kenneth.smartbudget;
+
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v7.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.Toast;
+
+
+public class GastosFragment extends Fragment {
+
+ public static String DirecUser = "";
+ public static int indexSpend;
+ private String Spend = "";
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_gastos, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getActivity().setTitle("Gastos");
+
+ ((Button) view.findViewById(R.id.button_Location)).setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ Intent intento = new Intent(getActivity(), MapsActivity.class);
+ getActivity().startActivity(intento);
+ GiveMeLocation(getActivity().findViewById(R.id.editText));
+ }
+ });
+ }
+
+ static EditText texto;
+
+ public void GiveMeLocation(final View view) {
+ // Uso:
+ texto = new EditText(view.getContext());
+ AlertDialog.Builder builder1 = new AlertDialog.Builder(view.getContext());
+ builder1.setMessage("Digite su gasto:");
+ texto.setText("");
+ texto.selectAll();
+ builder1.setView(texto);
+
+ builder1.setCancelable(true);
+ builder1.setPositiveButton("OK",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ Spend = DirecUser + ": " + texto.getText().toString() + " colones";
+ ((EditText) view.findViewById(R.id.editText)).setText(Spend);
+ }
+ });
+
+ builder1.setNegativeButton("Cancelar",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ Toast.makeText(getActivity(), "Se canceló la operación", Toast.LENGTH_SHORT).show();
+ }
+ });
+
+ AlertDialog alert11 = builder1.create();
+ alert11.show();
+ }
+
+ ;
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/GeneralFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/GeneralFragment.java
new file mode 100644
index 0000000..9ae8956
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/GeneralFragment.java
@@ -0,0 +1,106 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.github.mikephil.charting.charts.BarChart;
+import com.github.mikephil.charting.data.BarData;
+import com.github.mikephil.charting.data.BarDataSet;
+import com.github.mikephil.charting.data.BarEntry;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Random;
+
+public class GeneralFragment extends Fragment {
+ private BarChart barChart;
+ private ArrayList dates;
+ private Random random;
+ private ArrayList barEntries;
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view = inflater.inflate(R.layout.fragment_general, container, false);
+ String dato1="2017/01/05";
+ String dato2="2017/05/01";
+
+ barChart = (BarChart) view.findViewById(R.id.bargraph);
+ createRandomBarGraph(dato1, dato2);
+
+ return view;
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ }
+ public void createRandomBarGraph(String Date1, String Date2){
+
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
+
+ try {
+ Date date1 = simpleDateFormat.parse(Date1);
+ Date date2 = simpleDateFormat.parse(Date2);
+
+ Calendar mDate1 = Calendar.getInstance();
+ Calendar mDate2 = Calendar.getInstance();
+ mDate1.clear();
+ mDate2.clear();
+
+ mDate1.setTime(date1);
+ mDate2.setTime(date2);
+
+ dates = new ArrayList<>();
+ dates = getList(mDate1,mDate2);
+
+ barEntries = new ArrayList<>();
+ float max = 0f;
+ float value = 0f;
+ random = new Random();
+ for(int j = 0; j< dates.size();j++){
+ max = 100f;
+ value = random.nextFloat()*max;
+ barEntries.add(new BarEntry(value,j));
+ }
+
+ }catch(ParseException e){
+ e.printStackTrace();
+ }
+
+ BarDataSet barDataSet = new BarDataSet(barEntries,"Dates");
+ BarData barData = new BarData(dates,barDataSet);
+ barChart.setData(barData);
+ barChart.setDescription("Último mes");
+
+ }
+
+ public ArrayList getList(Calendar startDate, Calendar endDate){
+ ArrayList list = new ArrayList();
+ while(startDate.compareTo(endDate)<=0){
+ list.add(getDate(startDate));
+ startDate.add(Calendar.DAY_OF_MONTH,1);
+ }
+ return list;
+ }
+
+ public String getDate(Calendar cld){
+ String curDate = cld.get(Calendar.YEAR) + "/" + (cld.get(Calendar.MONTH) + 1) + "/"
+ +cld.get(Calendar.DAY_OF_MONTH);
+ try{
+ Date date = new SimpleDateFormat("yyyy/MM/dd").parse(curDate);
+ curDate = new SimpleDateFormat("yyy/MM/dd").format(date);
+ }catch(ParseException e){
+ e.printStackTrace();
+ }
+
+ return curDate;
+
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/HistorialGastosFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/HistorialGastosFragment.java
new file mode 100644
index 0000000..79c6bbf
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/HistorialGastosFragment.java
@@ -0,0 +1,109 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.github.mikephil.charting.charts.BarChart;
+import com.github.mikephil.charting.data.BarData;
+import com.github.mikephil.charting.data.BarDataSet;
+import com.github.mikephil.charting.data.BarEntry;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Random;
+
+
+public class HistorialGastosFragment extends Fragment {
+ private BarChart barChart;
+ private ArrayList dates;
+ private Random random;
+ private ArrayList barEntries;
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+
+
+ View view = inflater.inflate(R.layout.fragment_historial_gastos, container, false);
+ String dato1="2017/01/05";
+ String dato2="2017/05/01";
+
+ barChart = (BarChart) view.findViewById(R.id.bargraph);
+ createRandomBarGraph(dato1, dato2);
+
+ return view;
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ }
+ public void createRandomBarGraph(String Date1, String Date2){
+
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd");
+
+ try {
+ Date date1 = simpleDateFormat.parse(Date1);
+ Date date2 = simpleDateFormat.parse(Date2);
+
+ Calendar mDate1 = Calendar.getInstance();
+ Calendar mDate2 = Calendar.getInstance();
+ mDate1.clear();
+ mDate2.clear();
+
+ mDate1.setTime(date1);
+ mDate2.setTime(date2);
+
+ dates = new ArrayList<>();
+ dates = getList(mDate1,mDate2);
+
+ barEntries = new ArrayList<>();
+ float max = 0f;
+ float value = 0f;
+ random = new Random();
+ for(int j = 0; j< dates.size();j++){
+ max = 100f;
+ value = random.nextFloat()*max;
+ barEntries.add(new BarEntry(value,j));
+ }
+
+ }catch(ParseException e){
+ e.printStackTrace();
+ }
+
+ BarDataSet barDataSet = new BarDataSet(barEntries,"Dates");
+ BarData barData = new BarData(dates,barDataSet);
+ barChart.setData(barData);
+ barChart.setDescription("Último mes");
+
+ }
+
+ public ArrayList getList(Calendar startDate, Calendar endDate){
+ ArrayList list = new ArrayList();
+ while(startDate.compareTo(endDate)<=0){
+ list.add(getDate(startDate));
+ startDate.add(Calendar.DAY_OF_MONTH,1);
+ }
+ return list;
+ }
+
+ public String getDate(Calendar cld){
+ String curDate = cld.get(Calendar.YEAR) + "/" + (cld.get(Calendar.MONTH) + 1) + "/"
+ +cld.get(Calendar.DAY_OF_MONTH);
+ try{
+ Date date = new SimpleDateFormat("yyyy/MM/dd").parse(curDate);
+ curDate = new SimpleDateFormat("yyy/MM/dd").format(date);
+ }catch(ParseException e){
+ e.printStackTrace();
+ }
+
+ return curDate;
+
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/HomeFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/HomeFragment.java
new file mode 100644
index 0000000..5f535cd
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/HomeFragment.java
@@ -0,0 +1,104 @@
+package com.example.kenneth.smartbudget;
+
+import android.graphics.Color;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.design.widget.AppBarLayout;
+import android.support.design.widget.TabLayout;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentStatePagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class HomeFragment extends Fragment {
+ private AppBarLayout appBar;
+ private TabLayout pestanas;
+ private ViewPager viewPager;
+
+ public HomeFragment() {
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ View view = inflater.inflate(R.layout.fragment_home, container, false);
+
+ if (savedInstanceState == null) {
+ insertarTabs(container);
+
+ // Setear adaptador al viewpager.
+ viewPager = (ViewPager) view.findViewById(R.id.pager_home);
+ poblarViewPager(viewPager);
+ pestanas.setupWithViewPager(viewPager);
+ }
+
+ return view;
+ }
+
+ private void insertarTabs(ViewGroup container) {
+ View padre = (View) container.getParent();
+ appBar = (AppBarLayout) padre.findViewById(R.id.appbar);
+ pestanas = new TabLayout(getActivity());
+ pestanas.setTabTextColors(Color.parseColor("#FFFFFF"), Color.parseColor("#FFFFFF"));
+ appBar.addView(pestanas);
+ }
+
+ private void poblarViewPager(ViewPager viewPager) {
+ HomeFragment.AdaptadorSecciones adapter = new HomeFragment.AdaptadorSecciones(getFragmentManager());
+ adapter.addFragment(new HistorialGastosFragment(), "último mes");
+ adapter.addFragment(new GeneralFragment(), "Mis cuentas");
+ viewPager.setAdapter(adapter);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getActivity().setTitle("Inicio");
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ appBar.removeView(pestanas);
+ }
+
+ /**
+ * Un {@link FragmentStatePagerAdapter} que gestiona las secciones, fragmentos y
+ * títulos de las pestañas
+ */
+ public class AdaptadorSecciones extends FragmentStatePagerAdapter {
+ private final List fragmentos = new ArrayList<>();
+ private final List titulosFragmentos = new ArrayList<>();
+
+ public AdaptadorSecciones(FragmentManager fm) {
+ super(fm);
+ }
+
+ @Override
+ public android.support.v4.app.Fragment getItem(int position) {
+ return fragmentos.get(position);
+ }
+
+ @Override
+ public int getCount() {
+ return fragmentos.size();
+ }
+
+ public void addFragment(android.support.v4.app.Fragment fragment, String title) {
+ fragmentos.add(fragment);
+ titulosFragmentos.add(title);
+ }
+
+ @Override
+ public CharSequence getPageTitle(int position) {
+ return titulosFragmentos.get(position);
+ }
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/IngresosFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/IngresosFragment.java
new file mode 100644
index 0000000..10f0919
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/IngresosFragment.java
@@ -0,0 +1,25 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+
+public class IngresosFragment extends Fragment {
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.fragment_ingresos, container, false);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getActivity().setTitle("Ingresos");
+ }
+
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/LoginActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/LoginActivity.java
new file mode 100644
index 0000000..955f7c6
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/LoginActivity.java
@@ -0,0 +1,513 @@
+package com.example.kenneth.smartbudget;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.annotation.TargetApi;
+import android.app.LoaderManager.LoaderCallbacks;
+import android.content.CursorLoader;
+import android.content.Intent;
+import android.content.Loader;
+import android.content.pm.PackageManager;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.os.Bundle;
+import android.provider.ContactsContract;
+import android.support.annotation.NonNull;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.text.TextUtils;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.inputmethod.EditorInfo;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.google.android.gms.auth.api.Auth;
+import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
+import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
+import com.google.android.gms.auth.api.signin.GoogleSignInResult;
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.SignInButton;
+import com.google.android.gms.common.api.GoogleApiClient;
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import com.google.firebase.auth.AuthCredential;
+import com.google.firebase.auth.AuthResult;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+import com.google.firebase.auth.GoogleAuthProvider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static android.Manifest.permission.READ_CONTACTS;
+import static android.os.Build.VERSION_CODES.M;
+import static com.example.kenneth.smartbudget.R.id.email;
+import static com.example.kenneth.smartbudget.R.id.password;
+
+/**
+ * A login screen that offers login via email/password.
+ */
+public class LoginActivity extends AppCompatActivity implements LoaderCallbacks, GoogleApiClient.OnConnectionFailedListener {
+
+ /**
+ * Id to identity READ_CONTACTS permission request.
+ */
+ private static final int REQUEST_READ_CONTACTS = 0;
+
+
+ /**
+ * A dummy authentication store containing known user names and passwords.
+ * TODO: remove after connecting to a real authentication system.
+ */
+ private static final String[] DUMMY_CREDENTIALS = new String[]{
+ "foo@example.com:hello", "bar@example.com:world"
+ };
+ /**
+ * Keep track of the login task to ensure we can cancel it if requested.
+ */
+ private UserLoginTask mAuthTask = null;
+
+ // UI references.
+ private AutoCompleteTextView mEmailView;
+ private EditText mPasswordView;
+ private View mProgressView;
+ private View mLoginFormView;
+ private SignInButton signInButton;
+ public static final int SIGN_IN_CODE = 777;
+ private GoogleApiClient googleApiClient;
+ private FirebaseAuth firebaseAuth;
+ private FirebaseAuth.AuthStateListener firebaseAuthListener;
+ private ProgressBar progressBar;
+ private TextView textViewSignin;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_login);
+ // Set up the login form.
+ mEmailView = (AutoCompleteTextView) findViewById(email);
+ populateAutoComplete();
+
+ mPasswordView = (EditText) findViewById(password);
+ mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+ @Override
+ public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
+ if (id == R.id.login || id == EditorInfo.IME_NULL) {
+ attemptLogin();
+ return true;
+ }
+ return false;
+ }
+ });
+
+ textViewSignin = (TextView) findViewById(R.id.textViewSignin);
+ Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
+ mEmailSignInButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ attemptLogin();
+ }
+ });
+
+ textViewSignin.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ goSignUp();
+ }
+ });
+
+ mLoginFormView = findViewById(R.id.login_form);
+ mProgressView = findViewById(R.id.progressBar);
+
+ /*autentificacion*/
+
+ GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
+ .requestIdToken(getString(R.string.default_web_client_id))
+ .requestEmail()
+ .build();
+
+ googleApiClient = new GoogleApiClient.Builder(this)
+ .enableAutoManage(this, this)
+ .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
+ .build();
+ signInButton = (SignInButton) findViewById(R.id.signInButton);
+
+ signInButton.setSize(SignInButton.SIZE_WIDE);
+
+ signInButton.setColorScheme(SignInButton.COLOR_DARK);
+
+ signInButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);
+ startActivityForResult(intent, SIGN_IN_CODE);
+ }
+ });
+
+ firebaseAuth = FirebaseAuth.getInstance();
+ firebaseAuthListener = new FirebaseAuth.AuthStateListener() {
+ @Override
+ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
+ FirebaseUser user = firebaseAuth.getCurrentUser();
+ if (user != null) {
+ goMainScreen();
+ }
+ }
+ };
+ progressBar = (ProgressBar) findViewById(R.id.progressBar);
+
+ }
+
+ public void Mensaje(String msg) {
+ Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
+ }
+
+
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ firebaseAuth.addAuthStateListener(firebaseAuthListener);
+ }
+
+ private void populateAutoComplete() {
+ if (!mayRequestContacts()) {
+ return;
+ }
+
+ getLoaderManager().initLoader(0, null, this);
+ }
+
+ private boolean mayRequestContacts() {
+ if (Build.VERSION.SDK_INT < M) {
+ return true;
+ }
+ if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
+ return true;
+ }
+ if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
+ Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
+ .setAction(android.R.string.ok, new View.OnClickListener() {
+ @Override
+ @TargetApi(M)
+ public void onClick(View v) {
+ requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+ }
+ });
+ } else {
+ requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+ }
+ return false;
+ }
+
+ /**
+ * Callback received when a permissions request has been completed.
+ */
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
+ @NonNull int[] grantResults) {
+ if (requestCode == REQUEST_READ_CONTACTS) {
+ if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ populateAutoComplete();
+ }
+ }
+ }
+
+
+ /**
+ * Attempts to sign in or register the account specified by the login form.
+ * If there are form errors (invalid email, missing fields, etc.), the
+ * errors are presented and no actual login attempt is made.
+ */
+ private void attemptLogin() {
+ if (mAuthTask != null) {
+ return;
+ }
+
+ // Reset errors.
+ mEmailView.setError(null);
+ mPasswordView.setError(null);
+
+ // Store values at the time of the login attempt.
+ String email = mEmailView.getText().toString();
+ String password = mPasswordView.getText().toString();
+
+ boolean cancel = false;
+ View focusView = null;
+
+ // Check for a valid password, if the user entered one.
+ if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {
+ mPasswordView.setError(getString(R.string.error_invalid_password));
+ focusView = mPasswordView;
+ cancel = true;
+ }
+
+ // Check for a valid email address.
+ if (TextUtils.isEmpty(email)) {
+ mEmailView.setError(getString(R.string.error_field_required));
+ focusView = mEmailView;
+ cancel = true;
+ } else if (!isEmailValid(email)) {
+ mEmailView.setError(getString(R.string.error_invalid_email));
+ focusView = mEmailView;
+ cancel = true;
+ }
+
+ if (cancel) {
+ // There was an error; don't attempt login and focus the first
+ // form field with an error.
+ focusView.requestFocus();
+ } else {
+ // Show a progress spinner, and kick off a background task to
+ // perform the user login attempt.
+ showProgress(true);
+ firebaseAuth.signInWithEmailAndPassword(email, password)
+ .addOnCompleteListener(this, new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ if (task.isSuccessful()) {
+ finish();
+ startActivity(new Intent(getApplicationContext(), DashBoardActivity.class));
+ }else{
+ Mensaje("Intenta de nuevo!");
+ goLogInScreen();
+ }
+ }
+ });
+ // mAuthTask = new UserLoginTask(email, password);
+ // mAuthTask.execute((Void) null);
+ }
+ }
+
+ private boolean isEmailValid(String email) {
+ //TODO: Replace this with your own logic
+ return email.contains("@");
+ }
+
+ private boolean isPasswordValid(String password) {
+ //TODO: Replace this with your own logic
+ return password.length() > 4;
+ }
+
+
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
+ private void showProgress(final boolean show) {
+ // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
+ // for very easy animations. If available, use these APIs to fade-in
+ // the progress spinner.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
+ int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
+
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ mLoginFormView.animate().setDuration(shortAnimTime).alpha(
+ show ? 0 : 1).setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ }
+ });
+
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ mProgressView.animate().setDuration(shortAnimTime).alpha(
+ show ? 1 : 0).setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ }
+ });
+ } else {
+ // The ViewPropertyAnimator APIs are not available, so simply show
+ // and hide the relevant UI components.
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ }
+ }
+
+ @Override
+ public Loader onCreateLoader(int i, Bundle bundle) {
+ return new CursorLoader(this,
+ // Retrieve data rows for the device user's 'profile' contact.
+ Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
+ ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
+
+ // Select only email addresses.
+ ContactsContract.Contacts.Data.MIMETYPE +
+ " = ?", new String[]{ContactsContract.CommonDataKinds.Email
+ .CONTENT_ITEM_TYPE},
+
+ // Show primary email addresses first. Note that there won't be
+ // a primary email address if the user hasn't specified one.
+ ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
+ }
+
+ @Override
+ public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
+
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+
+ if (requestCode == SIGN_IN_CODE) {
+ GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
+ handleSignInResult(result);
+ }
+ }
+
+ private void handleSignInResult(GoogleSignInResult result) {
+ if (result.isSuccess()) {
+ firebaseAuthWithGoogle(result.getSignInAccount());
+ } else {
+ Toast.makeText(this, "No se pudo iniciar sesión", Toast.LENGTH_SHORT).show();
+ }
+ }
+
+ private void firebaseAuthWithGoogle(GoogleSignInAccount signInAccount) {
+
+ progressBar.setVisibility(View.VISIBLE);
+ signInButton.setVisibility(View.GONE);
+
+ AuthCredential credential = GoogleAuthProvider.getCredential(signInAccount.getIdToken(), null);
+ firebaseAuth.signInWithCredential(credential).addOnCompleteListener(this, new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+
+ progressBar.setVisibility(View.GONE);
+ signInButton.setVisibility(View.VISIBLE);
+
+ if (!task.isSuccessful()) {
+ Toast.makeText(getApplicationContext(), "No se podido iniciar sesión", Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+ }
+
+
+ private void goMainScreen() {
+ Intent intent = new Intent(this, DashBoardActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
+
+ private void goSignUp() {
+ Intent intent = new Intent(this, SignUpActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
+ private void goLogInScreen() {
+ Intent intent = new Intent(this, LoginActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
+
+ @Override
+ public void onLoadFinished(Loader cursorLoader, Cursor cursor) {
+ List emails = new ArrayList<>();
+ cursor.moveToFirst();
+ while (!cursor.isAfterLast()) {
+ emails.add(cursor.getString(ProfileQuery.ADDRESS));
+ cursor.moveToNext();
+ }
+
+ addEmailsToAutoComplete(emails);
+ }
+
+ @Override
+ public void onLoaderReset(Loader cursorLoader) {
+
+ }
+
+ private void addEmailsToAutoComplete(List emailAddressCollection) {
+ //Create adapter to tell the AutoCompleteTextView what to show in its dropdown list.
+ ArrayAdapter adapter =
+ new ArrayAdapter<>(LoginActivity.this,
+ android.R.layout.simple_dropdown_item_1line, emailAddressCollection);
+
+ mEmailView.setAdapter(adapter);
+ }
+
+
+ private interface ProfileQuery {
+ String[] PROJECTION = {
+ ContactsContract.CommonDataKinds.Email.ADDRESS,
+ ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
+ };
+
+ int ADDRESS = 0;
+ int IS_PRIMARY = 1;
+ }
+
+
+ public class UserLoginTask extends AsyncTask {
+
+ private final String mEmail;
+ private final String mPassword;
+
+ UserLoginTask(String email, String password) {
+ mEmail = email;
+ mPassword = password;
+ }
+
+ @Override
+ protected Boolean doInBackground(Void... params) {
+ // TODO: attempt authentication against a network service.
+
+ try {
+ // Simulate network access.
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ return false;
+ }
+
+ for (String credential : DUMMY_CREDENTIALS) {
+ String[] pieces = credential.split(":");
+ if (pieces[0].equals(mEmail)) {
+ // Account exists, return true if the password matches.
+ return pieces[1].equals(mPassword);
+ }
+ }
+
+ // TODO: register the new account here.
+ return true;
+ }
+
+ @Override
+ protected void onPostExecute(final Boolean success) {
+ mAuthTask = null;
+ showProgress(false);
+
+ if (success) {
+ finish();
+ } else {
+ mPasswordView.setError(getString(R.string.error_incorrect_password));
+ mPasswordView.requestFocus();
+ }
+ }
+
+ @Override
+ protected void onCancelled() {
+ mAuthTask = null;
+ showProgress(false);
+ }
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ if (firebaseAuthListener != null) {
+ firebaseAuth.removeAuthStateListener(firebaseAuthListener);
+ }
+ }
+}
+
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/MainActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/MainActivity.java
deleted file mode 100644
index be46990..0000000
--- a/app/src/main/java/com/example/kenneth/smartbudget/MainActivity.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.example.kenneth.smartbudget;
-
-import android.support.v7.app.AppCompatActivity;
-import android.os.Bundle;
-
-public class MainActivity extends AppCompatActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- }
-}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/MapsActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/MapsActivity.java
new file mode 100644
index 0000000..768b6b5
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/MapsActivity.java
@@ -0,0 +1,138 @@
+package com.example.kenneth.smartbudget;
+
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.location.Address;
+import android.location.Criteria;
+import android.location.Geocoder;
+import android.location.Location;
+import android.location.LocationListener;
+import android.location.LocationManager;
+import android.os.Bundle;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.app.FragmentActivity;
+import android.widget.Toast;
+
+import com.google.android.gms.maps.CameraUpdate;
+import com.google.android.gms.maps.CameraUpdateFactory;
+import com.google.android.gms.maps.GoogleMap;
+import com.google.android.gms.maps.OnMapReadyCallback;
+import com.google.android.gms.maps.SupportMapFragment;
+import com.google.android.gms.maps.model.BitmapDescriptorFactory;
+import com.google.android.gms.maps.model.LatLng;
+import com.google.android.gms.maps.model.Marker;
+import com.google.android.gms.maps.model.MarkerOptions;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Locale;
+
+public class MapsActivity extends FragmentActivity implements OnMapReadyCallback, LocationListener,
+ GoogleMap.OnMarkerClickListener {
+
+ private GoogleMap mMap;
+ private Marker posMarker;
+ private String locDirection;
+ private LocationManager handle;
+ private String providerServices;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_maps);
+ // Obtain the SupportMapFragment and get notified when the map is ready to be used.
+ SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
+ .findFragmentById(R.id.map);
+ mapFragment.getMapAsync(this);
+ }
+
+ @Override
+ public void onMapReady(GoogleMap googleMap) {
+ mMap = googleMap;
+ InitServices();
+ ShowActualPosition();
+ }
+
+ public void InitServices() {
+
+ handle = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
+ Criteria c = new Criteria();
+ c.setAccuracy(Criteria.ACCURACY_FINE);
+ providerServices = handle.getBestProvider(c, true);
+ Toast.makeText(getApplicationContext(), "Provedor: " + providerServices, Toast.LENGTH_SHORT).show();
+
+ if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
+ return;
+ }
+ handle.requestLocationUpdates(providerServices, 10000, 1, this);
+ }
+
+ public void ShowActualPosition() {
+
+ if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
+ return;
+ }
+ Location location = handle.getLastKnownLocation(providerServices);
+ if (location != null) {
+ AddMyMarker(location.getLatitude(), location.getLongitude());
+ getDirection(location);
+ } else
+ Toast.makeText(getApplicationContext(), "No se pudo obtener la actual posición", Toast.LENGTH_SHORT).show();
+ }
+
+ public void getDirection(Location loc) {
+
+ if (loc != null) {
+ if (loc.getLatitude() != 0.0 && loc.getLongitude() != 0.0) {
+ try {
+ Geocoder geocoder = new Geocoder(this, Locale.getDefault());
+ List direc = geocoder.getFromLocation(loc.getLatitude(), loc.getLongitude(), 1);
+ if (!direc.isEmpty()) {
+ Address direcFinal = direc.get(0);
+ locDirection = direcFinal.getAddressLine(0);
+ }
+ } catch (IOException e) {
+ locDirection = "" + e;
+ }
+ }
+ }
+ }
+
+ private void AddMyMarker(double lat, double lon) {
+
+ LatLng mPos = new LatLng(lat, lon);
+ CameraUpdate MyLocation = CameraUpdateFactory.newLatLngZoom(mPos, 16);
+ if (posMarker != null) posMarker.remove();
+ posMarker = mMap.addMarker(new MarkerOptions().position(mPos).title("My actual position")
+ .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_add_location)));
+ mMap.animateCamera(MyLocation);
+ mMap.setOnMarkerClickListener(this);
+ }
+
+ @Override
+ public void onLocationChanged(Location location) {
+
+ }
+
+ @Override
+ public void onStatusChanged(String provider, int status, Bundle extras) {
+
+ }
+
+ @Override
+ public void onProviderEnabled(String provider) {
+
+ }
+
+ @Override
+ public void onProviderDisabled(String provider) {
+
+ }
+
+ @Override
+ public boolean onMarkerClick(Marker marker) {
+ GastosFragment.DirecUser = locDirection;
+ super.finish();
+ return true;
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/MasFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/MasFragment.java
new file mode 100644
index 0000000..fa4ae32
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/MasFragment.java
@@ -0,0 +1,105 @@
+package com.example.kenneth.smartbudget;
+
+import android.graphics.Color;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.design.widget.AppBarLayout;
+import android.support.design.widget.TabLayout;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentStatePagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class MasFragment extends Fragment {
+ private AppBarLayout appBar;
+ private TabLayout pestanas;
+ private ViewPager viewPager;
+
+ public MasFragment() {
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ View view = inflater.inflate(R.layout.fragment_mas, container, false);
+
+ if (savedInstanceState == null) {
+ insertarTabs(container);
+
+ // Setear adaptador al viewpager.
+ viewPager = (ViewPager) view.findViewById(R.id.pager);
+ poblarViewPager(viewPager);
+ pestanas.setupWithViewPager(viewPager);
+ }
+
+ return view;
+ }
+
+ private void insertarTabs(ViewGroup container) {
+ View padre = (View) container.getParent();
+ appBar = (AppBarLayout) padre.findViewById(R.id.appbar);
+ pestanas = new TabLayout(getActivity());
+ pestanas.setTabTextColors(Color.parseColor("#FFFFFF"), Color.parseColor("#FFFFFF"));
+ appBar.addView(pestanas);
+ }
+
+ private void poblarViewPager(ViewPager viewPager) {
+ MasFragment.AdaptadorSecciones adapter = new MasFragment.AdaptadorSecciones(getFragmentManager());
+ adapter.addFragment(new NoticiasFragment(), "Noticias");
+ adapter.addFragment(new TipsFragment(), "Tips");
+ viewPager.setAdapter(adapter);
+ }
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ getActivity().setTitle("Más");
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ appBar.removeView(pestanas);
+ }
+
+ /**
+ * Un {@link FragmentStatePagerAdapter} que gestiona las secciones, fragmentos y
+ * títulos de las pestañas
+ */
+ public class AdaptadorSecciones extends FragmentStatePagerAdapter {
+ private final List fragmentos = new ArrayList<>();
+ private final List titulosFragmentos = new ArrayList<>();
+
+ public AdaptadorSecciones(FragmentManager fm) {
+ super(fm);
+ }
+
+ @Override
+ public android.support.v4.app.Fragment getItem(int position) {
+ return fragmentos.get(position);
+ }
+
+ @Override
+ public int getCount() {
+ return fragmentos.size();
+ }
+
+ public void addFragment(android.support.v4.app.Fragment fragment, String title) {
+ fragmentos.add(fragment);
+ titulosFragmentos.add(title);
+ }
+
+ @Override
+ public CharSequence getPageTitle(int position) {
+ return titulosFragmentos.get(position);
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/NoticiasFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/NoticiasFragment.java
new file mode 100644
index 0000000..97dcdc6
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/NoticiasFragment.java
@@ -0,0 +1,144 @@
+package com.example.kenneth.smartbudget;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+
+
+public class NoticiasFragment extends Fragment {
+
+ ListView listView;
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View v = inflater.inflate(R.layout.fragment_noticias, container, false);
+
+
+ return v;
+ }
+
+ String[] images_articles = {
+ "https://cdn.forbes.com.mx/2015/05/klings-youtube-640x400.jpg",
+ "https://cdn.forbes.com.mx/2015/07/enrique-640x400.jpg",
+ "https://cdn.forbes.com.mx/2014/01/reu_reto-640x400.jpg",
+ "http://www.elfinancierocr.com/finanzas/Banco_Central-compra-titulos_propios-deuda_estandarizada-liquidez_ELFIMA20161223_0024_9.jpg",
+ "http://www.elfinancierocr.com/tecnologia/Elempleo-com-informaticos-tecnologia_ELFIMA20170425_0009_5.jpg",
+ "http://www.elfinancierocr.com/noticias/Gerencia-Harvard_Business_Review-NYT-millennials-trabajo-equipo-organizacion-vacaciones-remuneracion_ELFIMA20170421_0017_9.jpg",
+ "http://www.nacion.com/economia/empresarial/costo-mensual-vivir-micro-apartamento_LNCIMA20170425_0046_5.jpg",
+ "http://www.elfinancierocr.com/tecnologia/Nova-nueva-app-transporte-colaborativo_ELFIMA20170425_0008_9.jpg",
+ "http://www.elfinancierocr.com/negocios/Mabe-refrigeradoras-Camara_de_Industrias-Inteco_ELFIMA20151211_0044_9.jpg",
+ "http://www.elfinancierocr.com/finanzas/tarjetas_de_credito-millas-cash_back-beneficios-tasas_de_interes_ELFIMA20161111_0036_5.jpg",
+ "http://www.elfinancierocr.com/noticias/Gerencia-Jose_Alberto_Carpio-gerente-emprendedor-liderazgo_ELFIMA20170421_0018_9.jpg"
+
+ };
+ String[] titles_articles = {
+ "Klings, la app mexicana del millón de usuarios.",
+ "8 frases de Carlos Slim para mejorar tus finanzas personales.",
+ "19 cosas difíciles que nadie hará por ti",
+ "Banco Central sube la Tasa de Política Monetaria por segunda vez en 2017 y llega a 2,50%",
+ "Salarios más atractivos en Costa Rica se ofrecen en tecnología y servicios",
+ "Contrario a lo que se cree, los millennials son adictos al trabajo",
+ "Vivir en un microapartamento en San José costará desde $2.200 al mes",
+ "Nova, app que se suma a los competidores de Uber",
+ "Administración Trump podría incidir en inversión de industriales costarricenses",
+ "Esto es lo que debe revisar cuando necesite cerrar una tarjeta de crédito",
+ "Las 10 características del buen gerente y emprendedor"
+
+ };
+ String[] descriptions_articles = {
+ "El boom de las aplicaciones continúa y los desarrolladores siguen tratando de encontrar el hilo negro para lograr que su idea se traduzca en descargas, y llegó el momento de Klings, la app mexicana que ya cuenta con un millón de usuarios registrados.",
+ "Si el segundo hombre más rico del mundo ha logrado construir un imperio siguiendo sus propios criterios, quizá valga la pena adoptarlos y ver qué pueden hacer por nuestras finanzas.",
+ "Lo sabemos, es fácil y cómodo evitar el esfuerzo y rehuir de la responsabilidad, pero si quieres ser exitoso tendrás que poner mucho de tu parte. Dan Waldschmidt te ofrece algunos consejos.",
+ "Además del aumento en la TPM, también se fijó la tasa de interés bruta de los depósitos a un día plazo (DON) en 1,14% anual, a partir del 27 de abril.",
+ "En compensación informáticos también obtienen los mejores beneficios.",
+ "Nuevo estudio revela que incluso no toman vacaciones y temen ser reemplazados",
+ "Nuevo Hotel Balmoral lanza opción de alquiler en el centro de la capital",
+ "Tarifa para choferes será de $35 mensuales y para los clientes el pago será en efectivo",
+ "Presidente de Cámara, Enrique Egloff, afirma que la entidad se reunió con autoridades estadounidenses y hace un llamado a disipar la incertidumbre ",
+ "Saldos pendientes, programas de lealtad y millas son solo algunos factores a los que debe prestar atención",
+ "El líder exitoso siempre se cuestiona y pregunta cómo puede mejorar"
+ };
+
+ String[] urls_articles = {
+ "https://www.forbes.com.mx/klings-la-app-mexicana-del-millon-de-usuarios/",
+ "https://www.forbes.com.mx/8-frases-de-carlos-slim-para-mejorar-tus-finanzas-personales/",
+ "https://www.forbes.com.mx/19-cosas-dificiles-que-nadie-hara-por-ti/",
+ "http://www.elfinancierocr.com/finanzas/Banco-Central-Tasa-Politica-Monetaria-sube-segunda_vez_0_1165083490.html",
+ "http://www.elfinancierocr.com/tecnologia/Elempleo-com-Talent_Partner-informaticos-tecnologia-salarios_0_1164483552.html",
+ "http://www.elfinancierocr.com/gerencia/Gerencia-Harvard_Business_Review-NYT-millennials-trabajo-equipo-organizacion-vacaciones-remuneracion_0_1162083794.html",
+ "http://www.nacion.com/economia/empresarial/Vivir-apartamento-San-Jose-costara_0_1629837035.html",
+ "http://www.elfinancierocr.com/tecnologia/Nova-nueva-suma-competidores-Uber_0_1164483543.html",
+ "http://www.elfinancierocr.com/economia-y-politica/Administracion-Trump-inversion-industriales-costarricenses_0_1164483549.html",
+ "http://www.elfinancierocr.com/finanzas/tarjeta_de_credito-cierre-tarjetas-deudas-morosidad_0_1162083783.html",
+ "http://www.elfinancierocr.com/gerencia/Gerencia-Jose_Alberto_Carpio-gerente-emprendedor-liderazgo_0_1162083795.html"
+ };
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+
+ listView = (ListView) getActivity().findViewById(R.id.article_list);
+ final Adaptador adaptador = new Adaptador();
+ listView.setAdapter(adaptador);
+
+ listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+
+ @Override
+ public void onItemClick(AdapterView> arg0, View arg1, int position,
+ long arg3) {
+ Bundle bundle = new Bundle();
+ Intent intent = new Intent(getActivity(), DetalleActivity.class);
+ bundle.putString("url", urls_articles[position]);
+ intent.putExtras(bundle);
+ startActivity(intent);
+ }
+
+ });
+
+ }
+
+ class Adaptador extends BaseAdapter {
+
+ @Override
+ public int getCount() {
+ return images_articles.length;
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return null;
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return 0;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ convertView = getActivity().getLayoutInflater().inflate(R.layout.content_list_article, null);
+ ImageView image_video = (ImageView) convertView.findViewById(R.id.image_article);
+ TextView title_video = (TextView) convertView.findViewById(R.id.title_article);
+ TextView description_video = (TextView) convertView.findViewById(R.id.description_article);
+ title_video.setText(titles_articles[position]);
+ description_video.setText(descriptions_articles[position]);
+ Glide.with(getActivity().getApplicationContext()).load(images_articles[position]).into(image_video);
+
+ return convertView;
+ }
+
+
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/NotificationsActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/NotificationsActivity.java
new file mode 100644
index 0000000..e514fb4
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/NotificationsActivity.java
@@ -0,0 +1,37 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.widget.CompoundButton;
+import android.widget.TextView;
+import android.widget.Toast;
+import android.widget.ToggleButton;
+
+public class NotificationsActivity extends AppCompatActivity {
+ private TextView verificacion;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_notifications);
+ ToggleButton toggle = (ToggleButton) findViewById(R.id.si_no);
+ toggle.setOnCheckedChangeListener(new
+ CompoundButton.OnCheckedChangeListener() {
+ public void onCheckedChanged(CompoundButton buttonView, boolean
+ isChecked) {
+ if (isChecked) {
+ Mensaje("Te enviaremos notificaciones.");
+ } else {
+ Mensaje("Lo sentimos!");
+ }
+ }
+ });
+
+ }
+
+ public void Mensaje(String msg) {
+ Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/ObjetosxDesplegar.java b/app/src/main/java/com/example/kenneth/smartbudget/ObjetosxDesplegar.java
new file mode 100644
index 0000000..25c2630
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/ObjetosxDesplegar.java
@@ -0,0 +1,32 @@
+package com.example.kenneth.smartbudget;
+
+public class ObjetosxDesplegar {
+
+
+ private String atributo01;
+ private String atributo02;
+ private String NumDibujo;
+
+ public ObjetosxDesplegar(String atributo01, String atributo02, String NumDibujo) {
+ super();
+ this.atributo01 = atributo01;
+ this.atributo02 = atributo02;
+ this.NumDibujo = NumDibujo;
+ }
+
+ public String getAtributo01() {
+ return atributo01;
+ }
+
+ public String getAtributo02() {
+ return atributo02;
+ }
+
+ public String getNumDibujo() {
+ return NumDibujo;
+ }
+
+ public void setAtributo01(String atributo01) {
+ this.atributo01 = atributo01;
+ }
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/ProfileActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/ProfileActivity.java
new file mode 100644
index 0000000..55e171c
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/ProfileActivity.java
@@ -0,0 +1,181 @@
+package com.example.kenneth.smartbudget;
+
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.bumptech.glide.Glide;
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+
+public class ProfileActivity extends AppCompatActivity {
+ private FirebaseAuth firebaseAuth;
+ private FirebaseAuth.AuthStateListener firebaseAuthListener;
+ private TextView texto_nombre;
+ private TextView texto_email;
+ private ImageView icono_perfil;
+ private ImageView icono_fecha;
+ private Button delete_account;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_profile);
+
+ texto_nombre = (TextView) findViewById(R.id.texto_nombre);
+ texto_email = (TextView) findViewById(R.id.texto_email);
+ icono_perfil = (ImageView) findViewById(R.id.icono_perfil);
+ icono_fecha = (ImageView) findViewById(R.id.icono_indicador_derecho);
+ delete_account = (Button) findViewById(R.id.delete_account);
+
+ firebaseAuth = FirebaseAuth.getInstance();
+ firebaseAuthListener = new FirebaseAuth.AuthStateListener() {
+ @Override
+ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
+ FirebaseUser user = firebaseAuth.getCurrentUser();
+ if (user != null) {
+ setUserData(user);
+ } else {
+ Toast.makeText(getApplicationContext(), "No hemos podido cargar tu informacion " + user.getDisplayName(), Toast.LENGTH_SHORT).show();
+ }
+ }
+ };
+
+ icono_fecha.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ GiveMePassword(findViewById(R.id.icono_indicador_derecho));
+
+ }
+ });
+ delete_account.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View v) {
+ DialogoSiNo(delete_account);
+ }
+ });
+ }
+
+ private void setUserData(FirebaseUser user) {
+ texto_nombre.setText(user.getDisplayName());
+ texto_email.setText(user.getEmail());
+ if (user.getPhotoUrl() != null) {
+ Glide.with(this).load(user.getPhotoUrl()).into(icono_perfil);
+ } else {
+ icono_perfil.setImageResource(R.drawable.ic_account);
+ }
+ }
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ firebaseAuth.addAuthStateListener(firebaseAuthListener);
+
+ }
+
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+
+ if (firebaseAuthListener != null) {
+ firebaseAuth.removeAuthStateListener(firebaseAuthListener);
+ }
+ }
+
+ static EditText texto;
+
+
+ public void GiveMePassword(final View view) {
+ // Uso:
+ texto = new EditText(view.getContext());
+ AlertDialog.Builder builder1 = new AlertDialog.Builder(view.getContext());
+ builder1.setMessage("Digite su nueva contraseña:");
+ texto.setText("");
+ texto.selectAll();
+ builder1.setView(texto);
+
+ builder1.setCancelable(true);
+ builder1.setPositiveButton("OK",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
+ String newPassword = texto.getText().toString();
+ user.updatePassword(newPassword)
+ .addOnCompleteListener(new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ if (task.isSuccessful()) {
+ Mensaje("Tu contraseña fue actualizada");
+ } else {
+ Mensaje("Hemos topada con un error, intentalo más tarde :) ");
+ }
+ }
+ });
+ }
+ });
+
+ builder1.setNegativeButton("Cancelar",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ Mensaje("Cancelado");
+ }
+ });
+
+ AlertDialog alert11 = builder1.create();
+ alert11.show();
+ }
+
+ public void DialogoSiNo(View view) {
+// Uso: DialogoSiNo(findViewById(R.id.btnNombreBoton))
+ AlertDialog.Builder builder1 = new
+ AlertDialog.Builder(view.getContext());
+ builder1.setMessage("Estas seguro de hacer esto.?");
+ builder1.setCancelable(true);
+ builder1.setPositiveButton("Si",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ Mensaje("Es una lastima de que te vayas!");
+ FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
+
+ user.delete()
+ .addOnCompleteListener(new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ if (task.isSuccessful()) {
+ Mensaje("Hasta pronto!");
+ }
+ }
+ });
+
+
+ }
+ });
+ builder1.setNegativeButton("No",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ Mensaje("Bien hecho!");
+ }
+ });
+ AlertDialog alert11 = builder1.create();
+ alert11.show();
+ }
+
+ ;
+
+ public void Mensaje(String msg) {
+ Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/SignUpActivity.java b/app/src/main/java/com/example/kenneth/smartbudget/SignUpActivity.java
new file mode 100644
index 0000000..6efe3f4
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/SignUpActivity.java
@@ -0,0 +1,385 @@
+package com.example.kenneth.smartbudget;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.annotation.TargetApi;
+import android.app.LoaderManager.LoaderCallbacks;
+import android.content.CursorLoader;
+import android.content.Intent;
+import android.content.Loader;
+import android.content.pm.PackageManager;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.os.Bundle;
+import android.provider.ContactsContract;
+import android.support.annotation.NonNull;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.text.TextUtils;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.inputmethod.EditorInfo;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.google.android.gms.tasks.OnCompleteListener;
+import com.google.android.gms.tasks.Task;
+import com.google.firebase.auth.AuthResult;
+import com.google.firebase.auth.FirebaseAuth;
+import com.google.firebase.auth.FirebaseUser;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static android.Manifest.permission.READ_CONTACTS;
+import static android.os.Build.VERSION_CODES.M;
+
+/**
+ * A login screen that offers login via email/password.
+ */
+public class SignUpActivity extends AppCompatActivity implements LoaderCallbacks {
+
+ private static final int REQUEST_READ_CONTACTS = 0;
+ private static final String[] DUMMY_CREDENTIALS = new String[]{
+ "foo@example.com:hello", "bar@example.com:world"
+ };
+
+ private UserLoginTask mAuthTask = null;
+
+ // UI references.
+ private AutoCompleteTextView mEmailView;
+ private EditText mPasswordView;
+ private View mProgressView;
+ private View mLoginFormView;
+ private FirebaseAuth firebaseAuth;
+ private FirebaseAuth.AuthStateListener firebaseAuthListener;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_sign_up);
+ // Set up the login form.
+ mEmailView = (AutoCompleteTextView) findViewById(R.id.email);
+ populateAutoComplete();
+
+ mPasswordView = (EditText) findViewById(R.id.password);
+ mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+ @Override
+ public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
+ if (id == R.id.login || id == EditorInfo.IME_NULL) {
+ attemptLogin();
+ return true;
+ }
+ return false;
+ }
+ });
+
+ Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
+ mEmailSignInButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ attemptLogin();
+ }
+ });
+
+ mLoginFormView = findViewById(R.id.login_form);
+ mProgressView = findViewById(R.id.login_progress);
+
+ firebaseAuth = FirebaseAuth.getInstance();
+ firebaseAuthListener = new FirebaseAuth.AuthStateListener() {
+ @Override
+ public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
+ FirebaseUser user = firebaseAuth.getCurrentUser();
+ if (user != null) {
+ goMainScreen();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ firebaseAuth.addAuthStateListener(firebaseAuthListener);
+ }
+
+ private void populateAutoComplete() {
+ if (!mayRequestContacts()) {
+ return;
+ }
+
+ getLoaderManager().initLoader(0, null, this);
+ }
+
+ private boolean mayRequestContacts() {
+ if (Build.VERSION.SDK_INT < M) {
+ return true;
+ }
+ if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
+ return true;
+ }
+ if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
+ Snackbar.make(mEmailView, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
+ .setAction(android.R.string.ok, new View.OnClickListener() {
+ @Override
+ @TargetApi(M)
+ public void onClick(View v) {
+ requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+ }
+ });
+ } else {
+ requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+ }
+ return false;
+ }
+
+
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
+ @NonNull int[] grantResults) {
+ if (requestCode == REQUEST_READ_CONTACTS) {
+ if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ populateAutoComplete();
+ }
+ }
+ }
+
+
+ private void attemptLogin() {
+ if (mAuthTask != null) {
+ return;
+ }
+
+ // Reset errors.
+ mEmailView.setError(null);
+ mPasswordView.setError(null);
+
+ // Store values at the time of the login attempt.
+ String email = mEmailView.getText().toString();
+ String password = mPasswordView.getText().toString();
+
+ boolean cancel = false;
+ View focusView = null;
+
+ // Check for a valid password, if the user entered one.
+ if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {
+ mPasswordView.setError(getString(R.string.error_invalid_password));
+ focusView = mPasswordView;
+ cancel = true;
+ }
+
+ // Check for a valid email address.
+ if (TextUtils.isEmpty(email)) {
+ mEmailView.setError(getString(R.string.error_field_required));
+ focusView = mEmailView;
+ cancel = true;
+ } else if (!isEmailValid(email)) {
+ mEmailView.setError(getString(R.string.error_invalid_email));
+ focusView = mEmailView;
+ cancel = true;
+ }
+
+ if (cancel) {
+ // There was an error; don't attempt login and focus the first
+ // form field with an error.
+ focusView.requestFocus();
+ } else {
+ // Show a progress spinner, and kick off a background task to
+ // perform the user login attempt.
+ showProgress(true);
+ firebaseAuth.createUserWithEmailAndPassword(email, password)
+ .addOnCompleteListener(this, new OnCompleteListener() {
+ @Override
+ public void onComplete(@NonNull Task task) {
+ //checking if success
+ if (task.isSuccessful()) {
+ finish();
+ startActivity(new Intent(getApplicationContext(), DashBoardActivity.class));
+ } else {
+ //display some message here
+ Toast.makeText(SignUpActivity.this, "Lo sentimos hubo un error al registrar tu cuenta ", Toast.LENGTH_LONG).show();
+ }
+ }
+ });
+ // mAuthTask = new UserLoginTask(email, password);
+ // mAuthTask.execute((Void) null);
+
+ }
+ }
+
+ private boolean isEmailValid(String email) {
+ //TODO: Replace this with your own logic
+ return email.contains("@");
+ }
+
+ private boolean isPasswordValid(String password) {
+ //TODO: Replace this with your own logic
+ return password.length() > 4;
+ }
+
+ /**
+ * Shows the progress UI and hides the login form.
+ */
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
+ private void showProgress(final boolean show) {
+ // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
+ // for very easy animations. If available, use these APIs to fade-in
+ // the progress spinner.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
+ int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
+
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ mLoginFormView.animate().setDuration(shortAnimTime).alpha(
+ show ? 0 : 1).setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ }
+ });
+
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ mProgressView.animate().setDuration(shortAnimTime).alpha(
+ show ? 1 : 0).setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ }
+ });
+ } else {
+ // The ViewPropertyAnimator APIs are not available, so simply show
+ // and hide the relevant UI components.
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ }
+ }
+
+ @Override
+ public Loader onCreateLoader(int i, Bundle bundle) {
+ return new CursorLoader(this,
+ // Retrieve data rows for the device user's 'profile' contact.
+ Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
+ ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
+
+ // Select only email addresses.
+ ContactsContract.Contacts.Data.MIMETYPE +
+ " = ?", new String[]{ContactsContract.CommonDataKinds.Email
+ .CONTENT_ITEM_TYPE},
+
+ // Show primary email addresses first. Note that there won't be
+ // a primary email address if the user hasn't specified one.
+ ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
+ }
+
+ @Override
+ public void onLoadFinished(Loader cursorLoader, Cursor cursor) {
+ List emails = new ArrayList<>();
+ cursor.moveToFirst();
+ while (!cursor.isAfterLast()) {
+ emails.add(cursor.getString(ProfileQuery.ADDRESS));
+ cursor.moveToNext();
+ }
+
+ addEmailsToAutoComplete(emails);
+ }
+
+ @Override
+ public void onLoaderReset(Loader cursorLoader) {
+
+ }
+
+ private void addEmailsToAutoComplete(List emailAddressCollection) {
+ //Create adapter to tell the AutoCompleteTextView what to show in its dropdown list.
+ ArrayAdapter adapter =
+ new ArrayAdapter<>(SignUpActivity.this,
+ android.R.layout.simple_dropdown_item_1line, emailAddressCollection);
+
+ mEmailView.setAdapter(adapter);
+ }
+
+
+ private interface ProfileQuery {
+ String[] PROJECTION = {
+ ContactsContract.CommonDataKinds.Email.ADDRESS,
+ ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
+ };
+
+ int ADDRESS = 0;
+ int IS_PRIMARY = 1;
+ }
+
+
+ public class UserLoginTask extends AsyncTask {
+
+ private final String mEmail;
+ private final String mPassword;
+
+ UserLoginTask(String email, String password) {
+ mEmail = email;
+ mPassword = password;
+ }
+
+ @Override
+ protected Boolean doInBackground(Void... params) {
+ // TODO: attempt authentication against a network service.
+
+ try {
+ // Simulate network access.
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ return false;
+ }
+
+ for (String credential : DUMMY_CREDENTIALS) {
+ String[] pieces = credential.split(":");
+ if (pieces[0].equals(mEmail)) {
+ // Account exists, return true if the password matches.
+ return pieces[1].equals(mPassword);
+ }
+ }
+
+ // TODO: register the new account here.
+ return true;
+ }
+
+ @Override
+ protected void onPostExecute(final Boolean success) {
+ mAuthTask = null;
+ showProgress(false);
+
+ if (success) {
+ finish();
+ } else {
+ mPasswordView.setError(getString(R.string.error_incorrect_password));
+ mPasswordView.requestFocus();
+ }
+ }
+
+ @Override
+ protected void onCancelled() {
+ mAuthTask = null;
+ showProgress(false);
+ }
+ }
+
+ private void goMainScreen() {
+ Intent intent = new Intent(this, DashBoardActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ if (firebaseAuthListener != null) {
+ firebaseAuth.removeAuthStateListener(firebaseAuthListener);
+ }
+ }
+}
+
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/SplashScreen.java b/app/src/main/java/com/example/kenneth/smartbudget/SplashScreen.java
new file mode 100644
index 0000000..87bae72
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/SplashScreen.java
@@ -0,0 +1,35 @@
+package com.example.kenneth.smartbudget;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+
+public class SplashScreen extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.splash);
+
+ Thread timerThread = new Thread() {
+ public void run() {
+ try {
+ sleep(1000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } finally {
+ Intent intent = new Intent(SplashScreen.this, DashBoardActivity.class);
+ startActivity(intent);
+ }
+ }
+ };
+ timerThread.start();
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ finish();
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/kenneth/smartbudget/TipsFragment.java b/app/src/main/java/com/example/kenneth/smartbudget/TipsFragment.java
new file mode 100644
index 0000000..aa757da
--- /dev/null
+++ b/app/src/main/java/com/example/kenneth/smartbudget/TipsFragment.java
@@ -0,0 +1,186 @@
+package com.example.kenneth.smartbudget;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.bumptech.glide.Glide;
+import com.google.android.youtube.player.YouTubeInitializationResult;
+import com.google.android.youtube.player.YouTubePlayer;
+import com.google.android.youtube.player.YouTubePlayerSupportFragment;
+
+
+public class TipsFragment extends Fragment {
+
+ private static final String API_KEY = "AIzaSyCaffM0P-TWq1Fl0abHYCS2GFlEVFE5Pwo";
+ private static String VIDEO_ID = "03Kc_HNVKyM";
+
+ ListView listView;
+
+ private YouTubePlayer youTubePlayer;
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View v = inflater.inflate(R.layout.fragment_tips, container, false);
+
+ YouTubePlayerSupportFragment youTubePlayerFragment = YouTubePlayerSupportFragment.newInstance();
+
+ FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
+ transaction.add(R.id.youtube_layout, youTubePlayerFragment).commit();
+
+ youTubePlayerFragment.initialize(API_KEY, new YouTubePlayer.OnInitializedListener() {
+
+
+ @Override
+ public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) {
+ if (!wasRestored) {
+ if (youTubePlayer == null) {
+ //player.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT);
+ player.loadVideo(VIDEO_ID);
+ player.play();
+ youTubePlayer = player;
+ }
+ }
+ }
+
+ @Override
+ public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult error) {
+ // YouTube error
+ String errorMessage = error.toString();
+ Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_LONG).show();
+ Log.d("errorMessage:", errorMessage);
+ }
+ });
+
+
+ return v;
+
+ }
+
+ String[] images_video = {
+ "https://i.ytimg.com/vi/03Kc_HNVKyM/hqdefault.jpg?custom=true&w=246&h=138&stc=true&jpg444=true&jpgq=90&sp=68&sigh=i9q-_U7WP4YUxgy1_97bOVBAViA",
+ "https://i.ytimg.com/vi/Mw2HC1N5lfs/hqdefault.jpg?custom=true&w=168&h=94&stc=true&jpg444=true&jpgq=90&sp=67&sigh=F3zpNw2GbFXxqZbncmUu6vzPelI",
+ "https://i.ytimg.com/vi/lZKSbJtN2fE/hqdefault.jpg?custom=true&w=168&h=94&stc=true&jpg444=true&jpgq=90&sp=68&sigh=HQviJLoTNqU13Z7u4Hi0_ZFi62k",
+ "https://i.ytimg.com/vi/TDInPcEH5DU/hqdefault.jpg?custom=true&w=168&h=94&stc=true&jpg444=true&jpgq=90&sp=68&sigh=-47puFAeEvBLBT1C_Ha5lE0SiKM",
+ "https://i.ytimg.com/vi/kLZuhijo7CI/hqdefault.jpg?custom=true&w=168&h=94&stc=true&jpg444=true&jpgq=90&sp=68&sigh=oIGLnbUjnT2S5sxwdiFGcJmEKPo",
+ "https://i.ytimg.com/vi/Qd2h7_W9vFY/hqdefault.jpg?custom=true&w=168&h=94&stc=true&jpg444=true&jpgq=90&sp=67&sigh=BTWWd9bwMRKTGwQgImwCxfSHnwA"
+ };
+ String[] titles_video = {
+ "Educación Financiera: El Ahorro",
+ "4 Habitos que te mantienen pobre",
+ "El hábito que te hará rico por (Robert Kiyosaki) Resumen Animado",
+ "5 Secretos para Multiplicar Dinero",
+ "Cómo Ahorrar Dinero | No importa cual sea tu salario",
+ "El hábito de las 3 alcancías"
+ };
+ String[] descriptions_video = {
+ "Conseguir la auténtica libertad financiera supone disponer de dinero para vivir durante años aunque no tengas ingresos por tu trabajo.",
+ "En este vídeo educativo conocerás 4 hábitos que te hacen perder dinero.",
+ "Gané dinero entonces ¿qué hago?, ¿Por qué no soy rico? Robert Kiyosaki dice que ser rico es más sencillo de lo que parece, pero depende mucho de nuestros hábitos financieros, si quieres llegar lejos con el dinero, escucha de que se trata este poderoso hábito.\n" +
+ "Disfruta del mejor resumen animado hecho por el canal SoloParaInteligentes.",
+ "Producir Dinero es una Ciencia que Todos Podemos Aprender y así aumentar Nuestros Ingresos.",
+ "¿Sientes que no puedes ahorrar, porque no te alcanza el dinero? Quiero convencerte de que cada uno puede hacerlo, incluso ganando el salario mínimo.",
+ "Este buen habito, consiste en crear 3 fondos, uno destinado para ahorros, sería como un colchón de seguridad, otro para donaciones y otro para re-invertir en tu negocio."
+ };
+
+
+ @Override
+ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+
+ listView = (ListView) getActivity().findViewById(R.id.video_list);
+ final Adaptador adaptador = new Adaptador();
+ listView.setAdapter(adaptador);
+
+
+ listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+
+ @Override
+ public void onItemClick(AdapterView> arg0, View arg1, int position,
+ long arg3) {
+
+ switch (position) {
+ case 0:
+ playVideo("hZweLjSVoqU");
+ break;
+ case 1:
+ playVideo("Mw2HC1N5lfs");
+ break;
+ case 2:
+ playVideo("lZKSbJtN2fE");
+ break;
+ case 3:
+ playVideo("TDInPcEH5DU");
+
+ break;
+ case 4:
+ playVideo("kLZuhijo7CI");
+ break;
+ case 5:
+ playVideo("Qd2h7_W9vFY");
+ break;
+
+ default:
+ break;
+ }
+
+ }
+
+ });
+
+
+ }
+
+ private void playVideo(String videoId) {
+ if (youTubePlayer != null) {
+ youTubePlayer.loadVideo(videoId);
+ }
+ }
+
+ class Adaptador extends BaseAdapter {
+
+ @Override
+ public int getCount() {
+ return images_video.length;
+ }
+
+ @Override
+ public Object getItem(int position) {
+ return null;
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return 0;
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ convertView = getActivity().getLayoutInflater().inflate(R.layout.content_list_video, null);
+ ImageView image_video = (ImageView) convertView.findViewById(R.id.image_video);
+ TextView title_video = (TextView) convertView.findViewById(R.id.title_video);
+ TextView description_video = (TextView) convertView.findViewById(R.id.description_video);
+ title_video.setText(titles_video[position]);
+ description_video.setText(descriptions_video[position]);
+ Glide.with(getActivity().getApplicationContext()).load(images_video[position]).into(image_video);
+
+ return convertView;
+ }
+
+
+ }
+
+
+}
diff --git a/app/src/main/res/drawable-hdpi/contrasena.png b/app/src/main/res/drawable-hdpi/contrasena.png
new file mode 100644
index 0000000..0032524
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/contrasena.png differ
diff --git a/app/src/main/res/drawable-hdpi/email.png b/app/src/main/res/drawable-hdpi/email.png
new file mode 100644
index 0000000..33692bc
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/email.png differ
diff --git a/app/src/main/res/drawable-hdpi/fecha.png b/app/src/main/res/drawable-hdpi/fecha.png
new file mode 100644
index 0000000..1966d47
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/fecha.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_account.png b/app/src/main/res/drawable-hdpi/ic_account.png
new file mode 100644
index 0000000..bd220a9
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_account.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_add.png b/app/src/main/res/drawable-hdpi/ic_add.png
new file mode 100644
index 0000000..9999b98
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_add.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_add_location.png b/app/src/main/res/drawable-hdpi/ic_add_location.png
new file mode 100644
index 0000000..a711406
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_add_location.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_ahorros.png b/app/src/main/res/drawable-hdpi/ic_ahorros.png
new file mode 100644
index 0000000..bb0e30c
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_ahorros.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_close.png b/app/src/main/res/drawable-hdpi/ic_close.png
new file mode 100644
index 0000000..42f5186
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_close.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_gastos.png b/app/src/main/res/drawable-hdpi/ic_gastos.png
new file mode 100644
index 0000000..61a5cc8
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_gastos.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_home.png b/app/src/main/res/drawable-hdpi/ic_home.png
new file mode 100644
index 0000000..d903c6c
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_home.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_money.png b/app/src/main/res/drawable-hdpi/ic_money.png
new file mode 100644
index 0000000..dc0c32d
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_money.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_more.png b/app/src/main/res/drawable-hdpi/ic_more.png
new file mode 100644
index 0000000..fcdf80d
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_more.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_notifications.png b/app/src/main/res/drawable-hdpi/ic_notifications.png
new file mode 100644
index 0000000..02b2258
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_notifications.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_people.png b/app/src/main/res/drawable-hdpi/ic_people.png
new file mode 100644
index 0000000..792d67d
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_people.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_plus_green.png b/app/src/main/res/drawable-hdpi/ic_plus_green.png
new file mode 100644
index 0000000..f033d35
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_plus_green.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_public.png b/app/src/main/res/drawable-hdpi/ic_public.png
new file mode 100644
index 0000000..21fea09
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_public.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_settings.png b/app/src/main/res/drawable-hdpi/ic_settings.png
new file mode 100644
index 0000000..dbf37b9
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_settings.png differ
diff --git a/app/src/main/res/drawable-hdpi/usuario.png b/app/src/main/res/drawable-hdpi/usuario.png
new file mode 100644
index 0000000..accadba
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/usuario.png differ
diff --git a/app/src/main/res/drawable-mdpi/contrasena.png b/app/src/main/res/drawable-mdpi/contrasena.png
new file mode 100644
index 0000000..c8df58b
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/contrasena.png differ
diff --git a/app/src/main/res/drawable-mdpi/email.png b/app/src/main/res/drawable-mdpi/email.png
new file mode 100644
index 0000000..6dcdf2c
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/email.png differ
diff --git a/app/src/main/res/drawable-mdpi/fecha.png b/app/src/main/res/drawable-mdpi/fecha.png
new file mode 100644
index 0000000..fccb6f9
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/fecha.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_account.png b/app/src/main/res/drawable-mdpi/ic_account.png
new file mode 100644
index 0000000..55ec401
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_account.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_add.png b/app/src/main/res/drawable-mdpi/ic_add.png
new file mode 100644
index 0000000..9d8a94e
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_add.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_add_location.png b/app/src/main/res/drawable-mdpi/ic_add_location.png
new file mode 100644
index 0000000..0591b93
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_add_location.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_ahorros.png b/app/src/main/res/drawable-mdpi/ic_ahorros.png
new file mode 100644
index 0000000..13faabe
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_ahorros.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_close.png b/app/src/main/res/drawable-mdpi/ic_close.png
new file mode 100644
index 0000000..dbc768c
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_close.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_gastos.png b/app/src/main/res/drawable-mdpi/ic_gastos.png
new file mode 100644
index 0000000..e49bc71
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_gastos.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_home.png b/app/src/main/res/drawable-mdpi/ic_home.png
new file mode 100644
index 0000000..0bd4ff9
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_home.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_money.png b/app/src/main/res/drawable-mdpi/ic_money.png
new file mode 100644
index 0000000..180ba7a
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_money.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_more.png b/app/src/main/res/drawable-mdpi/ic_more.png
new file mode 100644
index 0000000..1da2e97
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_more.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_notifications.png b/app/src/main/res/drawable-mdpi/ic_notifications.png
new file mode 100644
index 0000000..1c93def
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_notifications.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_people.png b/app/src/main/res/drawable-mdpi/ic_people.png
new file mode 100644
index 0000000..fdf9d0e
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_people.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_plus_green.png b/app/src/main/res/drawable-mdpi/ic_plus_green.png
new file mode 100644
index 0000000..261c416
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_plus_green.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_public.png b/app/src/main/res/drawable-mdpi/ic_public.png
new file mode 100644
index 0000000..420b91f
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_public.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_settings.png b/app/src/main/res/drawable-mdpi/ic_settings.png
new file mode 100644
index 0000000..85e2797
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_settings.png differ
diff --git a/app/src/main/res/drawable-mdpi/usuario.png b/app/src/main/res/drawable-mdpi/usuario.png
new file mode 100644
index 0000000..8463a57
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/usuario.png differ
diff --git a/app/src/main/res/drawable-xhdpi/contrasena.png b/app/src/main/res/drawable-xhdpi/contrasena.png
new file mode 100644
index 0000000..5843706
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/contrasena.png differ
diff --git a/app/src/main/res/drawable-xhdpi/email.png b/app/src/main/res/drawable-xhdpi/email.png
new file mode 100644
index 0000000..3dbce6f
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/email.png differ
diff --git a/app/src/main/res/drawable-xhdpi/fecha.png b/app/src/main/res/drawable-xhdpi/fecha.png
new file mode 100644
index 0000000..29e30d7
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/fecha.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_account.png b/app/src/main/res/drawable-xhdpi/ic_account.png
new file mode 100644
index 0000000..2b3c219
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_account.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_add.png b/app/src/main/res/drawable-xhdpi/ic_add.png
new file mode 100644
index 0000000..6d8e55d
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_add.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_add_location.png b/app/src/main/res/drawable-xhdpi/ic_add_location.png
new file mode 100644
index 0000000..5c3eae8
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_add_location.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_ahorros.png b/app/src/main/res/drawable-xhdpi/ic_ahorros.png
new file mode 100644
index 0000000..469bfbc
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_ahorros.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_close.png b/app/src/main/res/drawable-xhdpi/ic_close.png
new file mode 100644
index 0000000..54dd7f8
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_close.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_gastos.png b/app/src/main/res/drawable-xhdpi/ic_gastos.png
new file mode 100644
index 0000000..f77c4c2
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_gastos.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_home.png b/app/src/main/res/drawable-xhdpi/ic_home.png
new file mode 100644
index 0000000..98421ec
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_home.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_money.png b/app/src/main/res/drawable-xhdpi/ic_money.png
new file mode 100644
index 0000000..7efb0f7
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_money.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_more.png b/app/src/main/res/drawable-xhdpi/ic_more.png
new file mode 100644
index 0000000..36e665f
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_more.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_notifications.png b/app/src/main/res/drawable-xhdpi/ic_notifications.png
new file mode 100644
index 0000000..0cb1f71
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_notifications.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_people.png b/app/src/main/res/drawable-xhdpi/ic_people.png
new file mode 100644
index 0000000..de45ada
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_people.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_plus_green.png b/app/src/main/res/drawable-xhdpi/ic_plus_green.png
new file mode 100644
index 0000000..158a661
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_plus_green.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_public.png b/app/src/main/res/drawable-xhdpi/ic_public.png
new file mode 100644
index 0000000..126e28d
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_public.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_settings.png b/app/src/main/res/drawable-xhdpi/ic_settings.png
new file mode 100644
index 0000000..df3daa6
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_settings.png differ
diff --git a/app/src/main/res/drawable-xhdpi/usuario.png b/app/src/main/res/drawable-xhdpi/usuario.png
new file mode 100644
index 0000000..8e26137
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/usuario.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/contrasena.png b/app/src/main/res/drawable-xxhdpi/contrasena.png
new file mode 100644
index 0000000..b12436e
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/contrasena.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/email.png b/app/src/main/res/drawable-xxhdpi/email.png
new file mode 100644
index 0000000..7fbf359
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/email.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/fecha.png b/app/src/main/res/drawable-xxhdpi/fecha.png
new file mode 100644
index 0000000..01191c7
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/fecha.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_account.png b/app/src/main/res/drawable-xxhdpi/ic_account.png
new file mode 100644
index 0000000..c0f9f14
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_account.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_add.png b/app/src/main/res/drawable-xxhdpi/ic_add.png
new file mode 100644
index 0000000..3a15191
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_add.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_add_location.png b/app/src/main/res/drawable-xxhdpi/ic_add_location.png
new file mode 100644
index 0000000..dffe7c0
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_add_location.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_ahorros.png b/app/src/main/res/drawable-xxhdpi/ic_ahorros.png
new file mode 100644
index 0000000..bf53bb4
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_ahorros.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_close.png b/app/src/main/res/drawable-xxhdpi/ic_close.png
new file mode 100644
index 0000000..595e007
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_close.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_gastos.png b/app/src/main/res/drawable-xxhdpi/ic_gastos.png
new file mode 100644
index 0000000..a80c27b
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_gastos.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_home.png b/app/src/main/res/drawable-xxhdpi/ic_home.png
new file mode 100644
index 0000000..a160d36
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_home.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_money.png b/app/src/main/res/drawable-xxhdpi/ic_money.png
new file mode 100644
index 0000000..45d1804
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_money.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_more.png b/app/src/main/res/drawable-xxhdpi/ic_more.png
new file mode 100644
index 0000000..d946998
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_more.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_notifications.png b/app/src/main/res/drawable-xxhdpi/ic_notifications.png
new file mode 100644
index 0000000..b0f808a
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_notifications.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_people.png b/app/src/main/res/drawable-xxhdpi/ic_people.png
new file mode 100644
index 0000000..ba45085
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_people.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_plus_green.png b/app/src/main/res/drawable-xxhdpi/ic_plus_green.png
new file mode 100644
index 0000000..5cd2634
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_plus_green.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_public.png b/app/src/main/res/drawable-xxhdpi/ic_public.png
new file mode 100644
index 0000000..4f5a714
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_public.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_settings.png b/app/src/main/res/drawable-xxhdpi/ic_settings.png
new file mode 100644
index 0000000..7645518
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_settings.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/usuario.png b/app/src/main/res/drawable-xxhdpi/usuario.png
new file mode 100644
index 0000000..a1e84b7
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/usuario.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/contrasena.png b/app/src/main/res/drawable-xxxhdpi/contrasena.png
new file mode 100644
index 0000000..c2016b6
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/contrasena.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/email.png b/app/src/main/res/drawable-xxxhdpi/email.png
new file mode 100644
index 0000000..c6888da
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/email.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/fecha.png b/app/src/main/res/drawable-xxxhdpi/fecha.png
new file mode 100644
index 0000000..785dc1b
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/fecha.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_account.png b/app/src/main/res/drawable-xxxhdpi/ic_account.png
new file mode 100644
index 0000000..a73cb98
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_account.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_add.png b/app/src/main/res/drawable-xxxhdpi/ic_add.png
new file mode 100644
index 0000000..078af52
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_add.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_add_location.png b/app/src/main/res/drawable-xxxhdpi/ic_add_location.png
new file mode 100644
index 0000000..ef82054
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_add_location.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_ahorros.png b/app/src/main/res/drawable-xxxhdpi/ic_ahorros.png
new file mode 100644
index 0000000..20ac16e
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_ahorros.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_close.png b/app/src/main/res/drawable-xxxhdpi/ic_close.png
new file mode 100644
index 0000000..e22f103
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_close.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_gastos.png b/app/src/main/res/drawable-xxxhdpi/ic_gastos.png
new file mode 100644
index 0000000..0ba39c5
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_gastos.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_home.png b/app/src/main/res/drawable-xxxhdpi/ic_home.png
new file mode 100644
index 0000000..5df09b5
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_home.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_money.png b/app/src/main/res/drawable-xxxhdpi/ic_money.png
new file mode 100644
index 0000000..838e4a6
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_money.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_more.png b/app/src/main/res/drawable-xxxhdpi/ic_more.png
new file mode 100644
index 0000000..2188b19
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_more.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_notifications.png b/app/src/main/res/drawable-xxxhdpi/ic_notifications.png
new file mode 100644
index 0000000..a004667
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_notifications.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_people.png b/app/src/main/res/drawable-xxxhdpi/ic_people.png
new file mode 100644
index 0000000..65fb747
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_people.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_public.png b/app/src/main/res/drawable-xxxhdpi/ic_public.png
new file mode 100644
index 0000000..1c81445
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_public.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_settings.png b/app/src/main/res/drawable-xxxhdpi/ic_settings.png
new file mode 100644
index 0000000..fa771cd
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_settings.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/usuario.png b/app/src/main/res/drawable-xxxhdpi/usuario.png
new file mode 100644
index 0000000..454b10e
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/usuario.png differ
diff --git a/app/src/main/res/drawable/ariel.PNG b/app/src/main/res/drawable/ariel.PNG
new file mode 100644
index 0000000..7f93cc1
Binary files /dev/null and b/app/src/main/res/drawable/ariel.PNG differ
diff --git a/app/src/main/res/drawable/background_label_fab.xml b/app/src/main/res/drawable/background_label_fab.xml
new file mode 100644
index 0000000..182ca71
--- /dev/null
+++ b/app/src/main/res/drawable/background_label_fab.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/border_green.xml b/app/src/main/res/drawable/border_green.xml
new file mode 100644
index 0000000..51d68c2
--- /dev/null
+++ b/app/src/main/res/drawable/border_green.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/button_border.xml b/app/src/main/res/drawable/button_border.xml
new file mode 100644
index 0000000..99107a5
--- /dev/null
+++ b/app/src/main/res/drawable/button_border.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/cifuentes.jpg b/app/src/main/res/drawable/cifuentes.jpg
new file mode 100644
index 0000000..abe52e0
Binary files /dev/null and b/app/src/main/res/drawable/cifuentes.jpg differ
diff --git a/app/src/main/res/drawable/gradient.xml b/app/src/main/res/drawable/gradient.xml
new file mode 100644
index 0000000..3f7c85f
--- /dev/null
+++ b/app/src/main/res/drawable/gradient.xml
@@ -0,0 +1,12 @@
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/head.jpg b/app/src/main/res/drawable/head.jpg
new file mode 100644
index 0000000..6a79b24
Binary files /dev/null and b/app/src/main/res/drawable/head.jpg differ
diff --git a/app/src/main/res/drawable/ic_info_black_24dp.xml b/app/src/main/res/drawable/ic_info_black_24dp.xml
new file mode 100644
index 0000000..34b8202
--- /dev/null
+++ b/app/src/main/res/drawable/ic_info_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_notifications_black_24dp.xml b/app/src/main/res/drawable/ic_notifications_black_24dp.xml
new file mode 100644
index 0000000..e3400cf
--- /dev/null
+++ b/app/src/main/res/drawable/ic_notifications_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_sync_black_24dp.xml b/app/src/main/res/drawable/ic_sync_black_24dp.xml
new file mode 100644
index 0000000..5a283aa
--- /dev/null
+++ b/app/src/main/res/drawable/ic_sync_black_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/icon_wallet.png b/app/src/main/res/drawable/icon_wallet.png
new file mode 100644
index 0000000..3acf9e8
Binary files /dev/null and b/app/src/main/res/drawable/icon_wallet.png differ
diff --git a/app/src/main/res/drawable/kenneth.PNG b/app/src/main/res/drawable/kenneth.PNG
new file mode 100644
index 0000000..557a194
Binary files /dev/null and b/app/src/main/res/drawable/kenneth.PNG differ
diff --git a/app/src/main/res/drawable/profile.png b/app/src/main/res/drawable/profile.png
new file mode 100644
index 0000000..f84cada
Binary files /dev/null and b/app/src/main/res/drawable/profile.png differ
diff --git a/app/src/main/res/drawable/side_nav_bar.xml b/app/src/main/res/drawable/side_nav_bar.xml
new file mode 100644
index 0000000..458b4b0
--- /dev/null
+++ b/app/src/main/res/drawable/side_nav_bar.xml
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/splash.png b/app/src/main/res/drawable/splash.png
new file mode 100644
index 0000000..2fa6a8a
Binary files /dev/null and b/app/src/main/res/drawable/splash.png differ
diff --git a/app/src/main/res/drawable/tono.jpg b/app/src/main/res/drawable/tono.jpg
new file mode 100644
index 0000000..709bba2
Binary files /dev/null and b/app/src/main/res/drawable/tono.jpg differ
diff --git a/app/src/main/res/layout-v21/app_bar_dash_board.xml b/app/src/main/res/layout-v21/app_bar_dash_board.xml
new file mode 100644
index 0000000..668b55c
--- /dev/null
+++ b/app/src/main/res/layout-v21/app_bar_dash_board.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-w900dp/item_list.xml b/app/src/main/res/layout-w900dp/item_list.xml
new file mode 100644
index 0000000..dd5ac83
--- /dev/null
+++ b/app/src/main/res/layout-w900dp/item_list.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_dash_board.xml b/app/src/main/res/layout/activity_dash_board.xml
new file mode 100644
index 0000000..47d740c
--- /dev/null
+++ b/app/src/main/res/layout/activity_dash_board.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_detalle.xml b/app/src/main/res/layout/activity_detalle.xml
new file mode 100644
index 0000000..64081f6
--- /dev/null
+++ b/app/src/main/res/layout/activity_detalle.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
new file mode 100644
index 0000000..6aa4938
--- /dev/null
+++ b/app/src/main/res/layout/activity_login.xml
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 81fb69e..0000000
--- a/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
diff --git a/app/src/main/res/layout/activity_maps.xml b/app/src/main/res/layout/activity_maps.xml
new file mode 100644
index 0000000..3348255
--- /dev/null
+++ b/app/src/main/res/layout/activity_maps.xml
@@ -0,0 +1,8 @@
+
diff --git a/app/src/main/res/layout/activity_notifications.xml b/app/src/main/res/layout/activity_notifications.xml
new file mode 100644
index 0000000..89ac54c
--- /dev/null
+++ b/app/src/main/res/layout/activity_notifications.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_profile.xml b/app/src/main/res/layout/activity_profile.xml
new file mode 100644
index 0000000..6ebd40a
--- /dev/null
+++ b/app/src/main/res/layout/activity_profile.xml
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_sign_up.xml b/app/src/main/res/layout/activity_sign_up.xml
new file mode 100644
index 0000000..c7d6dc0
--- /dev/null
+++ b/app/src/main/res/layout/activity_sign_up.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/app_bar_dash_board.xml b/app/src/main/res/layout/app_bar_dash_board.xml
new file mode 100644
index 0000000..668b55c
--- /dev/null
+++ b/app/src/main/res/layout/app_bar_dash_board.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/content_dash_board.xml b/app/src/main/res/layout/content_dash_board.xml
new file mode 100644
index 0000000..0097a1e
--- /dev/null
+++ b/app/src/main/res/layout/content_dash_board.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/content_list_article.xml b/app/src/main/res/layout/content_list_article.xml
new file mode 100644
index 0000000..c832da7
--- /dev/null
+++ b/app/src/main/res/layout/content_list_article.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/content_list_config.xml b/app/src/main/res/layout/content_list_config.xml
new file mode 100644
index 0000000..31704ef
--- /dev/null
+++ b/app/src/main/res/layout/content_list_config.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/content_list_video.xml b/app/src/main/res/layout/content_list_video.xml
new file mode 100644
index 0000000..c3c08a3
--- /dev/null
+++ b/app/src/main/res/layout/content_list_video.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/content_test.xml b/app/src/main/res/layout/content_test.xml
new file mode 100644
index 0000000..c72c1f6
--- /dev/null
+++ b/app/src/main/res/layout/content_test.xml
@@ -0,0 +1,11 @@
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_ahorros.xml b/app/src/main/res/layout/fragment_ahorros.xml
new file mode 100644
index 0000000..e46234a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_ahorros.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_config.xml b/app/src/main/res/layout/fragment_config.xml
new file mode 100644
index 0000000..2d43221
--- /dev/null
+++ b/app/src/main/res/layout/fragment_config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_desarrolladores.xml b/app/src/main/res/layout/fragment_desarrolladores.xml
new file mode 100644
index 0000000..881bb2d
--- /dev/null
+++ b/app/src/main/res/layout/fragment_desarrolladores.xml
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_gastos.xml b/app/src/main/res/layout/fragment_gastos.xml
new file mode 100644
index 0000000..328c852
--- /dev/null
+++ b/app/src/main/res/layout/fragment_gastos.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_general.xml b/app/src/main/res/layout/fragment_general.xml
new file mode 100644
index 0000000..fb05356
--- /dev/null
+++ b/app/src/main/res/layout/fragment_general.xml
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_historial_gastos.xml b/app/src/main/res/layout/fragment_historial_gastos.xml
new file mode 100644
index 0000000..825a98e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_historial_gastos.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml
new file mode 100644
index 0000000..58a7df7
--- /dev/null
+++ b/app/src/main/res/layout/fragment_home.xml
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_ingresos.xml b/app/src/main/res/layout/fragment_ingresos.xml
new file mode 100644
index 0000000..15fb0fb
--- /dev/null
+++ b/app/src/main/res/layout/fragment_ingresos.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_mas.xml b/app/src/main/res/layout/fragment_mas.xml
new file mode 100644
index 0000000..091d661
--- /dev/null
+++ b/app/src/main/res/layout/fragment_mas.xml
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_noticias.xml b/app/src/main/res/layout/fragment_noticias.xml
new file mode 100644
index 0000000..83d7934
--- /dev/null
+++ b/app/src/main/res/layout/fragment_noticias.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_tips.xml b/app/src/main/res/layout/fragment_tips.xml
new file mode 100644
index 0000000..34ae062
--- /dev/null
+++ b/app/src/main/res/layout/fragment_tips.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_list.xml b/app/src/main/res/layout/item_list.xml
new file mode 100644
index 0000000..d7abeb9
--- /dev/null
+++ b/app/src/main/res/layout/item_list.xml
@@ -0,0 +1,13 @@
+
+
diff --git a/app/src/main/res/layout/nav_header_dash_board.xml b/app/src/main/res/layout/nav_header_dash_board.xml
new file mode 100644
index 0000000..33bf23c
--- /dev/null
+++ b/app/src/main/res/layout/nav_header_dash_board.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/splash.xml b/app/src/main/res/layout/splash.xml
new file mode 100644
index 0000000..c34b09b
--- /dev/null
+++ b/app/src/main/res/layout/splash.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/activity_dash_board_drawer.xml b/app/src/main/res/menu/activity_dash_board_drawer.xml
new file mode 100644
index 0000000..47a1f09
--- /dev/null
+++ b/app/src/main/res/menu/activity_dash_board_drawer.xml
@@ -0,0 +1,53 @@
+
+
diff --git a/app/src/main/res/menu/dash_board.xml b/app/src/main/res/menu/dash_board.xml
new file mode 100644
index 0000000..4a2cde1
--- /dev/null
+++ b/app/src/main/res/menu/dash_board.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
index cde69bc..f8642b1 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
index c133a0c..d51d7d8 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index bfa42f0..87a1e6b 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 324e72c..1e6a4d1 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index aee44e1..bd4348b 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 0000000..dbbdd40
--- /dev/null
+++ b/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
new file mode 100644
index 0000000..7ce840e
--- /dev/null
+++ b/app/src/main/res/values/attrs.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 3ab3e9c..fb35217 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,6 +1,16 @@
- #3F51B5
- #303F9F
- #FF4081
+ #00acc1
+ #196873
+ #1b1b1b
+ #B2000000
+ #000000
+ #000000
+
+
+
+#66000000
+ #00ffffff
+ #ffffff
+ #28B11B
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 47c8224..b3d7367 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -2,4 +2,14 @@
16dp
16dp
+
+ 16dp
+ 160dp
+ 16dp
+ 200dp
+ 200dp
+ 16dp
+ 4dp
+ 6dp
+ 100dp
diff --git a/app/src/main/res/values/drawables.xml b/app/src/main/res/values/drawables.xml
new file mode 100644
index 0000000..52c6a6c
--- /dev/null
+++ b/app/src/main/res/values/drawables.xml
@@ -0,0 +1,8 @@
+
+ - @android:drawable/ic_menu_camera
+ - @android:drawable/ic_menu_gallery
+ - @android:drawable/ic_menu_slideshow
+ - @android:drawable/ic_menu_manage
+ - @android:drawable/ic_menu_share
+ - @android:drawable/ic_menu_send
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4a73d40..fd38a91 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,3 +1,36 @@
SmartBudget
+
+
+
+ Correo
+ Contraseña
+ Registrarse
+ Registrarse
+ Este correo es invalido
+ Esta contraseña es invalida
+ Esta contraseña es demasiado corta
+ Este campo es requerido
+ "Es necesario tener permiso para leer los contactos"
+
+ Inicio
+
+ Open navigation drawer
+ Close navigation drawer
+
+ Ajustes
+ Registrarse
+
+
+ Hello blank fragment
+
+ DetalleActivity
+ Dummy Button
+ DUMMY\nCONTENT
+ Map
+ Items
+ Item Detail
+ Lista de cuentas
+ Saldo
+ Tabla de equilibrio
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 5885930..797db69 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -8,4 +8,30 @@
- @color/colorAccent
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/release/res/values/google_maps_api.xml b/app/src/release/res/values/google_maps_api.xml
new file mode 100644
index 0000000..fa88c61
--- /dev/null
+++ b/app/src/release/res/values/google_maps_api.xml
@@ -0,0 +1,22 @@
+
+
+
+ YOUR_KEY_HERE
+
+
diff --git a/build.gradle b/build.gradle
index 74b2ab0..afa7e3a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,9 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.3'
+ classpath 'com.android.tools.build:gradle:2.3.2'
+ classpath 'com.google.gms:google-services:3.0.0'
+
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 04e285f..81f92f3 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Mon Dec 28 10:00:20 PST 2015
+#Wed Apr 26 21:05:37 CST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip