Compare commits
9 Commits
7aa8b79009
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 89a453b1f1 | |||
| d3288c3529 | |||
| b8cf93a7cb | |||
| 711bbf5ae8 | |||
| f6e7372b79 | |||
| a0aa0303c9 | |||
| 502ba7e5f3 | |||
| 661bbaab46 | |||
| 089cb14998 |
1
.idea/misc.xml
generated
@@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ dependencies {
|
|||||||
implementation(libs.googleid)
|
implementation(libs.googleid)
|
||||||
implementation(libs.firebase.database)
|
implementation(libs.firebase.database)
|
||||||
implementation(libs.recyclerview)
|
implementation(libs.recyclerview)
|
||||||
implementation(libs.play.services.auth)
|
implementation(libs.cardview)
|
||||||
testImplementation(libs.junit)
|
testImplementation(libs.junit)
|
||||||
androidTestImplementation(libs.ext.junit)
|
androidTestImplementation(libs.ext.junit)
|
||||||
androidTestImplementation(libs.espresso.core)
|
androidTestImplementation(libs.espresso.core)
|
||||||
|
|||||||
@@ -12,7 +12,20 @@
|
|||||||
"package_name": "com.example.lifegrid"
|
"package_name": "com.example.lifegrid"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"oauth_client": [],
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "1019731295596-i3q6aprqj6s55g6s97tpopbk4foutold.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.example.lifegrid",
|
||||||
|
"certificate_hash": "d0d27537414e1e5c5f0dd3bf224dbf819e70668b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "1019731295596-llnufhs1t24ijo7afa5c85lkc98pk27q.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
"api_key": [
|
"api_key": [
|
||||||
{
|
{
|
||||||
"current_key": "AIzaSyAbQ_-mob81SR07481CSJHP_z3GniS-xdk"
|
"current_key": "AIzaSyAbQ_-mob81SR07481CSJHP_z3GniS-xdk"
|
||||||
@@ -20,7 +33,12 @@
|
|||||||
],
|
],
|
||||||
"services": {
|
"services": {
|
||||||
"appinvite_service": {
|
"appinvite_service": {
|
||||||
"other_platform_oauth_client": []
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "1019731295596-llnufhs1t24ijo7afa5c85lkc98pk27q.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,19 +11,22 @@ import android.widget.ProgressBar;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.activity.EdgeToEdge;
|
import androidx.activity.EdgeToEdge;
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.graphics.Insets;
|
import androidx.core.graphics.Insets;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignIn;
|
import androidx.credentials.Credential;
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
import androidx.credentials.CustomCredential;
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
|
import androidx.credentials.GetCredentialRequest;
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
|
import androidx.credentials.GetCredentialResponse;
|
||||||
import com.google.android.gms.common.api.ApiException;
|
import androidx.credentials.exceptions.GetCredentialException;
|
||||||
import com.google.android.gms.tasks.Task;
|
import androidx.credentials.exceptions.NoCredentialException;
|
||||||
|
import androidx.credentials.CredentialManager;
|
||||||
|
|
||||||
|
import com.google.android.libraries.identity.googleid.GetGoogleIdOption;
|
||||||
|
import com.google.android.libraries.identity.googleid.GoogleIdTokenCredential;
|
||||||
|
import com.google.android.libraries.identity.googleid.GoogleIdTokenParsingException;
|
||||||
import com.google.firebase.FirebaseApp;
|
import com.google.firebase.FirebaseApp;
|
||||||
import com.google.firebase.auth.AuthCredential;
|
import com.google.firebase.auth.AuthCredential;
|
||||||
import com.google.firebase.auth.FirebaseAuth;
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
@@ -40,7 +43,7 @@ public class CriarContaActivity extends AppCompatActivity {
|
|||||||
private Button googleButton2;
|
private Button googleButton2;
|
||||||
private ProgressBar loadingProgressBar;
|
private ProgressBar loadingProgressBar;
|
||||||
private FirebaseAuth firebaseAuth;
|
private FirebaseAuth firebaseAuth;
|
||||||
private GoogleSignInClient googleSignInClient;
|
private CredentialManager credentialManager;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -63,16 +66,9 @@ public class CriarContaActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
FirebaseApp.initializeApp(this);
|
FirebaseApp.initializeApp(this);
|
||||||
firebaseAuth = FirebaseAuth.getInstance();
|
firebaseAuth = FirebaseAuth.getInstance();
|
||||||
|
credentialManager = CredentialManager.create(this);
|
||||||
// Configurar Google Sign-In
|
|
||||||
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
|
|
||||||
.requestIdToken(getString(R.string.default_web_client_id))
|
|
||||||
.requestEmail()
|
|
||||||
.build();
|
|
||||||
googleSignInClient = GoogleSignIn.getClient(this, gso);
|
|
||||||
|
|
||||||
loginButton2.setOnClickListener(v -> criarConta());
|
loginButton2.setOnClickListener(v -> criarConta());
|
||||||
googleButton2.setOnClickListener(v -> signInWithGoogle());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void criarConta() {
|
private void criarConta() {
|
||||||
@@ -179,30 +175,7 @@ public class CriarContaActivity extends AppCompatActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void signInWithGoogle() {
|
|
||||||
Intent signInIntent = googleSignInClient.getSignInIntent();
|
|
||||||
googleSignInLauncher.launch(signInIntent);
|
|
||||||
}
|
|
||||||
|
|
||||||
private final ActivityResultLauncher<Intent> googleSignInLauncher = registerForActivityResult(
|
|
||||||
new ActivityResultContracts.StartActivityForResult(),
|
|
||||||
result -> {
|
|
||||||
if (result.getResultCode() == RESULT_OK) {
|
|
||||||
Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(result.getData());
|
|
||||||
try {
|
|
||||||
GoogleSignInAccount account = task.getResult(ApiException.class);
|
|
||||||
firebaseAuthWithGoogle(account.getIdToken());
|
|
||||||
} catch (ApiException e) {
|
|
||||||
Toast.makeText(this, "Erro ao criar conta com Google: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Toast.makeText(this, "Criação de conta com Google cancelada.", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
private void firebaseAuthWithGoogle(String idToken) {
|
private void firebaseAuthWithGoogle(String idToken) {
|
||||||
toggleLoading(true);
|
|
||||||
AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null);
|
AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null);
|
||||||
firebaseAuth.signInWithCredential(credential)
|
firebaseAuth.signInWithCredential(credential)
|
||||||
.addOnCompleteListener(this, task -> {
|
.addOnCompleteListener(this, task -> {
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ package com.example.lifegrid;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.CancellationSignal;
|
||||||
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.util.Log;
|
||||||
import android.util.Patterns;
|
import android.util.Patterns;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@@ -12,25 +16,35 @@ import android.widget.TextView;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.activity.EdgeToEdge;
|
import androidx.activity.EdgeToEdge;
|
||||||
import androidx.activity.result.ActivityResultLauncher;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.activity.result.contract.ActivityResultContracts;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.graphics.Insets;
|
import androidx.core.graphics.Insets;
|
||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignIn;
|
import androidx.credentials.ClearCredentialStateRequest;
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
import androidx.credentials.CredentialManager;
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignInClient;
|
|
||||||
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
|
import androidx.credentials.Credential;
|
||||||
import com.google.android.gms.common.api.ApiException;
|
import androidx.credentials.CredentialManagerCallback;
|
||||||
import com.google.android.gms.tasks.Task;
|
import androidx.credentials.CustomCredential;
|
||||||
|
import androidx.credentials.GetCredentialRequest;
|
||||||
|
import androidx.credentials.GetCredentialResponse;
|
||||||
|
import androidx.credentials.exceptions.ClearCredentialException;
|
||||||
|
import androidx.credentials.exceptions.GetCredentialException;
|
||||||
|
import androidx.credentials.exceptions.NoCredentialException;
|
||||||
|
|
||||||
|
import com.google.android.libraries.identity.googleid.GetGoogleIdOption;
|
||||||
|
import com.google.android.libraries.identity.googleid.GoogleIdTokenCredential;
|
||||||
|
import com.google.android.libraries.identity.googleid.GoogleIdTokenParsingException;
|
||||||
import com.google.firebase.FirebaseApp;
|
import com.google.firebase.FirebaseApp;
|
||||||
import com.google.firebase.auth.AuthCredential;
|
import com.google.firebase.auth.AuthCredential;
|
||||||
import com.google.firebase.auth.FirebaseAuth;
|
import com.google.firebase.auth.FirebaseAuth;
|
||||||
import com.google.firebase.auth.FirebaseUser;
|
import com.google.firebase.auth.FirebaseUser;
|
||||||
import com.google.firebase.auth.GoogleAuthProvider;
|
import com.google.firebase.auth.GoogleAuthProvider;
|
||||||
|
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
public class LoginActivity extends AppCompatActivity {
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private TextView textView5;
|
private TextView textView5;
|
||||||
@@ -46,8 +60,12 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
private TextView ouTextView;
|
private TextView ouTextView;
|
||||||
private ProgressBar loadingProgressBar;
|
private ProgressBar loadingProgressBar;
|
||||||
private FirebaseAuth firebaseAuth;
|
private FirebaseAuth firebaseAuth;
|
||||||
private GoogleSignInClient googleSignInClient;
|
private CredentialManager credentialManager;
|
||||||
private static final int RC_SIGN_IN = 9001;
|
private FirebaseAuth mAuth;
|
||||||
|
|
||||||
|
private static final String TAG = "LoginActivity - Google Sign In";
|
||||||
|
private static final String GOOGLE_ID_TOKEN_CREDENTIAL = "1019731295596-i3q6aprqj6s55g6s97tpopbk4foutold.apps.googleusercontent.com";
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -73,16 +91,13 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
loadingProgressBar = findViewById(R.id.loadingProgressBar);
|
loadingProgressBar = findViewById(R.id.loadingProgressBar);
|
||||||
|
|
||||||
FirebaseApp.initializeApp(this);
|
FirebaseApp.initializeApp(this);
|
||||||
firebaseAuth = FirebaseAuth.getInstance();
|
mAuth = FirebaseAuth.getInstance();
|
||||||
|
credentialManager = CredentialManager.create(getBaseContext());
|
||||||
|
|
||||||
// Configurar Google Sign-In
|
|
||||||
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
|
|
||||||
.requestIdToken(getString(R.string.default_web_client_id))
|
|
||||||
.requestEmail()
|
|
||||||
.build();
|
|
||||||
googleSignInClient = GoogleSignIn.getClient(this, gso);
|
|
||||||
|
|
||||||
loginButton.setOnClickListener(v -> validarLogin());
|
loginButton.setOnClickListener(v -> validarLogin());
|
||||||
|
googleButton.setOnClickListener(v -> launchCredentialManager());
|
||||||
|
|
||||||
criarContaTextView.setOnClickListener(new View.OnClickListener() {
|
criarContaTextView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
@@ -90,21 +105,49 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Inicialmente desabilitar o TextView de recuperar senha
|
||||||
|
passesquecerTextView.setEnabled(false);
|
||||||
|
passesquecerTextView.setAlpha(0.5f); // Visualmente mais claro quando desabilitado
|
||||||
|
|
||||||
passesquecerTextView.setOnClickListener(new View.OnClickListener() {
|
passesquecerTextView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
String email = emailEditText.getText().toString().trim();
|
String email = emailEditText.getText().toString().trim();
|
||||||
Intent intent = new Intent(LoginActivity.this, RecupearPasswordActivity.class);
|
|
||||||
// Passar o email digitado no login para a atividade de recuperação
|
// Validar se há email antes de abrir a atividade de recuperação
|
||||||
if (!TextUtils.isEmpty(email)) {
|
if (TextUtils.isEmpty(email)) {
|
||||||
intent.putExtra("email", email);
|
emailEditText.setError("Por favor, digite seu email primeiro.");
|
||||||
|
emailEditText.requestFocus();
|
||||||
|
Toast.makeText(LoginActivity.this, "Digite seu email para recuperar a senha.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Intent intent = new Intent(LoginActivity.this, RecupearPasswordActivity.class);
|
||||||
|
intent.putExtra("email", email);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
googleButton.setOnClickListener(v -> signInWithGoogle());
|
|
||||||
|
// Adicionar TextWatcher para habilitar/desabilitar o TextView dinamicamente
|
||||||
|
emailEditText.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||||
|
String email = s.toString().trim();
|
||||||
|
boolean hasEmail = !TextUtils.isEmpty(email);
|
||||||
|
passesquecerTextView.setEnabled(hasEmail);
|
||||||
|
passesquecerTextView.setAlpha(hasEmail ? 1.0f : 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable s) {}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void validarLogin() {
|
private void validarLogin() {
|
||||||
String email = emailEditText.getText().toString().trim();
|
String email = emailEditText.getText().toString().trim();
|
||||||
String password = passwordEditText.getText().toString();
|
String password = passwordEditText.getText().toString();
|
||||||
@@ -190,30 +233,8 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void signInWithGoogle() {
|
|
||||||
Intent signInIntent = googleSignInClient.getSignInIntent();
|
|
||||||
googleSignInLauncher.launch(signInIntent);
|
|
||||||
}
|
|
||||||
|
|
||||||
private final ActivityResultLauncher<Intent> googleSignInLauncher = registerForActivityResult(
|
|
||||||
new ActivityResultContracts.StartActivityForResult(),
|
|
||||||
result -> {
|
|
||||||
if (result.getResultCode() == RESULT_OK) {
|
|
||||||
Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(result.getData());
|
|
||||||
try {
|
|
||||||
GoogleSignInAccount account = task.getResult(ApiException.class);
|
|
||||||
firebaseAuthWithGoogle(account.getIdToken());
|
|
||||||
} catch (ApiException e) {
|
|
||||||
Toast.makeText(this, "Erro ao fazer login com Google: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Toast.makeText(this, "Login com Google cancelado.", Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
private void firebaseAuthWithGoogle(String idToken) {
|
private void firebaseAuthWithGoogle(String idToken) {
|
||||||
toggleLoading(true);
|
|
||||||
AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null);
|
AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null);
|
||||||
firebaseAuth.signInWithCredential(credential)
|
firebaseAuth.signInWithCredential(credential)
|
||||||
.addOnCompleteListener(this, task -> {
|
.addOnCompleteListener(this, task -> {
|
||||||
@@ -245,4 +266,84 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
criarContaTextView.setEnabled(!show);
|
criarContaTextView.setEnabled(!show);
|
||||||
passesquecerTextView.setEnabled(!show);
|
passesquecerTextView.setEnabled(!show);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void launchCredentialManager() {
|
||||||
|
// [START create_credential_manager_request]
|
||||||
|
// Instantiate a Google sign-in request
|
||||||
|
GetGoogleIdOption googleIdOption = new GetGoogleIdOption.Builder()
|
||||||
|
.setFilterByAuthorizedAccounts(true)
|
||||||
|
.setServerClientId(getString(R.string.default_web_client_id))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// Create the Credential Manager request
|
||||||
|
GetCredentialRequest request = new GetCredentialRequest.Builder()
|
||||||
|
.addCredentialOption(googleIdOption)
|
||||||
|
.build();
|
||||||
|
// [END create_credential_manager_request]
|
||||||
|
|
||||||
|
// Launch Credential Manager UI
|
||||||
|
credentialManager.getCredentialAsync(
|
||||||
|
getBaseContext(),
|
||||||
|
request,
|
||||||
|
new CancellationSignal(),
|
||||||
|
Executors.newSingleThreadExecutor(),
|
||||||
|
new CredentialManagerCallback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResult(GetCredentialResponse result) {
|
||||||
|
// Extract credential from the result returned by Credential Manager
|
||||||
|
handleSignIn(result.getCredential());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(GetCredentialException e) {
|
||||||
|
Log.e(TAG, "Couldn't retrieve user's credentials: " + e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleSignIn(Credential credential) {
|
||||||
|
// Check if credential is of type Google ID
|
||||||
|
if (credential instanceof CustomCredential customCredential
|
||||||
|
&& credential.getType().equals(GOOGLE_ID_TOKEN_CREDENTIAL)) {
|
||||||
|
// Create Google ID Token
|
||||||
|
Bundle credentialData = customCredential.getData();
|
||||||
|
GoogleIdTokenCredential googleIdTokenCredential = GoogleIdTokenCredential.createFrom(credentialData);
|
||||||
|
|
||||||
|
// Sign in to Firebase with using the token
|
||||||
|
firebaseAuthWithGoogle(googleIdTokenCredential.getIdToken());
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "Credential is not of type Google ID!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void signOut() {
|
||||||
|
// Firebase sign out
|
||||||
|
mAuth.signOut();
|
||||||
|
|
||||||
|
// When a user signs out, clear the current user credential state from all credential providers.
|
||||||
|
ClearCredentialStateRequest clearRequest = new ClearCredentialStateRequest();
|
||||||
|
credentialManager.clearCredentialStateAsync(
|
||||||
|
clearRequest,
|
||||||
|
new CancellationSignal(),
|
||||||
|
Executors.newSingleThreadExecutor(),
|
||||||
|
new CredentialManagerCallback<>() {
|
||||||
|
@Override
|
||||||
|
public void onResult(@NonNull Void result) {
|
||||||
|
//updateUI(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull ClearCredentialException e) {
|
||||||
|
Log.e(TAG, "Couldn't clear user credentials: " + e.getLocalizedMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
// Check if user is signed in (non-null) and update UI accordingly.
|
||||||
|
FirebaseUser currentUser = mAuth.getCurrentUser();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
BIN
app/src/main/res/drawable/alvo.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
12
app/src/main/res/drawable/cardview_background.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/branco"/>
|
||||||
|
<corners android:radius="20dp"/>
|
||||||
|
<stroke
|
||||||
|
android:color="@color/cinzabordas"
|
||||||
|
android:width="1dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
BIN
app/src/main/res/drawable/carteira.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable/diagonalarrowrightup_110941.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable/documento.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/drawable/engrenaje.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
app/src/main/res/drawable/grafico.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
9
app/src/main/res/drawable/linear_backgound.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/cinzaescuro"/>
|
||||||
|
<corners android:radius="15dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
||||||
@@ -5,6 +5,356 @@
|
|||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:backgroundTint="@color/preto"
|
||||||
tools:context=".TelaInicialActivity">
|
tools:context=".TelaInicialActivity">
|
||||||
|
|
||||||
|
<!-- <ScrollView-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="match_parent"-->
|
||||||
|
<!-- android:background="@color/cinza">-->
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/receitasCardView"
|
||||||
|
android:layout_width="379dp"
|
||||||
|
android:layout_height="175dp"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:layout_marginTop="28dp"
|
||||||
|
android:background="@drawable/cardview_background"
|
||||||
|
android:padding="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView11">
|
||||||
|
|
||||||
|
<!-- TRANSAÇÕES -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTitulo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="Receitas (Mês Atual)"
|
||||||
|
android:textColor="#3A3A3A"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivArrow"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginEnd="7dp"
|
||||||
|
android:src="@drawable/diagonalarrowrightup_110941"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="#2ECC71" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvValor"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvTitulo"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:text="0.00€"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvTitulo" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTransacoes"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvValor"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:text="0 transações"
|
||||||
|
android:textColor="#8E8E8E"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvValor"
|
||||||
|
app:layout_constraintVertical_bias="0.277" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView10"
|
||||||
|
android:layout_width="339dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_marginTop="64dp"
|
||||||
|
android:text="Plataforma de Gestão Financeira"
|
||||||
|
android:textSize="23sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.375"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView11"
|
||||||
|
android:layout_width="338dp"
|
||||||
|
android:layout_height="49dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:text="Transparência completa sobre o seu fluxo de caixa"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.369"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView10" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/despesasCardView"
|
||||||
|
android:layout_width="379dp"
|
||||||
|
android:layout_height="175dp"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:background="@drawable/cardview_background"
|
||||||
|
android:padding="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/receitasCardView">
|
||||||
|
|
||||||
|
<!-- TRANSAÇÕES -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTitulo2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="Despesas (Mês Atual)"
|
||||||
|
android:textColor="#3A3A3A"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivArrow2"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginEnd="7dp"
|
||||||
|
android:src="@drawable/diagonalarrowleftdownoutline_110924"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="#FF0000" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvValor2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvTitulo2"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:text="0.00€"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvTitulo2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTransacoes2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvValor2"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:text="0 transações"
|
||||||
|
android:textColor="#8E8E8E"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvValor2"
|
||||||
|
app:layout_constraintVertical_bias="0.277" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/saldoCardView"
|
||||||
|
android:layout_width="379dp"
|
||||||
|
android:layout_height="175dp"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:background="@drawable/cardview_background"
|
||||||
|
android:padding="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/despesasCardView">
|
||||||
|
|
||||||
|
<!-- TRANSAÇÕES -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTitulo3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="Saldo do Mês"
|
||||||
|
android:textColor="#3A3A3A"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivArrow3"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginEnd="7dp"
|
||||||
|
android:src="@drawable/carteira"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="#0000FF" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvValor3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvTitulo3"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:text="0.00€"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvTitulo3" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTransacoes3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvValor3"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:text="Poupança positiva"
|
||||||
|
android:textColor="#8E8E8E"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvValor3"
|
||||||
|
app:layout_constraintVertical_bias="0.277" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/ativosCardView"
|
||||||
|
android:layout_width="379dp"
|
||||||
|
android:layout_height="175dp"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:background="@drawable/cardview_background"
|
||||||
|
android:padding="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/saldoCardView">
|
||||||
|
|
||||||
|
<!-- TRANSAÇÕES -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTitulo4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="Valor do Ativos"
|
||||||
|
android:textColor="#3A3A3A"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivArrow4"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginEnd="7dp"
|
||||||
|
android:src="@drawable/diagonalarrowrightup_110941"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="#2ECC71" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvValor4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvTitulo4"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:text="0.00€"
|
||||||
|
android:textColor="#000000"
|
||||||
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvTitulo4" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvTransacoes4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tvValor4"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:text="+0.00% ROI"
|
||||||
|
android:textColor="#8E8E8E"
|
||||||
|
android:textSize="14sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tvValor4"
|
||||||
|
app:layout_constraintVertical_bias="0.277" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/shapeLinearLayout"
|
||||||
|
android:layout_width="422dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:background="@drawable/linear_backgound"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/ativosCardView">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
app:srcCompat="@drawable/alvo" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView2"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
app:srcCompat="@drawable/carteira" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<!-- </ScrollView>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
6
app/src/main/res/layout/ativos.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
6
app/src/main/res/layout/definicoes.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
6
app/src/main/res/layout/documentos.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
6
app/src/main/res/layout/graficos.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
6
app/src/main/res/layout/meta.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
18
app/src/main/res/layout/transacoes.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/transacoesCardView"
|
||||||
|
android:layout_width="379dp"
|
||||||
|
android:layout_height="200dp"
|
||||||
|
android:layout_marginBottom="80dp"
|
||||||
|
android:background="@drawable/cardview_background"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -2,5 +2,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<color name="preto">#FF000000</color>
|
<color name="preto">#FF000000</color>
|
||||||
<color name="branco">#FFFFFFFF</color>
|
<color name="branco">#FFFFFFFF</color>
|
||||||
<color name="cinza">#CCCBCB</color>
|
<color name="cinza">#F8F8F8</color>
|
||||||
|
<color name="cinzabordas">#EDEDED</color>
|
||||||
|
<color name="cinzaescuro">#CCC9C9</color>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">LifeGrid</string>
|
<string name="app_name">LifeGrid</string>
|
||||||
<!-- Substitua pelo Web Client ID do Firebase Console -> Authentication -> Sign-in method -> Google -->
|
<!-- Substitua pelo Web Client ID do Firebase Console -> Authentication -> Sign-in method -> Google -->
|
||||||
<string name="default_web_client_id">YOUR_WEB_CLIENT_ID_HERE</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.13.1"
|
agp = "8.13.2"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.3.0"
|
junitVersion = "1.3.0"
|
||||||
espressoCore = "3.7.0"
|
espressoCore = "3.7.0"
|
||||||
@@ -15,6 +15,7 @@ googleid = "1.1.1"
|
|||||||
firebaseDatabase = "22.0.1"
|
firebaseDatabase = "22.0.1"
|
||||||
recyclerview = "1.4.0"
|
recyclerview = "1.4.0"
|
||||||
playServicesAuth = "21.2.0"
|
playServicesAuth = "21.2.0"
|
||||||
|
cardview = "1.0.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
@@ -31,6 +32,7 @@ googleid = { group = "com.google.android.libraries.identity.googleid", name = "g
|
|||||||
firebase-database = { group = "com.google.firebase", name = "firebase-database", version.ref = "firebaseDatabase" }
|
firebase-database = { group = "com.google.firebase", name = "firebase-database", version.ref = "firebaseDatabase" }
|
||||||
recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
|
recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
|
||||||
play-services-auth = { group = "com.google.android.gms", name = "play-services-auth", version.ref = "playServicesAuth" }
|
play-services-auth = { group = "com.google.android.gms", name = "play-services-auth", version.ref = "playServicesAuth" }
|
||||||
|
cardview = { group = "androidx.cardview", name = "cardview", version.ref = "cardview" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
|||||||