Correção de bugs e melhoramento de design
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
|
||||
<activity android:name=".LockActivity" android:exported="false" />
|
||||
|
||||
<activity android:name=".AlterarPasswordActivity" android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".NovaPasswordActivity"
|
||||
android:exported="true">
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.example.finzora;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class AlterarPasswordActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_alterar_password);
|
||||
|
||||
ImageView btnVoltar = findViewById(R.id.btnVoltarPassword);
|
||||
EditText editPasswordAtual = findViewById(R.id.editPasswordAtual);
|
||||
EditText editPasswordNova = findViewById(R.id.editPasswordNova);
|
||||
EditText editPasswordConfirmar = findViewById(R.id.editPasswordConfirmar);
|
||||
Button btnGuardar = findViewById(R.id.btnGuardarPassword);
|
||||
|
||||
// Voltar atrás
|
||||
btnVoltar.setOnClickListener(v -> finish());
|
||||
|
||||
// Guardar Nova Palavra-passe
|
||||
btnGuardar.setOnClickListener(v -> {
|
||||
String passAtual = editPasswordAtual.getText().toString();
|
||||
String passNova = editPasswordNova.getText().toString();
|
||||
String passConfirma = editPasswordConfirmar.getText().toString();
|
||||
|
||||
// 1. Validar se os campos estão preenchidos
|
||||
if (passAtual.isEmpty() || passNova.isEmpty() || passConfirma.isEmpty()) {
|
||||
Toast.makeText(this, "Preenche todos os campos!", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Validar o tamanho
|
||||
if (passNova.length() < 6) {
|
||||
editPasswordNova.setError("Tem de ter pelo menos 6 caracteres");
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. Validar se as palavras-passe novas coincidem
|
||||
if (!passNova.equals(passConfirma)) {
|
||||
editPasswordConfirmar.setError("As palavras-passe não coincidem!");
|
||||
return;
|
||||
}
|
||||
|
||||
// AQUI DEVE ENTRAR O TEU CÓDIGO DO SUPABASE PARA MUDAR A PASS!
|
||||
// Por agora, damos a sensação de sucesso:
|
||||
Toast.makeText(this, "Palavra-passe atualizada com segurança! 🔒", Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -11,13 +11,15 @@ import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -36,20 +38,21 @@ public class DefinicoesActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_definicoes);
|
||||
|
||||
TextView btnVoltarDefinicoes = findViewById(R.id.btnVoltarDefinicoes);
|
||||
TextView btnEditarPerfil = findViewById(R.id.btnEditarPerfil);
|
||||
Switch switchModoEscuro = findViewById(R.id.switchModoEscuro);
|
||||
Switch switchNotificacoes = findViewById(R.id.switchNotificacoes);
|
||||
Switch switchBiometria = findViewById(R.id.switchBiometria);
|
||||
TextView btnSuporte = findViewById(R.id.btnSuporte);
|
||||
// --- VINCULAR OS NOVOS JOGADORES DO DESIGN PREMIUM ---
|
||||
Toolbar toolbar = findViewById(R.id.toolbarDefinicoes);
|
||||
LinearLayout itemEditarPerfil = findViewById(R.id.itemEditarPerfil);
|
||||
SwitchMaterial switchModoEscuro = findViewById(R.id.switchModoEscuro);
|
||||
SwitchMaterial switchNotificacoes = findViewById(R.id.switchNotificacoes);
|
||||
SwitchMaterial switchBiometria = findViewById(R.id.switchBiometria);
|
||||
LinearLayout itemCentroSuporte = findViewById(R.id.itemCentroSuporte);
|
||||
Button btnTerminarSessao = findViewById(R.id.btnTerminarSessao);
|
||||
Button btnEliminarConta = findViewById(R.id.btnEliminarConta);
|
||||
Button btnApagarConta = findViewById(R.id.btnApagarConta);
|
||||
|
||||
// --- 0. BOTÃO DE VOLTAR ---
|
||||
btnVoltarDefinicoes.setOnClickListener(v -> finish());
|
||||
// --- 0. BOTÃO DE VOLTAR (Na nova Toolbar) ---
|
||||
toolbar.setNavigationOnClickListener(v -> finish());
|
||||
|
||||
// --- 1. EDITAR PERFIL ---
|
||||
btnEditarPerfil.setOnClickListener(v -> {
|
||||
// --- 1. EDITAR PERFIL (Agora é um item clicável) ---
|
||||
itemEditarPerfil.setOnClickListener(v -> {
|
||||
startActivity(new Intent(DefinicoesActivity.this, EditarPerfilActivity.class));
|
||||
});
|
||||
|
||||
@@ -95,13 +98,13 @@ public class DefinicoesActivity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
// --- 5. CENTRO DE SUPORTE (POP-UP) ---
|
||||
btnSuporte.setOnClickListener(v -> mostrarDialogSuporte());
|
||||
itemCentroSuporte.setOnClickListener(v -> mostrarDialogSuporte());
|
||||
|
||||
// --- 6. TERMINAR SESSÃO ---
|
||||
btnTerminarSessao.setOnClickListener(v -> terminarSessao());
|
||||
|
||||
// --- 7. APAGAR CONTA ---
|
||||
btnEliminarConta.setOnClickListener(v -> mostrarAvisoEliminar());
|
||||
btnApagarConta.setOnClickListener(v -> mostrarAvisoEliminar());
|
||||
}
|
||||
|
||||
private void mostrarAvisoEliminar() {
|
||||
@@ -225,7 +228,7 @@ public class DefinicoesActivity extends AppCompatActivity {
|
||||
enviarEmailProfissional();
|
||||
});
|
||||
|
||||
// 📞 CONTACTOS DIRETOS: Abre o nosso Novo Design Premium!
|
||||
// 📞 CONTACTOS DIRETOS
|
||||
dialog.findViewById(R.id.cardContactos).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
mostrarDialogContactosInfo();
|
||||
@@ -234,7 +237,6 @@ public class DefinicoesActivity extends AppCompatActivity {
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
// 🏆 A NOVA FUNÇÃO QUE CHAMA O DESIGN PREMIUM
|
||||
private void mostrarDialogContactosInfo() {
|
||||
Dialog dialog = new Dialog(this);
|
||||
dialog.setContentView(R.layout.dialog_contactos);
|
||||
@@ -244,7 +246,6 @@ public class DefinicoesActivity extends AppCompatActivity {
|
||||
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
}
|
||||
|
||||
// Quando clica em Voltar, fechamos este e abrimos o menu de Suporte outra vez!
|
||||
dialog.findViewById(R.id.btnFecharContactos).setOnClickListener(v -> {
|
||||
dialog.dismiss();
|
||||
mostrarDialogSuporte();
|
||||
|
||||
@@ -9,11 +9,13 @@ import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -38,19 +40,20 @@ import okhttp3.Response;
|
||||
|
||||
public class DicasFragment extends Fragment {
|
||||
|
||||
private TextView tvTaxaPoupanca, tvDicasReceitas, tvDicasDespesas;
|
||||
private ProgressBar progressPoupanca;
|
||||
private TextView tvTituloDica1, tvDescDica1, tvTituloDica2, tvDescDica2, tvTituloDica3, tvDescDica3;
|
||||
private LinearLayout layoutDistribuicao;
|
||||
|
||||
private View layoutConteudoDicas;
|
||||
private View layoutEstadoVazioDicas;
|
||||
|
||||
private TextView tvRespostaAI;
|
||||
// IA
|
||||
private EditText editPerguntaAI;
|
||||
private ImageButton btnEnviarAI;
|
||||
private ProgressBar pbCarregandoAI;
|
||||
private ImageView btnEnviarAI;
|
||||
private TextView tvRespostaAI; // 🚀 Adicionámos o jogador responsável por mostrar o texto da IA!
|
||||
|
||||
// Diagnóstico
|
||||
private ProgressBar progressPoupanca;
|
||||
private TextView tvTaxaPoupancaValor, tvReceitasResumo, tvDespesasResumo;
|
||||
private TextView tvTituloDica1, tvDescDica1;
|
||||
private TextView tvTituloDica2, tvDescDica2;
|
||||
private TextView tvTituloDica3, tvDescDica3;
|
||||
|
||||
// Top Despesas
|
||||
private LinearLayout layoutDistribuicao;
|
||||
private int corFundoCartao;
|
||||
private int corTextoDinamico;
|
||||
|
||||
@@ -61,10 +64,19 @@ public class DicasFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_dicas, container, false);
|
||||
|
||||
tvTaxaPoupanca = view.findViewById(R.id.tvTaxaPoupanca);
|
||||
tvDicasReceitas = view.findViewById(R.id.tvDicasReceitas);
|
||||
tvDicasDespesas = view.findViewById(R.id.tvDicasDespesas);
|
||||
if (getContext() != null) {
|
||||
corFundoCartao = ContextCompat.getColor(getContext(), R.color.fundo_cartao);
|
||||
corTextoDinamico = ContextCompat.getColor(getContext(), R.color.texto_principal);
|
||||
}
|
||||
|
||||
editPerguntaAI = view.findViewById(R.id.editPerguntaAI);
|
||||
btnEnviarAI = view.findViewById(R.id.btnEnviarAI);
|
||||
tvRespostaAI = view.findViewById(R.id.tvRespostaAI); // Ligar ao XML
|
||||
|
||||
progressPoupanca = view.findViewById(R.id.progressPoupanca);
|
||||
tvTaxaPoupancaValor = view.findViewById(R.id.tvTaxaPoupancaValor);
|
||||
tvReceitasResumo = view.findViewById(R.id.tvReceitasResumo);
|
||||
tvDespesasResumo = view.findViewById(R.id.tvDespesasResumo);
|
||||
|
||||
tvTituloDica1 = view.findViewById(R.id.tvTituloDica1);
|
||||
tvDescDica1 = view.findViewById(R.id.tvDescDica1);
|
||||
@@ -74,30 +86,29 @@ public class DicasFragment extends Fragment {
|
||||
tvDescDica3 = view.findViewById(R.id.tvDescDica3);
|
||||
|
||||
layoutDistribuicao = view.findViewById(R.id.layoutDistribuicao);
|
||||
layoutConteudoDicas = view.findViewById(R.id.layoutConteudoDicas);
|
||||
layoutEstadoVazioDicas = view.findViewById(R.id.layoutEstadoVazioDicas);
|
||||
|
||||
tvRespostaAI = view.findViewById(R.id.tvRespostaAI);
|
||||
editPerguntaAI = view.findViewById(R.id.editPerguntaAI);
|
||||
btnEnviarAI = view.findViewById(R.id.btnEnviarAI);
|
||||
pbCarregandoAI = view.findViewById(R.id.pbCarregandoAI);
|
||||
|
||||
if (getContext() != null) {
|
||||
corFundoCartao = ContextCompat.getColor(getContext(), R.color.fundo_cartao);
|
||||
corTextoDinamico = ContextCompat.getColor(getContext(), R.color.texto_principal);
|
||||
if (btnEnviarAI != null) {
|
||||
btnEnviarAI.setOnClickListener(v -> perguntarAoNovoCoach());
|
||||
}
|
||||
|
||||
btnEnviarAI.setOnClickListener(v -> perguntarAoNovoCoach());
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
private void perguntarAoNovoCoach() {
|
||||
if (editPerguntaAI == null || tvRespostaAI == null) return;
|
||||
|
||||
String pergunta = editPerguntaAI.getText().toString().trim();
|
||||
if (pergunta.isEmpty()) return;
|
||||
|
||||
pbCarregandoAI.setVisibility(View.VISIBLE);
|
||||
tvRespostaAI.setText("A analisar os dados de forma inteligente...");
|
||||
// Tática: Esconder o teclado para não tapar a resposta
|
||||
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (imm != null) {
|
||||
imm.hideSoftInputFromWindow(editPerguntaAI.getWindowToken(), 0);
|
||||
}
|
||||
|
||||
// Escrever logo no cartão que a máquina está a pensar!
|
||||
tvRespostaAI.setText("A processar análise... 🧠");
|
||||
tvRespostaAI.setTextColor(ContextCompat.getColor(getContext(), R.color.tech_accent_cyan));
|
||||
editPerguntaAI.setText("");
|
||||
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
@@ -138,8 +149,8 @@ public class DicasFragment extends Fragment {
|
||||
public void onFailure(@NonNull Call call, @NonNull IOException e) {
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
pbCarregandoAI.setVisibility(View.GONE);
|
||||
tvRespostaAI.setText("Erro de ligação ao serviço de Inteligência Artificial.");
|
||||
tvRespostaAI.setText("Falha na ligação. A minha antena está sem sinal, tenta outra vez! 📡");
|
||||
tvRespostaAI.setTextColor(Color.parseColor("#F56565")); // Vermelho suave
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -147,25 +158,26 @@ public class DicasFragment extends Fragment {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException {
|
||||
final String respBody = response.body() != null ? response.body().string() : "";
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
pbCarregandoAI.setVisibility(View.GONE);
|
||||
if (response.isSuccessful()) {
|
||||
try {
|
||||
JSONObject jsonObject = new JSONObject(respBody);
|
||||
String respostaIA = jsonObject.getJSONArray("choices")
|
||||
.getJSONObject(0).getJSONObject("message").getString("content");
|
||||
|
||||
String textoFormatado = respostaIA.replaceAll("\\*\\*(.*?)\\*\\*", "<b>$1</b>");
|
||||
textoFormatado = textoFormatado.replace("\n", "<br>");
|
||||
tvRespostaAI.setText(android.text.Html.fromHtml(textoFormatado, android.text.Html.FROM_HTML_MODE_LEGACY));
|
||||
// Limpar asteriscos e colocar a resposta diretamente no cartão!
|
||||
String textoLimpo = respostaIA.replaceAll("\\*\\*", "");
|
||||
tvRespostaAI.setText(textoLimpo);
|
||||
tvRespostaAI.setTextColor(ContextCompat.getColor(getContext(), R.color.text_secondary)); // Volta à cor normal
|
||||
|
||||
} catch (Exception e) {
|
||||
tvRespostaAI.setText("Erro a ler os dados da análise: " + e.getMessage());
|
||||
tvRespostaAI.setText("Erro ao processar a resposta dos servidores.");
|
||||
tvRespostaAI.setTextColor(Color.parseColor("#F56565"));
|
||||
}
|
||||
} else {
|
||||
tvRespostaAI.setText("O Assistente não está disponível neste momento.");
|
||||
tvRespostaAI.setText("Os servidores da IA estão ocupados neste momento. ⏱️");
|
||||
tvRespostaAI.setTextColor(Color.parseColor("#ECC94B")); // Amarelo de aviso
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -216,9 +228,7 @@ public class DicasFragment extends Fragment {
|
||||
mapaGastos.put(cat, mapaGastos.getOrDefault(cat, 0f) + v);
|
||||
}
|
||||
}
|
||||
|
||||
buscarOrcamentosECriarCerebro(userId, client, rec, desp, mapaGastos);
|
||||
|
||||
} catch (Exception e) { e.printStackTrace(); }
|
||||
}
|
||||
});
|
||||
@@ -242,13 +252,11 @@ public class DicasFragment extends Fragment {
|
||||
String body = response.body().string();
|
||||
JSONArray arrayOrcamentos = new JSONArray(body);
|
||||
|
||||
// 🧠 RECONSTRUIR O CÉREBRO DA IA COM TODOS OS DETALHES!
|
||||
StringBuilder cerebro = new StringBuilder();
|
||||
cerebro.append("DADOS FINANCEIROS ATUAIS DO UTILIZADOR: ");
|
||||
cerebro.append("Receitas Totais: ").append(rec).append("€. ");
|
||||
cerebro.append("Despesas Totais: ").append(desp).append("€. ");
|
||||
cerebro.append("DADOS FINANCEIROS ATUAIS: ");
|
||||
cerebro.append("Receitas: ").append(rec).append("€. ");
|
||||
cerebro.append("Despesas: ").append(desp).append("€. ");
|
||||
|
||||
// Passar as categorias onde gastaste dinheiro
|
||||
if (!mapaGastos.isEmpty()) {
|
||||
cerebro.append("Gastos por categoria: ");
|
||||
for (Map.Entry<String, Float> entry : mapaGastos.entrySet()) {
|
||||
@@ -257,19 +265,16 @@ public class DicasFragment extends Fragment {
|
||||
}
|
||||
|
||||
if (arrayOrcamentos.length() > 0) {
|
||||
cerebro.append(". ORÇAMENTOS DEFINIDOS: ");
|
||||
cerebro.append(". ORÇAMENTOS: ");
|
||||
for (int i = 0; i < arrayOrcamentos.length(); i++) {
|
||||
JSONObject obj = arrayOrcamentos.getJSONObject(i);
|
||||
String cat = obj.getString("categoria");
|
||||
float limite = (float) obj.getDouble("valor_limite");
|
||||
float gasto = mapaGastos.containsKey(cat) ? mapaGastos.get(cat) : 0f;
|
||||
cerebro.append("[").append(cat).append(": Limite definido ").append(limite).append("€, Gasto atual ").append(gasto).append("€] ");
|
||||
cerebro.append("[").append(cat).append(": Limite ").append(limite).append("€, Gasto ").append(gasto).append("€] ");
|
||||
}
|
||||
} else {
|
||||
cerebro.append(". O utilizador não tem orçamentos definidos de momento. ");
|
||||
}
|
||||
|
||||
// ⚠️ A JOGADA QUE FALTAVA: Guardar a memória na variável que a IA vai ler!
|
||||
contextoFinanceiroParaAI = cerebro.toString();
|
||||
|
||||
if (getActivity() != null) {
|
||||
@@ -282,24 +287,14 @@ public class DicasFragment extends Fragment {
|
||||
|
||||
private void aplicarLogicaDeDicas(float rec, float desp, HashMap<String, Float> mapa, JSONArray arrayOrcamentos) {
|
||||
|
||||
if (rec == 0 && desp == 0) {
|
||||
layoutConteudoDicas.setVisibility(View.GONE);
|
||||
layoutEstadoVazioDicas.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
} else {
|
||||
layoutConteudoDicas.setVisibility(View.VISIBLE);
|
||||
layoutEstadoVazioDicas.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// --- TOPO: RESUMO ---
|
||||
tvDicasReceitas.setText(String.format("€ %.2f", rec));
|
||||
tvDicasDespesas.setText(String.format("€ %.2f", desp));
|
||||
float taxa = (rec > 0) ? ((rec - desp) / rec) * 100 : 0;
|
||||
if (taxa < 0) taxa = 0;
|
||||
tvTaxaPoupanca.setText(String.format("%.1f%%", taxa));
|
||||
progressPoupanca.setProgress((int) taxa);
|
||||
|
||||
// --- CARTÃO 1: REGRA 50/30/20 ---
|
||||
if (progressPoupanca != null) progressPoupanca.setProgress((int) taxa);
|
||||
if (tvTaxaPoupancaValor != null) tvTaxaPoupancaValor.setText(String.format("%.1f%%", taxa));
|
||||
if (tvReceitasResumo != null) tvReceitasResumo.setText(String.format("€ %.2f", rec));
|
||||
if (tvDespesasResumo != null) tvDespesasResumo.setText(String.format("€ %.2f", desp));
|
||||
|
||||
float necessidades = 0; float desejos = 0;
|
||||
for (Map.Entry<String, Float> entry : mapa.entrySet()) {
|
||||
String cat = entry.getKey().toLowerCase();
|
||||
@@ -316,25 +311,20 @@ public class DicasFragment extends Fragment {
|
||||
float percDesejos = (desejos / rec) * 100;
|
||||
|
||||
if (percNecessidades <= 50 && percDesejos <= 30) {
|
||||
tvTituloDica1.setText("Balanço Perfeito ⚖️");
|
||||
tvTituloDica1.setTextColor(Color.parseColor("#00E676"));
|
||||
tvDescDica1.setText("Estás a cumprir a Regra de Ouro (50/30/20). Os teus gastos essenciais e de lazer estão equilibrados face aos teus rendimentos.");
|
||||
if(tvTituloDica1 != null) { tvTituloDica1.setText("Balanço Perfeito ⚖️"); tvTituloDica1.setTextColor(Color.parseColor("#00E676")); }
|
||||
if(tvDescDica1 != null) tvDescDica1.setText("Estás a cumprir a Regra de Ouro (50/30/20). Os teus gastos essenciais e de lazer estão equilibrados face aos teus rendimentos.");
|
||||
} else if (percDesejos > 30) {
|
||||
tvTituloDica1.setText("Atenção aos Gastos Supérfluos 🛍️");
|
||||
tvTituloDica1.setTextColor(Color.parseColor("#ECC94B"));
|
||||
tvDescDica1.setText(String.format("A alocação em despesas não essenciais representa %.0f%% do teu orçamento. Recomenda-se reduzir para a margem dos 30%%.", percDesejos));
|
||||
if(tvTituloDica1 != null) { tvTituloDica1.setText("Atenção aos Gastos Supérfluos 🛍️"); tvTituloDica1.setTextColor(Color.parseColor("#ECC94B")); }
|
||||
if(tvDescDica1 != null) tvDescDica1.setText(String.format("A alocação em despesas não essenciais representa %.0f%% do teu orçamento. Recomenda-se reduzir para a margem dos 30%%.", percDesejos));
|
||||
} else {
|
||||
tvTituloDica1.setText("Despesas Fixas Elevadas 🏠");
|
||||
tvTituloDica1.setTextColor(Color.parseColor("#F56565"));
|
||||
tvDescDica1.setText(String.format("Os teus encargos fixos representam %.0f%% do salário. O indicador ideal para manter a estabilidade financeira é de 50%%.", percNecessidades));
|
||||
if(tvTituloDica1 != null) { tvTituloDica1.setText("Despesas Fixas Elevadas 🏠"); tvTituloDica1.setTextColor(Color.parseColor("#F56565")); }
|
||||
if(tvDescDica1 != null) tvDescDica1.setText(String.format("Os teus encargos fixos representam %.0f%% do salário. O indicador ideal para manter a estabilidade financeira é de 50%%.", percNecessidades));
|
||||
}
|
||||
} else {
|
||||
tvTituloDica1.setText("Regra 50/30/20 ⚖️");
|
||||
tvTituloDica1.setTextColor(corTextoDinamico);
|
||||
tvDescDica1.setText("Regista receitas para que possamos calcular a distribuição ideal do teu património.");
|
||||
if(tvTituloDica1 != null) { tvTituloDica1.setText("Regra 50/30/20 ⚖️"); tvTituloDica1.setTextColor(corTextoDinamico); }
|
||||
if(tvDescDica1 != null) tvDescDica1.setText("Regista receitas para que possamos calcular a distribuição ideal do teu património.");
|
||||
}
|
||||
|
||||
// --- CARTÃO 2: RADAR DE ORÇAMENTOS ---
|
||||
String alertaOrcamento = "Todos os orçamentos definidos encontram-se dentro dos limites previstos.";
|
||||
int corAlerta = Color.parseColor("#00E676");
|
||||
String tituloAlerta = "Orçamentos Controlados ✅";
|
||||
@@ -363,7 +353,7 @@ public class DicasFragment extends Fragment {
|
||||
if (maiorRisco >= 1.0) {
|
||||
tituloAlerta = "Orçamento Excedido 🚨";
|
||||
corAlerta = Color.parseColor("#FF1744");
|
||||
alertaOrcamento = "O limite definido para a categoria '" + catRisco + "' foi ultrapassado. Sugere-se o reajuste das restantes categorias.";
|
||||
alertaOrcamento = "O limite definido para a categoria '" + catRisco + "' foi ultrapassado. Sugere-se o reajuste.";
|
||||
} else if (maiorRisco >= 0.8) {
|
||||
tituloAlerta = "Aviso de Limite Próximo ⚠️";
|
||||
corAlerta = Color.parseColor("#ECC94B");
|
||||
@@ -375,11 +365,9 @@ public class DicasFragment extends Fragment {
|
||||
}
|
||||
} catch (Exception e) { e.printStackTrace(); }
|
||||
|
||||
tvTituloDica2.setText(tituloAlerta);
|
||||
tvTituloDica2.setTextColor(corAlerta);
|
||||
tvDescDica2.setText(alertaOrcamento);
|
||||
if(tvTituloDica2 != null) { tvTituloDica2.setText(tituloAlerta); tvTituloDica2.setTextColor(corAlerta); }
|
||||
if(tvDescDica2 != null) tvDescDica2.setText(alertaOrcamento);
|
||||
|
||||
// --- CARTÃO 3: PREVISÃO E TENDÊNCIA DIÁRIA ---
|
||||
Calendar cal = Calendar.getInstance();
|
||||
int diaAtual = cal.get(Calendar.DAY_OF_MONTH);
|
||||
int diasNoMes = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
@@ -389,67 +377,65 @@ public class DicasFragment extends Fragment {
|
||||
float previsaoFimDoMes = mediaDiaria * diasNoMes;
|
||||
|
||||
if (previsaoFimDoMes > rec && rec > 0) {
|
||||
tvTituloDica3.setText("Projeção Mensal Elevada 📈");
|
||||
tvTituloDica3.setTextColor(Color.parseColor("#FF1744"));
|
||||
tvDescDica3.setText(String.format("A média de custos diários situa-se em %.2f€. Mantendo esta tendência, o custo final estimado será de %.2f€ (acima dos rendimentos).", mediaDiaria, previsaoFimDoMes));
|
||||
if(tvTituloDica3 != null) { tvTituloDica3.setText("Projeção Mensal Elevada 📈"); tvTituloDica3.setTextColor(Color.parseColor("#FF1744")); }
|
||||
if(tvDescDica3 != null) tvDescDica3.setText(String.format("A média de custos diários situa-se em %.2f€. Mantendo esta tendência, o custo final estimado será de %.2f€ (acima dos rendimentos).", mediaDiaria, previsaoFimDoMes));
|
||||
} else {
|
||||
tvTituloDica3.setText("Projeção Mensal Controlada 📉");
|
||||
tvTituloDica3.setTextColor(Color.parseColor("#00E676"));
|
||||
tvDescDica3.setText(String.format("A tua média de custos é de %.2f€ diários. A estimativa projetada para o final do mês é de %.2f€.", mediaDiaria, previsaoFimDoMes));
|
||||
if(tvTituloDica3 != null) { tvTituloDica3.setText("Projeção Mensal Controlada 📉"); tvTituloDica3.setTextColor(Color.parseColor("#00E676")); }
|
||||
if(tvDescDica3 != null) tvDescDica3.setText(String.format("A tua média de custos é de %.2f€ diários. A estimativa projetada para o final do mês é de %.2f€.", mediaDiaria, previsaoFimDoMes));
|
||||
}
|
||||
} else {
|
||||
tvTituloDica3.setText("Projeção de Despesas 📊");
|
||||
tvTituloDica3.setTextColor(corTextoDinamico);
|
||||
tvDescDica3.setText("Regista mais movimentos ao longo do mês para que o sistema possa projetar a tua média diária de despesas.");
|
||||
if(tvTituloDica3 != null) { tvTituloDica3.setText("Projeção de Despesas 📊"); tvTituloDica3.setTextColor(corTextoDinamico); }
|
||||
if(tvDescDica3 != null) tvDescDica3.setText("Regista mais movimentos ao longo do mês para projetarmos a tua média diária.");
|
||||
}
|
||||
|
||||
// --- LISTA DE TOP DESPESAS ---
|
||||
layoutDistribuicao.removeAllViews();
|
||||
for (Map.Entry<String, Float> entry : mapa.entrySet()) {
|
||||
String categoria = entry.getKey();
|
||||
float valor = entry.getValue();
|
||||
if (layoutDistribuicao != null) {
|
||||
layoutDistribuicao.removeAllViews();
|
||||
for (Map.Entry<String, Float> entry : mapa.entrySet()) {
|
||||
String categoria = entry.getKey();
|
||||
float valor = entry.getValue();
|
||||
|
||||
LinearLayout row = new LinearLayout(getContext());
|
||||
row.setOrientation(LinearLayout.HORIZONTAL);
|
||||
row.setPadding(40, 30, 40, 30);
|
||||
row.setElevation(2f);
|
||||
LinearLayout row = new LinearLayout(getContext());
|
||||
row.setOrientation(LinearLayout.HORIZONTAL);
|
||||
row.setPadding(40, 40, 40, 40);
|
||||
row.setElevation(0f);
|
||||
|
||||
GradientDrawable shape = new GradientDrawable();
|
||||
shape.setCornerRadius(24f);
|
||||
shape.setColor(corFundoCartao);
|
||||
row.setBackground(shape);
|
||||
GradientDrawable shape = new GradientDrawable();
|
||||
shape.setCornerRadius(32f);
|
||||
shape.setColor(corFundoCartao);
|
||||
row.setBackground(shape);
|
||||
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
params.setMargins(0, 0, 0, 20);
|
||||
row.setLayoutParams(params);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
params.setMargins(0, 0, 0, 24);
|
||||
row.setLayoutParams(params);
|
||||
|
||||
String emoji = "💰";
|
||||
String catLower = categoria.toLowerCase();
|
||||
if (catLower.contains("alimen") || catLower.contains("restaurante")) emoji = "🍔";
|
||||
else if (catLower.contains("transp") || catLower.contains("carro")) emoji = "🚗";
|
||||
else if (catLower.contains("lazer") || catLower.contains("divers")) emoji = "🎮";
|
||||
else if (catLower.contains("saúd") || catLower.contains("farmácia")) emoji = "💊";
|
||||
else if (catLower.contains("educa")) emoji = "📚";
|
||||
else if (catLower.contains("casa") || catLower.contains("renda") || catLower.contains("conta")) emoji = "🏠";
|
||||
else if (catLower.contains("compras") || catLower.contains("roupa")) emoji = "🛍️";
|
||||
String emoji = "💰";
|
||||
String catLower = categoria.toLowerCase();
|
||||
if (catLower.contains("alimen") || catLower.contains("restaurante")) emoji = "🍔";
|
||||
else if (catLower.contains("transp") || catLower.contains("carro")) emoji = "🚗";
|
||||
else if (catLower.contains("lazer") || catLower.contains("divers")) emoji = "🎮";
|
||||
else if (catLower.contains("saúd") || catLower.contains("farmácia")) emoji = "💊";
|
||||
else if (catLower.contains("educa")) emoji = "📚";
|
||||
else if (catLower.contains("casa") || catLower.contains("renda") || catLower.contains("conta")) emoji = "🏠";
|
||||
else if (catLower.contains("compras") || catLower.contains("roupa")) emoji = "🛍️";
|
||||
|
||||
TextView tvCat = new TextView(getContext());
|
||||
tvCat.setText(emoji + " " + categoria);
|
||||
tvCat.setTextColor(corTextoDinamico);
|
||||
tvCat.setTextSize(16f);
|
||||
tvCat.setTypeface(null, Typeface.BOLD);
|
||||
tvCat.setLayoutParams(new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f));
|
||||
TextView tvCat = new TextView(getContext());
|
||||
tvCat.setText(emoji + " " + categoria);
|
||||
tvCat.setTextColor(corTextoDinamico);
|
||||
tvCat.setTextSize(16f);
|
||||
tvCat.setTypeface(null, Typeface.BOLD);
|
||||
tvCat.setLayoutParams(new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f));
|
||||
|
||||
TextView tvVal = new TextView(getContext());
|
||||
tvVal.setText(String.format("€ %.2f", valor));
|
||||
tvVal.setTextColor(Color.parseColor("#FF1744"));
|
||||
tvVal.setTextSize(16f);
|
||||
tvVal.setTypeface(null, Typeface.BOLD);
|
||||
TextView tvVal = new TextView(getContext());
|
||||
tvVal.setText(String.format("€ %.2f", valor));
|
||||
tvVal.setTextColor(Color.parseColor("#FF1744"));
|
||||
tvVal.setTextSize(16f);
|
||||
tvVal.setTypeface(null, Typeface.BOLD);
|
||||
|
||||
row.addView(tvCat);
|
||||
row.addView(tvVal);
|
||||
layoutDistribuicao.addView(row);
|
||||
row.addView(tvCat);
|
||||
row.addView(tvVal);
|
||||
layoutDistribuicao.addView(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ public class EditarPerfilActivity extends AppCompatActivity {
|
||||
|
||||
private EditText editNomePerfil;
|
||||
private EditText editEmailPerfil;
|
||||
private EditText editTelemovelPerfil; // NOVO JOGADOR INSCRITO!
|
||||
private ImageView imgFotoPerfil;
|
||||
private String caminhoFotoGuardada = null;
|
||||
|
||||
@@ -56,18 +57,23 @@ public class EditarPerfilActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_editar_perfil);
|
||||
|
||||
TextView btnVoltar = findViewById(R.id.btnVoltarEditarPerfil);
|
||||
// A CORREÇÃO DE MESTRE: Agora a seta de voltar é lida como ImageView (Imagem)
|
||||
ImageView btnVoltar = findViewById(R.id.btnVoltarEditarPerfil);
|
||||
editNomePerfil = findViewById(R.id.editNomePerfil);
|
||||
editEmailPerfil = findViewById(R.id.editEmailPerfil);
|
||||
editTelemovelPerfil = findViewById(R.id.editTelemovelPerfil); // Ligar ao XML
|
||||
Button btnAlterarPassword = findViewById(R.id.btnAlterarPassword); // Ligar ao XML
|
||||
Button btnGuardarPerfil = findViewById(R.id.btnGuardarPerfil);
|
||||
imgFotoPerfil = findViewById(R.id.imgFotoPerfil);
|
||||
|
||||
btnVoltar.setOnClickListener(v -> finish());
|
||||
imgFotoPerfil.setOnClickListener(v -> seletorImagens.launch("image/*"));
|
||||
|
||||
// Carregar os dados que já estavam guardados na app
|
||||
SharedPreferences prefs = getSharedPreferences("DadosUtilizador", MODE_PRIVATE);
|
||||
editNomePerfil.setText(prefs.getString("nome_usuario", "Investidor"));
|
||||
editEmailPerfil.setText(prefs.getString("email_usuario", ""));
|
||||
editTelemovelPerfil.setText(prefs.getString("telemovel_usuario", "")); // Carrega o telemóvel
|
||||
|
||||
caminhoFotoGuardada = prefs.getString("foto_usuario_path", null);
|
||||
if (caminhoFotoGuardada != null) {
|
||||
@@ -85,9 +91,16 @@ public class EditarPerfilActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
// 🚀 PASSE DE RUTURA: Abrir o novo ecrã profissional de segurança
|
||||
btnAlterarPassword.setOnClickListener(v -> {
|
||||
startActivity(new Intent(EditarPerfilActivity.this, AlterarPasswordActivity.class));
|
||||
});
|
||||
|
||||
// Quando o utilizador clica em Guardar
|
||||
btnGuardarPerfil.setOnClickListener(v -> {
|
||||
String novoNome = editNomePerfil.getText().toString().trim();
|
||||
String novoEmail = editEmailPerfil.getText().toString().trim();
|
||||
String novoTelemovel = editTelemovelPerfil.getText().toString().trim(); // Lê o que foi escrito
|
||||
|
||||
if (novoNome.isEmpty()) {
|
||||
editNomePerfil.setError("O nome não pode estar vazio!");
|
||||
@@ -97,6 +110,7 @@ public class EditarPerfilActivity extends AppCompatActivity {
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
editor.putString("nome_usuario", novoNome);
|
||||
editor.putString("email_usuario", novoEmail);
|
||||
editor.putString("telemovel_usuario", novoTelemovel); // Guarda o telemóvel
|
||||
|
||||
if (caminhoFotoGuardada != null) {
|
||||
editor.putString("foto_usuario_path", caminhoFotoGuardada);
|
||||
|
||||
@@ -42,11 +42,11 @@ public class GraficosFragment extends Fragment {
|
||||
private BarChart barChartOrcamento;
|
||||
private BarChart barChartTendencia;
|
||||
|
||||
// ⚠️ 1. As Vistas do Estado Vazio
|
||||
private View scrollviewGraficos;
|
||||
private View layoutEstadoVazio;
|
||||
|
||||
private int corTextoDinamica;
|
||||
private int corGridSubtil;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -57,14 +57,15 @@ public class GraficosFragment extends Fragment {
|
||||
barChartOrcamento = view.findViewById(R.id.barChartOrcamento);
|
||||
barChartTendencia = view.findViewById(R.id.barChartTendencia);
|
||||
|
||||
// ⚠️ 2. Ligar ao XML
|
||||
scrollviewGraficos = view.findViewById(R.id.scrollviewGraficos);
|
||||
layoutEstadoVazio = view.findViewById(R.id.layoutEstadoVazioGraficos);
|
||||
|
||||
if (getContext() != null) {
|
||||
corTextoDinamica = ContextCompat.getColor(getContext(), R.color.texto_principal);
|
||||
corGridSubtil = Color.parseColor("#1A888888"); // Uma grelha muito subtil e quase invisível
|
||||
} else {
|
||||
corTextoDinamica = Color.BLACK;
|
||||
corGridSubtil = Color.LTGRAY;
|
||||
}
|
||||
|
||||
return view;
|
||||
@@ -125,18 +126,14 @@ public class GraficosFragment extends Fragment {
|
||||
final float totalDespesas = somaDespesas;
|
||||
final Map<String, Float> mapaGastos = gastosPorCategoria;
|
||||
|
||||
// ⚠️ 3. A Lógica de Mostrar/Esconder
|
||||
if (getActivity() != null) {
|
||||
getActivity().runOnUiThread(() -> {
|
||||
// Se as receitas E as despesas forem 0, é porque não há transações nenhumas!
|
||||
if (totalReceitas == 0 && totalDespesas == 0) {
|
||||
scrollviewGraficos.setVisibility(View.GONE);
|
||||
layoutEstadoVazio.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
scrollviewGraficos.setVisibility(View.VISIBLE);
|
||||
layoutEstadoVazio.setVisibility(View.GONE);
|
||||
|
||||
// O utilizador tem dados! Vamos buscar os orçamentos para cruzar a informação
|
||||
carregarOrcamentosEDesenhar(userId, mapaGastos, totalReceitas, totalDespesas);
|
||||
}
|
||||
});
|
||||
@@ -193,6 +190,7 @@ public class GraficosFragment extends Fragment {
|
||||
pieChartDespesas.getLegend().setTextColor(corTextoDinamica);
|
||||
pieChartDespesas.getLegend().setTextSize(12f);
|
||||
pieChartDespesas.getLegend().setWordWrapEnabled(true);
|
||||
pieChartDespesas.getLegend().setForm(com.github.mikephil.charting.components.Legend.LegendForm.CIRCLE); // Fica mais tecnológico!
|
||||
|
||||
pieChartDespesas.setCenterText("Despesas");
|
||||
pieChartDespesas.setCenterTextColor(corTextoDinamica);
|
||||
@@ -208,14 +206,24 @@ public class GraficosFragment extends Fragment {
|
||||
if (entradas.isEmpty()) { pieChartDespesas.clear(); return; }
|
||||
|
||||
PieDataSet dataSet = new PieDataSet(entradas, "");
|
||||
dataSet.setColors(new int[]{Color.parseColor("#7C4DFF"), Color.parseColor("#00E5FF"), Color.parseColor("#FFD600"), Color.parseColor("#FF4081")});
|
||||
dataSet.setSliceSpace(3f);
|
||||
|
||||
// 🚀 PALETA CYBERPUNK PREMIUM: Tons Ciano, Azul Escuro, Roxo Neon, etc.
|
||||
dataSet.setColors(new int[]{
|
||||
Color.parseColor("#00E5FF"), // Cyan Tech
|
||||
Color.parseColor("#2979FF"), // Blue Deep
|
||||
Color.parseColor("#D500F9"), // Neon Purple
|
||||
Color.parseColor("#00E676"), // Emerald
|
||||
Color.parseColor("#FFEA00"), // Yellow Tech
|
||||
Color.parseColor("#FF1744") // Danger Red
|
||||
});
|
||||
|
||||
dataSet.setSliceSpace(4f); // Espaço entre as fatias dá o efeito premium
|
||||
|
||||
PieData data = new PieData(dataSet);
|
||||
data.setValueTextSize(14f);
|
||||
data.setValueTextColor(corTextoDinamica);
|
||||
data.setValueTextSize(12f);
|
||||
data.setValueTextColor(Color.WHITE); // Branco destaca bem em cima destas cores fortes
|
||||
pieChartDespesas.setData(data);
|
||||
pieChartDespesas.animateY(1000);
|
||||
pieChartDespesas.animateY(1200);
|
||||
}
|
||||
|
||||
private void desenharBarChartOrcamento(Map<String, Float> orcamentos, Map<String, Float> gastos) {
|
||||
@@ -239,17 +247,16 @@ public class GraficosFragment extends Fragment {
|
||||
|
||||
if (categorias.isEmpty()) { barChartOrcamento.clear(); return; }
|
||||
|
||||
BarDataSet setGastos = new BarDataSet(gastosEntries, "Gastos Reais");
|
||||
setGastos.setColor(Color.parseColor("#FF4081"));
|
||||
BarDataSet setGastos = new BarDataSet(gastosEntries, "Gasto Real");
|
||||
setGastos.setColor(Color.parseColor("#FF1744")); // Vermelho de Gasto
|
||||
setGastos.setValueTextColor(corTextoDinamica);
|
||||
|
||||
BarDataSet setOrcamento = new BarDataSet(orcamentoEntries, "Orçamento");
|
||||
setOrcamento.setColor(Color.parseColor("#00E5FF"));
|
||||
BarDataSet setOrcamento = new BarDataSet(orcamentoEntries, "Limite (Orçamento)");
|
||||
setOrcamento.setColor(Color.parseColor("#00B8D4")); // Ciano Tech do Limite
|
||||
setOrcamento.setValueTextColor(corTextoDinamica);
|
||||
|
||||
BarData data = new BarData(setGastos, setOrcamento);
|
||||
|
||||
// ⚠️ A MATEMÁTICA PERFEITA (tem de somar 1.00)
|
||||
float barWidth = 0.35f;
|
||||
float barSpace = 0.05f;
|
||||
float groupSpace = 0.20f;
|
||||
@@ -257,21 +264,16 @@ public class GraficosFragment extends Fragment {
|
||||
data.setBarWidth(barWidth);
|
||||
barChartOrcamento.setData(data);
|
||||
|
||||
// ⚠️ COMEÇA NO 0 PARA ALINHAR AO CENTRO
|
||||
barChartOrcamento.groupBars(0f, groupSpace, barSpace);
|
||||
|
||||
XAxis xAxis = barChartOrcamento.getXAxis();
|
||||
xAxis.setValueFormatter(new IndexAxisValueFormatter(categorias));
|
||||
|
||||
// ⚠️ LIMITES DINÂMICOS PARA ENCAIXAR OS GRUPOS TODOS
|
||||
xAxis.setAxisMinimum(0f);
|
||||
xAxis.setAxisMaximum(barChartOrcamento.getBarData().getGroupWidth(groupSpace, barSpace) * categorias.size());
|
||||
|
||||
// Para não ficar tudo esmagado se tiveres muitas categorias, mete limite visível a 4
|
||||
barChartOrcamento.setVisibleXRangeMaximum(4);
|
||||
|
||||
barChartOrcamento.animateY(1000);
|
||||
barChartOrcamento.invalidate(); // Refresca o gráfico
|
||||
barChartOrcamento.animateY(1200);
|
||||
barChartOrcamento.invalidate();
|
||||
}
|
||||
|
||||
private void desenharBarChartTendencia(float receitas, float despesas) {
|
||||
@@ -284,16 +286,15 @@ public class GraficosFragment extends Fragment {
|
||||
receitaEntry.add(new BarEntry(0, receitas));
|
||||
|
||||
BarDataSet setDespesas = new BarDataSet(despesaEntry, "Despesas");
|
||||
setDespesas.setColor(Color.parseColor("#FF1744"));
|
||||
setDespesas.setColor(Color.parseColor("#FF1744")); // Red Tech
|
||||
setDespesas.setValueTextColor(corTextoDinamica);
|
||||
|
||||
BarDataSet setReceitas = new BarDataSet(receitaEntry, "Receitas");
|
||||
setReceitas.setColor(Color.parseColor("#00E676"));
|
||||
setReceitas.setColor(Color.parseColor("#00E676")); // Green Emerald
|
||||
setReceitas.setValueTextColor(corTextoDinamica);
|
||||
|
||||
BarData data = new BarData(setDespesas, setReceitas);
|
||||
|
||||
// ⚠️ MATEMÁTICA PERFEITA PARA A TENDÊNCIA
|
||||
float groupSpace = 0.3f;
|
||||
float barSpace = 0.05f;
|
||||
float barWidth = 0.3f;
|
||||
@@ -301,36 +302,39 @@ public class GraficosFragment extends Fragment {
|
||||
data.setBarWidth(barWidth);
|
||||
barChartTendencia.setData(data);
|
||||
|
||||
// ⚠️ COMEÇA NO 0 TAMBÉM
|
||||
barChartTendencia.groupBars(0f, groupSpace, barSpace);
|
||||
|
||||
ArrayList<String> labelMes = new ArrayList<>();
|
||||
labelMes.add("Atual");
|
||||
labelMes.add("Mês Atual");
|
||||
|
||||
XAxis xAxis = barChartTendencia.getXAxis();
|
||||
xAxis.setValueFormatter(new IndexAxisValueFormatter(labelMes));
|
||||
|
||||
// ⚠️ COMO É SÓ 1 GRUPO, O MÁXIMO É 1
|
||||
xAxis.setAxisMinimum(0f);
|
||||
xAxis.setAxisMaximum(1f);
|
||||
|
||||
barChartTendencia.animateY(1000);
|
||||
barChartTendencia.animateY(1200);
|
||||
barChartTendencia.invalidate();
|
||||
}
|
||||
|
||||
private void configurarEstiloBarChart(BarChart chart) {
|
||||
chart.getDescription().setEnabled(false);
|
||||
|
||||
chart.getLegend().setTextColor(corTextoDinamica);
|
||||
chart.getAxisRight().setEnabled(false);
|
||||
chart.getLegend().setForm(com.github.mikephil.charting.components.Legend.LegendForm.CIRCLE); // Ícones redondos na legenda
|
||||
|
||||
chart.getAxisRight().setEnabled(false); // Desliga eixo direito
|
||||
|
||||
chart.getAxisLeft().setTextColor(corTextoDinamica);
|
||||
chart.getAxisLeft().setDrawGridLines(true);
|
||||
chart.getAxisLeft().setGridColor(Color.LTGRAY);
|
||||
chart.getAxisLeft().setGridColor(corGridSubtil); // Grelha muito subtil e tecnológica
|
||||
chart.getAxisLeft().setAxisLineColor(Color.TRANSPARENT); // Remove linha forte do eixo Y
|
||||
|
||||
XAxis xAxis = chart.getXAxis();
|
||||
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
|
||||
xAxis.setTextColor(corTextoDinamica);
|
||||
xAxis.setDrawGridLines(false);
|
||||
xAxis.setDrawGridLines(false); // Remove grelha feia vertical
|
||||
xAxis.setAxisLineColor(corGridSubtil);
|
||||
xAxis.setGranularity(1f);
|
||||
xAxis.setCenterAxisLabels(true);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
@@ -52,7 +51,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
private ViewPager2 viewPager;
|
||||
private FloatingActionButton fabAdicionar;
|
||||
private TextView tvNomeUsuario;
|
||||
private Button btnSair;
|
||||
|
||||
private TextView tvSaldoGeral, tvReceitasGeral, tvDespesasGeral;
|
||||
private JSONArray listaTransacoesGlobal;
|
||||
@@ -76,7 +74,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
viewPager = findViewById(R.id.viewPager);
|
||||
fabAdicionar = findViewById(R.id.fabAdicionar);
|
||||
tvNomeUsuario = findViewById(R.id.tvNomeUsuario);
|
||||
btnSair = findViewById(R.id.btnSair);
|
||||
|
||||
tvSaldoGeral = findViewById(R.id.tvSaldoGeral);
|
||||
tvReceitasGeral = findViewById(R.id.tvReceitasGeral);
|
||||
@@ -86,8 +83,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
String nome = prefs.getString("nome_usuario", "Investidor");
|
||||
tvNomeUsuario.setText("Olá, " + nome);
|
||||
|
||||
btnSair.setOnClickListener(v -> finishAffinity());
|
||||
|
||||
fabAdicionar.setOnClickListener(v -> startActivity(new Intent(this, AdicionarTransacaoActivity.class)));
|
||||
|
||||
ImageView btnAbrirDefinicoes = findViewById(R.id.btnAbrirDefinicoes);
|
||||
|
||||
10
app/src/main/res/drawable/ic_bell.xml
Normal file
10
app/src/main/res/drawable/ic_bell.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.9,2 2,2zM18,16v-5c0,-3.07 -1.63,-5.64 -4.5,-6.32V4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.64,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_chevron_right.xml
Normal file
10
app/src/main/res/drawable/ic_chevron_right.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_delete_forever.xml
Normal file
10
app/src/main/res/drawable/ic_delete_forever.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4zM9,9c-0.55,0 -1,0.45 -1,1v8c0,0.55 0.45,1 1,1s1,-0.45 1,-1v-8c0,-0.55 -0.45,-1 -1,-1zM15,9c-0.55,0 -1,0.45 -1,1v8c0,0.55 0.45,1 1,1s1,-0.45 1,-1v-8c0,-0.55 -0.45,-1 -1,-1z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_edit_profile.xml
Normal file
10
app/src/main/res/drawable/ic_edit_profile.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_fingerprint.xml
Normal file
10
app/src/main/res/drawable/ic_fingerprint.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M17.81,4.47c-0.08,0 -0.16,-0.02 -0.23,-0.06C15.66,3.42 14,3 12.01,3c-1.98,0 -3.86,0.47 -5.57,1.41 -0.24,0.13 -0.54,0.04 -0.68,-0.2s-0.04,-0.55 0.2,-0.68C7.82,2.52 9.86,2 12.01,2c2.13,0 4.13,0.46 5.93,1.36 0.24,0.12 0.35,0.42 0.22,0.66 -0.09,0.16 -0.26,0.25 -0.35,0.25zM3.19,9.45c-0.2,0 -0.39,-0.12 -0.47,-0.32 -0.1,-0.26 0.03,-0.55 0.29,-0.65 1.63,-0.62 3.32,-0.98 5.03,-1.07 0.27,-0.02 0.51,0.19 0.53,0.46 0.02,0.27 -0.19,0.51 -0.46,0.53 -1.59,0.08 -3.16,0.42 -4.68,0.99 -0.08,0.03 -0.16,0.06 -0.24,0.06zM20.12,12.01c0,-0.27 0.22,-0.49 0.49,-0.49 1.13,0 2.11,-0.31 2.92,-0.91 0.22,-0.17 0.52,-0.13 0.69,0.09s0.13,0.52 -0.09,0.69c-1,0.75 -2.23,1.13 -3.52,1.13 -0.27,0.01 -0.49,-0.21 -0.49,-0.48zM2.51,15.11c0,-0.27 0.22,-0.49 0.49,-0.49 0.33,0 0.65,-0.03 0.96,-0.08 0.27,-0.04 0.52,0.14 0.56,0.41 0.04,0.27 -0.14,0.52 -0.41,0.56 -0.44,0.06 -0.89,0.1 -1.35,0.1 -0.28,0 -0.5,-0.22 -0.5,-0.5zM12,22c-0.27,0 -0.49,-0.22 -0.49,-0.49v-4.02c0,-0.27 0.22,-0.49 0.49,-0.49s0.49,0.22 0.49,0.49v4.02C12.49,21.78 12.27,22 12,22zM19.07,20.21c-0.12,0 -0.25,-0.05 -0.34,-0.14 -1.4,-1.4 -2.17,-3.26 -2.17,-5.23 0,-1.71 0.61,-3.2 1.77,-4.31 0.2,-0.19 0.51,-0.18 0.7,0.02s0.18,0.51 -0.02,0.7c-0.93,0.89 -1.41,2.08 -1.41,3.58 0,1.72 0.67,3.34 1.84,4.5 0.19,0.19 0.19,0.51 0,0.7 -0.1,0.1 -0.24,0.18 -0.37,0.18zM15,20.08c-0.12,0 -0.24,-0.04 -0.34,-0.13 -2.22,-2.11 -3.45,-5 -3.45,-8.11 0,-1.4 0.27,-2.72 0.81,-3.93 0.11,-0.25 0.41,-0.36 0.66,-0.25 0.25,0.11 0.36,0.41 0.25,0.66 -0.47,1.06 -0.7,2.2 -0.7,3.52 0,2.83 1.11,5.43 3.12,7.34 0.2,0.19 0.21,0.51 0.02,0.7 -0.1,0.11 -0.24,0.2 -0.37,0.2zM8.31,21.31c-0.19,0 -0.37,-0.11 -0.45,-0.29C6.39,17.9 6,15 6,12c0,-1.82 0.3,-3.57 0.91,-5.21 0.09,-0.26 0.38,-0.39 0.64,-0.3 0.26,0.09 0.39,0.38 0.3,0.64C7.3,8.62 7,10.27 7,12c0,2.83 0.36,5.55 1.77,8.62 0.12,0.25 0.01,0.55 -0.24,0.66 -0.07,0.02 -0.15,0.03 -0.22,0.03zM5,12c0,-3.2 0.94,-6.17 2.58,-8.66 0.15,-0.23 0.46,-0.29 0.69,-0.14 0.23,0.15 0.29,0.46 0.14,0.69C6.91,6.17 6,8.99 6,12c0,2.1 0.22,4.14 0.64,6.09 0.06,0.27 -0.11,0.53 -0.38,0.59 -0.26,0.07 -0.53,-0.11 -0.59,-0.38C5.24,16.2 5,14.12 5,12z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_lock.xml
Normal file
10
app/src/main/res/drawable/ic_lock.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M18,8h-1V6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2H6c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V10C20,8.9 19.1,8 18,8zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2H9V6zM18,20H6V10h12V20zM12,17c1.1,0 2,-0.9 2,-2c0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2C10,16.1 10.9,17 12,17z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_logout.xml
Normal file
10
app/src/main/res/drawable/ic_logout.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M17,7l-1.41,1.41L18.17,11H8v2h10.17l-2.58,2.58L17,17l5,-5L17,7zM4,5h8V3H4C2.9,3 2,3.9 2,5v14c0,1.1 0.9,2 2,2h8v-2H4V5z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_moon.xml
Normal file
10
app/src/main/res/drawable/ic_moon.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12.3,13.25a3.75,3.75 0,0 1,3.45 -2.47c0.56,0 1.09,0.12 1.56,0.35a9.24,9.24 0,0 1,0.06 1.12c0,5.09 -4.13,9.25 -9.25,9.25 -2.1,0 -4.03,-0.69 -5.59,-1.86a9.27,9.27 0,0 1,-0.12 -1.13c0,-5.09 4.13,-9.25 9.25,-9.25 1.1,0 2.15,0.19 3.12,0.54a3.75,3.75 0,0 1,-0.17 0.96a3.75,3.75 0,0 1,-2.3 2.5z"/>
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_support.xml
Normal file
10
app/src/main/res/drawable/ic_support.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#000000">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,2h-4.18C14.4,0.84 13.3,0 12,0S9.6,0.84 9.18,2H5C3.9,2 3,2.9 3,4v16c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2V4C21,2.9 20.1,2 19,2zM12,2c0.55,0 1,0.45 1,1s-0.45,1 -1,1s-1,-0.45 -1,-1S11.45,2 12,2zM14,14h-4v-2h4V14zM16,10H8V8h8V10z"/>
|
||||
</vector>
|
||||
153
app/src/main/res/layout/activity_alterar_password.xml
Normal file
153
app/src/main/res/layout/activity_alterar_password.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/fundo_app"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnVoltarPassword"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/ic_arrow_back"
|
||||
app:tint="@color/texto_principal"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Segurança"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/ic_lock"
|
||||
app:tint="@color/tech_accent_cyan"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="Muda a tua palavra-passe regularmente para manteres a tua conta Finzora segura."
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="32dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Palavra-passe Atual"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="24dp">
|
||||
<EditText
|
||||
android:id="@+id/editPasswordAtual"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:padding="16dp"
|
||||
android:hint="••••••••"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:inputType="textPassword"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Nova Palavra-passe"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<EditText
|
||||
android:id="@+id/editPasswordNova"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:padding="16dp"
|
||||
android:hint="Pelo menos 6 caracteres"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:inputType="textPassword"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="32dp">
|
||||
<EditText
|
||||
android:id="@+id/editPasswordConfirmar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:padding="16dp"
|
||||
android:hint="Repetir nova palavra-passe"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:inputType="textPassword"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnGuardarPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="Atualizar Palavra-passe"
|
||||
android:textColor="@color/texto_dinamico"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
app:backgroundTint="@color/tech_accent_cyan" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -1,117 +1,352 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:background="@color/fundo_app">
|
||||
android:background="@color/fundo_app"
|
||||
tools:context=".DefinicoesActivity">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbarDefinicoes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/fundo_app"
|
||||
android:elevation="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_arrow_back"
|
||||
app:title="Definições"
|
||||
app:titleTextColor="@color/texto_principal" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:fillViewport="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/buttonContainer"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbarDefinicoes">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="A Tua Conta"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemEditarPerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_edit_profile"
|
||||
app:tint="@color/texto_principal" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Editar Perfil"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Alterar nome, email..."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/ic_chevron_right"
|
||||
app:tint="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="Preferências e Segurança"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_moon"
|
||||
app:tint="@color/texto_principal" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_weight="1"
|
||||
android:text="Modo Escuro"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/switchModoEscuro"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:thumbTint="@color/tech_accent_cyan"
|
||||
app:trackTint="@color/tech_accent_cyan" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/linha_separadora" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_fingerprint"
|
||||
app:tint="@color/texto_principal" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_weight="1"
|
||||
android:text="Bloqueio Biométrico"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/switchBiometria"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:thumbTint="@color/tech_accent_cyan"
|
||||
app:trackTint="@color/tech_accent_cyan" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/linha_separadora" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_bell"
|
||||
app:tint="@color/texto_principal" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_weight="1"
|
||||
android:text="Ativar Notificações"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/switchNotificacoes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:thumbTint="@color/tech_accent_cyan"
|
||||
app:trackTint="@color/tech_accent_cyan" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="Ajuda"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemCentroSuporte"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_support"
|
||||
app:tint="@color/texto_principal" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_weight="1"
|
||||
android:text="Centro de Suporte"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/ic_chevron_right"
|
||||
app:tint="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttonContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="32dp">
|
||||
android:background="@color/fundo_app"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnVoltarDefinicoes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="←"
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@color/linha_separadora" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnTerminarSessao"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="Terminar Sessão"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="32sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingEnd="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
app:cornerRadius="16dp"
|
||||
app:icon="@drawable/ic_logout"
|
||||
app:iconGravity="textStart"
|
||||
app:iconTint="@color/texto_principal"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Definições"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnApagarConta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="Apagar Conta e Dados"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:backgroundTint="@color/tech_accent_red"
|
||||
app:cornerRadius="16dp"
|
||||
app:icon="@drawable/ic_delete_forever"
|
||||
app:iconGravity="textStart"
|
||||
app:iconTint="@color/white"
|
||||
app:rippleColor="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnEditarPerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Editar Perfil"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:paddingVertical="16dp"
|
||||
android:background="?attr/selectableItemBackground"/>
|
||||
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/linha_separadora" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchModoEscuro"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Modo Escuro"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:paddingVertical="16dp" />
|
||||
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/linha_separadora" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchBiometria"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Bloqueio por Biometria"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:paddingVertical="16dp" />
|
||||
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/linha_separadora" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchNotificacoes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ativar Notificações"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:paddingVertical="16dp" />
|
||||
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/linha_separadora" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnSuporte"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Centro de Suporte"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:paddingVertical="16dp"
|
||||
android:background="?attr/selectableItemBackground"/>
|
||||
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/linha_separadora" android:layout_marginBottom="32dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTerminarSessao"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Terminar Sessão"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textStyle="bold"
|
||||
android:padding="16dp"
|
||||
app:cornerRadius="8dp"
|
||||
android:backgroundTint="#424242" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnEliminarConta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Apagar Conta e Dados"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textStyle="bold"
|
||||
android:padding="16dp"
|
||||
android:layout_marginTop="12dp"
|
||||
app:cornerRadius="8dp"
|
||||
android:backgroundTint="#FF1744" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,96 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:background="@color/bg_dinamico">
|
||||
android:background="@color/fundo_app"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="40dp">
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnVoltarEditarPerfil"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnVoltarEditarPerfil"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:src="@drawable/ic_arrow_back"
|
||||
app:tint="@color/texto_principal"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Editar Perfil"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="←"
|
||||
android:textColor="@color/texto_dinamico"
|
||||
android:textSize="32sp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgFotoPerfil"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bg_circle_icon"
|
||||
android:src="@android:drawable/ic_menu_camera"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:background="@drawable/bg_circle_icon"
|
||||
android:backgroundTint="@color/tech_accent_cyan"
|
||||
android:src="@android:drawable/ic_menu_camera"
|
||||
android:padding="8dp"
|
||||
app:tint="@color/texto_dinamico"
|
||||
android:elevation="4dp"/>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Dados Pessoais"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingEnd="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"/>
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<EditText
|
||||
android:id="@+id/editNomePerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:padding="16dp"
|
||||
android:hint="O teu nome"
|
||||
android:textColorHint="@color/text_secondary"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<EditText
|
||||
android:id="@+id/editEmailPerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:padding="16dp"
|
||||
android:hint="O teu email"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:inputType="textEmailAddress"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="32dp">
|
||||
<EditText
|
||||
android:id="@+id/editTelemovelPerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:padding="16dp"
|
||||
android:hint="Telemóvel (Opcional)"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:inputType="phone"/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Editar Perfil"
|
||||
android:text="Segurança"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnAlterarPassword"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:text="Alterar Palavra-passe"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="12dp"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnGuardarPerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="Guardar Alterações"
|
||||
android:textColor="@color/texto_dinamico"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"/>
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="16dp"
|
||||
app:backgroundTint="@color/tech_accent_cyan" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgFotoPerfil"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/bg_circle_icon"
|
||||
android:src="@android:drawable/ic_menu_camera"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginBottom="32dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Nome"
|
||||
android:textColor="@color/texto_dinamico"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editNomePerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#2D3748"
|
||||
android:textColor="#FFFFFF"
|
||||
android:padding="16dp"
|
||||
android:hint="O teu nome"
|
||||
android:textColorHint="#718096"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Email"
|
||||
android:textColor="@color/texto_dinamico"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editEmailPerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#2D3748"
|
||||
android:textColor="#FFFFFF"
|
||||
android:padding="16dp"
|
||||
android:hint="O teu email"
|
||||
android:textColorHint="#718096"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_marginBottom="40dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnGuardarPerfil"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Guardar Alterações"
|
||||
android:textColor="#1A202C"
|
||||
android:textStyle="bold"
|
||||
android:padding="16dp"
|
||||
app:cornerRadius="8dp"
|
||||
android:backgroundTint="#00E676" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -11,38 +11,40 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="20dp">
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgLogo"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/bg_circle_icon"
|
||||
android:padding="8dp"
|
||||
android:backgroundTint="@color/tech_accent_cyan"
|
||||
android:padding="12dp"
|
||||
android:src="@android:drawable/ic_menu_gallery"
|
||||
app:tint="@color/white"
|
||||
android:scaleType="centerCrop" />
|
||||
app:tint="#1A202C" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_toEndOf="@id/imgLogo"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="12dp">
|
||||
android:layout_marginStart="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="FINZORA"
|
||||
android:textColor="@color/tech_accent_cyan"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"/>
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:letterSpacing="0.1"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNomeUsuario"
|
||||
@@ -50,52 +52,40 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Olá, Investidor"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="14sp"/>
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnAbrirDefinicoes"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_toStartOf="@id/btnExportarPDF"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:src="@drawable/ic_settings_pap"
|
||||
app:tint="@color/tech_accent_cyan"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Definições" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnExportarPDF"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_toStartOf="@id/btnSair"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:padding="10dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@android:drawable/ic_menu_save"
|
||||
app:tint="@color/tech_accent_cyan"
|
||||
app:tint="@color/texto_principal"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Exportar Relatório" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSair"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Sair"
|
||||
android:textColor="#FFFFFF"
|
||||
android:backgroundTint="#FF1744"
|
||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||
app:cornerRadius="8dp"/>
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/btnAbrirDefinicoes"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_settings_pap"
|
||||
app:tint="@color/texto_principal"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Definições" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:clipToPadding="false">
|
||||
android:paddingStart="24dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:clipToPadding="false"
|
||||
android:scrollbars="none">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -110,18 +100,21 @@
|
||||
android:id="@+id/tabLayoutDashboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:tabTextColor="@color/texto_principal"
|
||||
app:tabTextColor="@color/text_secondary"
|
||||
app:tabSelectedTextColor="@color/tech_accent_cyan"
|
||||
app:tabIndicatorColor="@color/tech_accent_cyan"
|
||||
app:tabMode="scrollable"/>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"/>
|
||||
app:tabIndicatorHeight="3dp"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabGravity="fill"
|
||||
app:tabMode="scrollable"/> <androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="8dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
@@ -132,7 +125,9 @@
|
||||
android:layout_margin="24dp"
|
||||
android:src="@android:drawable/ic_input_add"
|
||||
app:backgroundTint="@color/tech_accent_cyan"
|
||||
app:tint="@color/black"
|
||||
app:elevation="6dp"/>
|
||||
app:tint="#1A202C"
|
||||
app:elevation="4dp"
|
||||
app:fabSize="normal"
|
||||
android:contentDescription="Adicionar Transação"/>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -1,313 +1,324 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/windowBackground">
|
||||
android:background="@color/fundo_app"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutEstadoVazioDicas"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="📊"
|
||||
android:textSize="60sp" />
|
||||
android:text="Conselheiro Inteligente"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Sem dados para analisar"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="32dp"
|
||||
android:text="Adiciona transações para receberes conselhos da nossa Inteligência Artificial."
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/layoutConteudoDicas"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:padding="16dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🤖 Finzora AI Coach"
|
||||
android:textColor="@color/tech_accent_cyan"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRespostaAI"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Olá! Já analisei os teus dados. Pergunta-me qualquer coisa sobre como poupar ou investir."
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_search_bar"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="4dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editPerguntaAI"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="Pede uma dica tática..."
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textColorHint="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnEnviarAI"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@android:drawable/ic_menu_send"
|
||||
app:tint="@color/tech_accent_cyan" />
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pbCarregandoAI"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Taxa de Poupança"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/tvTaxaPoupanca"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0%"
|
||||
android:textColor="#00E676"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressPoupanca"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#00E676" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tvDicasReceitas"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="€ 0.00"
|
||||
android:textColor="#00E676"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/tvDicasDespesas"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="€ 0.00"
|
||||
android:textColor="#FF1744"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTituloDica1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="A Regra 50/30/20 ⚖️"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/tvDescDica1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="A calcular a tua distribuição de riqueza..."
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTituloDica2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Radar de Orçamentos 🎯"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/tvDescDica2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="A verificar limites..."
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTituloDica3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ritmo de Gastos 🏃♂️"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
<TextView
|
||||
android:id="@+id/tvDescDica3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="A calcular a tua velocidade de gastos..."
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Top Despesas"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeColor="@color/tech_accent_cyan"
|
||||
app:strokeWidth="1dp"
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutDistribuicao"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_support"
|
||||
app:tint="@color/tech_accent_cyan" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Finzora AI Coach"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="8dp"/>
|
||||
|
||||
<View android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:src="@drawable/bg_circle_icon"
|
||||
app:tint="#00E676"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRespostaAI"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Olá! Já analisei os teus dados de hoje. Pergunta-me qualquer coisa sobre como otimizar o teu dinheiro."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_search_bar"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="12dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editPerguntaAI"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="Pede uma dica tática..."
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnEnviarAI"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_send"
|
||||
app:tint="@color/tech_accent_cyan"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Diagnóstico da Máquina"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Taxa de Poupança"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<View android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaxaPoupancaValor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0.0%"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressPoupanca"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#00E676"
|
||||
android:progressBackgroundTint="@color/linha_separadora"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tvReceitasResumo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="€ 0.00"
|
||||
android:textColor="#00E676"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"/>
|
||||
<View android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1"/>
|
||||
<TextView
|
||||
android:id="@+id/tvDespesasResumo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="€ 0.00"
|
||||
android:textColor="#FF1744"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTituloDica1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="A calcular..."
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDescDica1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Aguarde enquanto analisamos os teus movimentos."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:lineSpacingExtra="4dp"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTituloDica2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="A calcular..."
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDescDica2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="A analisar limites estabelecidos..."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:lineSpacingExtra="4dp"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTituloDica3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="A calcular..."
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDescDica3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="A prever gastos até ao fim do mês..."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:lineSpacingExtra="4dp"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Top Despesas"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutDistribuicao"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="20dp">
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -3,111 +3,170 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_dinamico">
|
||||
android:background="@color/fundo_app">
|
||||
|
||||
<ScrollView
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scrollviewGraficos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Terminal de Análise"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Distribuição de Despesas"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_compass"
|
||||
app:tint="@color/tech_accent_cyan" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="Distribuição de Despesas"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.github.mikephil.charting.charts.PieChart
|
||||
android:id="@+id/pieChartDespesas"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Orçamento vs Gasto"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_sort_by_size"
|
||||
app:tint="@color/tech_accent_cyan" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="Orçamento vs Gasto Real"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.github.mikephil.charting.charts.BarChart
|
||||
android:id="@+id/barChartOrcamento"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"/>
|
||||
android:layout_height="280dp"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginBottom="80dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Tendência de Gastos"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_month"
|
||||
app:tint="@color/tech_accent_cyan" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="Balanço (Tendência)"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.github.mikephil.charting.charts.BarChart
|
||||
android:id="@+id/barChartTendencia"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"/>
|
||||
android:layout_height="250dp"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutEstadoVazioGraficos"
|
||||
@@ -116,32 +175,32 @@
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:padding="32dp">
|
||||
android:padding="40dp">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="250dp"
|
||||
app:lottie_rawRes="@raw/anim_grafico_vazio"
|
||||
app:lottie_autoPlay="true"
|
||||
app:lottie_loop="true"/>
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@android:drawable/ic_menu_sort_by_size"
|
||||
app:tint="@color/text_secondary"
|
||||
android:alpha="0.3"
|
||||
android:layout_marginBottom="24dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="À espera de dados! 📊"
|
||||
android:text="Terminal inativo"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:layout_marginTop="16dp"/>
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Regista as tuas primeiras transações para veres a magia dos gráficos acontecer."
|
||||
android:textSize="15sp"
|
||||
android:text="A aguardar a introdução de dados financeiros para gerar análises e projeções."
|
||||
android:textSize="14sp"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginTop="8dp"/>
|
||||
android:textColor="@color/text_secondary"/>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -3,18 +3,17 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_dinamico">
|
||||
android:background="@color/fundo_app">
|
||||
|
||||
<!-- Lista onde vão aparecer os Cofres -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerObjetivos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="80dp"/>
|
||||
android:paddingBottom="100dp"/>
|
||||
|
||||
<!-- Mensagem quando não há objetivos -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutObjetivosVazios"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -22,25 +21,35 @@
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
android:padding="32dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@drawable/ic_lazer"
|
||||
app:tint="#A0AEC0"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
app:tint="@color/text_secondary"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:alpha="0.4"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sem objetivos definidos."
|
||||
android:textColor="#A0AEC0"
|
||||
android:textSize="16sp"
|
||||
android:text="Sem objetivos definidos"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cria o teu primeiro cofre financeiro e começa a poupar para os teus sonhos."
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="14sp"
|
||||
android:textAlignment="center"
|
||||
android:layout_marginTop="8dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Botão de Adicionar Objetivo -->
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabAdicionarObjetivo"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -49,8 +58,8 @@
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="24dp"
|
||||
android:src="@android:drawable/ic_input_add"
|
||||
app:tint="#FFFFFF"
|
||||
app:backgroundTint="#00B8D4"
|
||||
app:elevation="6dp"/>
|
||||
app:tint="#1A202C"
|
||||
app:backgroundTint="@color/tech_accent_cyan"
|
||||
app:elevation="4dp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -4,31 +4,34 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:padding="16dp">
|
||||
android:background="@color/fundo_app"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Planeamento de Orçamento"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:text="Planeamento Estratégico"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp"
|
||||
android:layout_marginBottom="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -41,79 +44,86 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginEnd="8dp">
|
||||
android:layout_marginEnd="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Categoria"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCategoriaOrcamento"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="Selecionar..."
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="14sp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:background="@drawable/bg_coach_input_rect" />
|
||||
android:paddingHorizontal="16dp"
|
||||
android:background="@drawable/bg_search_bar" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="8dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Limite (€)"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginBottom="4dp"/>
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editLimiteOrcamento"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:hint="0.00"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textColorHint="?android:attr/textColorSecondary"
|
||||
android:inputType="numberDecimal"
|
||||
android:backgroundTint="@color/tech_accent_cyan"
|
||||
android:paddingStart="4dp"
|
||||
android:textSize="16sp" />
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/bg_search_bar"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="12dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editLimiteOrcamento"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:hint="0.00"
|
||||
android:background="@android:color/transparent"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:inputType="numberDecimal"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDefinirOrcamento"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:text="Definir Orçamento"
|
||||
android:textColor="#1A202C"
|
||||
android:layout_height="56dp"
|
||||
android:text="Ativar Orçamento"
|
||||
android:textColor="@color/texto_dinamico"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cornerRadius="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:cornerRadius="16dp"
|
||||
app:backgroundTint="@color/tech_accent_cyan" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Orçamentos Ativos"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -123,7 +133,9 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerOrcamentos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="80dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutEstadoVazioOrcamento"
|
||||
@@ -132,33 +144,32 @@
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:padding="16dp">
|
||||
android:padding="32dp">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
app:lottie_rawRes="@raw/anim_vazio"
|
||||
app:lottie_autoPlay="true"
|
||||
app:lottie_loop="true"/>
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:src="@drawable/ic_alimentacao"
|
||||
app:tint="@color/text_secondary"
|
||||
android:alpha="0.3"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sem limites definidos!"
|
||||
android:textSize="16sp"
|
||||
android:text="Sem limites definidos"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:layout_marginTop="8dp"/>
|
||||
android:textColor="@color/texto_principal"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Usa o cartão acima para definir objetivos."
|
||||
android:text="Usa o painel acima para definir limites de gastos por categoria."
|
||||
android:textSize="14sp"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:layout_marginTop="4dp"/>
|
||||
android:textColor="@color/text_secondary"/>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@@ -4,38 +4,45 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/bg_dinamico">
|
||||
android:background="@color/fundo_app">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/bg_search_bar"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:gravity="center_vertical">
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@android:drawable/ic_menu_search"
|
||||
app:tint="#A0AEC0" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editPesquisar"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="Pesquisar transação..."
|
||||
android:textColorHint="#718096"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="14sp"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"/>
|
||||
</LinearLayout>
|
||||
android:orientation="horizontal"
|
||||
android:padding="12dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@android:drawable/ic_menu_search"
|
||||
app:tint="@color/text_secondary" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editPesquisar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="Pesquisar transação..."
|
||||
android:textColorHint="@color/text_secondary"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="14sp"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -80,7 +87,7 @@
|
||||
android:text="Clica no botão + para começares a registar os teus movimentos."
|
||||
android:textSize="14sp"
|
||||
android:textAlignment="center"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginTop="8dp"/>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/cardObjetivo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating">
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -17,74 +19,74 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgIconeObjetivo"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/bg_circle_icon"
|
||||
android:src="@drawable/ic_lazer"
|
||||
app:tint="#00B8D4" />
|
||||
android:padding="8dp"
|
||||
app:tint="@color/tech_accent_cyan" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNomeObjetivo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_toEndOf="@id/imgIconeObjetivo"
|
||||
android:layout_toStartOf="@id/layoutBotoesAcao"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="Nome do Objetivo"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- Zona dos Botões de Ação -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutBotoesAcao"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- ✏️ Novo Botão Editar -->
|
||||
<ImageView
|
||||
android:id="@+id/btnEditarObjetivo"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:padding="4dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@android:drawable/ic_menu_edit"
|
||||
app:tint="#ECC94B" />
|
||||
app:tint="@color/text_secondary" />
|
||||
|
||||
<!-- 🗑️ Botão Eliminar -->
|
||||
<ImageView
|
||||
android:id="@+id/btnEliminarObjetivo"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:padding="4dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@android:drawable/ic_menu_delete"
|
||||
app:tint="#F56565" />
|
||||
app:tint="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvValoresObjetivo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="Guardado: € 0.00 / Alvo: € 0.00"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="14sp" />
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="13sp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:letterSpacing="0.02"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -92,20 +94,22 @@
|
||||
android:id="@+id/progressObjetivo"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_height="6dp"
|
||||
android:layout_weight="1"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#00B8D4" />
|
||||
android:progressTint="@color/tech_accent_cyan"
|
||||
android:progressBackgroundTint="@color/linha_separadora" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPercentagemObjetivo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="0%"
|
||||
android:textColor="#00B8D4"
|
||||
android:textColor="@color/tech_accent_cyan"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -1,19 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="8dp"
|
||||
app:cardBackgroundColor="?android:attr/colorBackgroundFloating"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp">
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/fundo_cartao"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeColor="@color/linha_separadora"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -25,6 +26,8 @@
|
||||
android:id="@+id/imgIconeOrcamento"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/bg_circle_icon"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_alimentacao"
|
||||
app:tint="@color/tech_accent_cyan" />
|
||||
|
||||
@@ -33,20 +36,21 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="Alimentação"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/texto_principal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnEliminarOrcamento"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:padding="4dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@android:drawable/ic_menu_delete"
|
||||
app:tint="#F56565" />
|
||||
app:tint="@color/text_secondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPercentagemOrcamento"
|
||||
@@ -54,6 +58,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="75%"
|
||||
android:textColor="@color/tech_accent_cyan"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -61,19 +66,22 @@
|
||||
android:id="@+id/progressOrcamento"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_height="6dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:progress="75"
|
||||
android:progressDrawable="@drawable/custom_progress_bar" />
|
||||
android:progressTint="@color/tech_accent_cyan"
|
||||
android:progressBackgroundTint="@color/linha_separadora" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvValoresOrcamento"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Gasto: € 150.00 / Limite: € 200.00"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:letterSpacing="0.02"
|
||||
android:textAlignment="viewEnd" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
Reference in New Issue
Block a user