Compare commits
9 Commits
0ec7f48bc2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d112cd50d7 | |||
| 44a84f96b8 | |||
| 79322f3632 | |||
| 5b3018afbb | |||
| 055e132cfc | |||
| 5c77a989a0 | |||
| 1fde21a1b6 | |||
| c94631fc2b | |||
| 6a7aa4aecb |
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
LifeGrid
|
||||
@@ -13,35 +13,6 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.LifeGrid">
|
||||
<activity
|
||||
android:name=".NovaTransacao"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.NovaTranscao"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/title_activity_main"
|
||||
android:theme="@style/Theme.LifeGrid">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".TelaInicialActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -91,10 +91,10 @@ public class LoginActivity extends AppCompatActivity {
|
||||
loadingProgressBar = findViewById(R.id.loadingProgressBar);
|
||||
|
||||
FirebaseApp.initializeApp(this);
|
||||
firebaseAuth = FirebaseAuth.getInstance();
|
||||
mAuth = FirebaseAuth.getInstance();
|
||||
credentialManager = CredentialManager.create(getBaseContext());
|
||||
|
||||
|
||||
loginButton.setOnClickListener(v -> validarLogin());
|
||||
googleButton.setOnClickListener(v -> launchCredentialManager());
|
||||
|
||||
@@ -345,5 +345,11 @@ public class LoginActivity extends AppCompatActivity {
|
||||
super.onStart();
|
||||
// Check if user is signed in (non-null) and update UI accordingly.
|
||||
FirebaseUser currentUser = mAuth.getCurrentUser();
|
||||
if (currentUser != null) {
|
||||
Intent intent = new Intent(LoginActivity.this, TelaInicialActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.example.lifegrid;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
@@ -10,6 +11,11 @@ import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.example.lifegrid.menu.AtivosFragment;
|
||||
import com.example.lifegrid.menu.DefinicoesFragment;
|
||||
import com.example.lifegrid.menu.DocumentosFragment;
|
||||
import com.example.lifegrid.menu.GraficosFragment;
|
||||
import com.example.lifegrid.menu.MetasFragment;
|
||||
import com.example.lifegrid.menu.TransacoesFragment;
|
||||
|
||||
public class TelaInicialActivity extends AppCompatActivity {
|
||||
@@ -34,9 +40,52 @@ public class TelaInicialActivity extends AppCompatActivity {
|
||||
return insets;
|
||||
});
|
||||
|
||||
Fragment fragment = new TransacoesFragment();
|
||||
Fragment transacoesFragment2 = new TransacoesFragment();
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fragmentContainerView, fragment)
|
||||
.replace(R.id.fragmentContainerView, transacoesFragment2)
|
||||
.commit();
|
||||
|
||||
ImageView carteiraImageView = findViewById(R.id.carteiraImageView);
|
||||
carteiraImageView.setOnClickListener(v -> {
|
||||
Fragment transacoesFragment = new TransacoesFragment();
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragmentContainerView, transacoesFragment)
|
||||
.commit();
|
||||
});
|
||||
ImageView setaImageView = findViewById(R.id.setaImageView);
|
||||
setaImageView.setOnClickListener(v -> {
|
||||
Fragment ativosFragment = new AtivosFragment();
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragmentContainerView, ativosFragment)
|
||||
.commit();
|
||||
});
|
||||
ImageView graficoImageView = findViewById(R.id.graficoImageView);
|
||||
graficoImageView.setOnClickListener(v -> {
|
||||
Fragment graficosFragment = new GraficosFragment();
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragmentContainerView, graficosFragment)
|
||||
.commit();
|
||||
});
|
||||
ImageView alvoImageView = findViewById(R.id.alvoImageView);
|
||||
alvoImageView.setOnClickListener(v -> {
|
||||
Fragment metasFragment = new MetasFragment();
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragmentContainerView, metasFragment)
|
||||
.commit();
|
||||
});
|
||||
ImageView documentoImageView = findViewById(R.id.documentoImageView);
|
||||
documentoImageView.setOnClickListener(v -> {
|
||||
Fragment documentoFragment = new DocumentosFragment();
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragmentContainerView, documentoFragment)
|
||||
.commit();
|
||||
});
|
||||
ImageView definicoesImageView = findViewById(R.id.definicoesImageView);
|
||||
definicoesImageView.setOnClickListener(v -> {
|
||||
Fragment definicoesFragment = new DefinicoesFragment();
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragmentContainerView, definicoesFragment)
|
||||
.commit();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class AtivosFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View root = inflater.inflate(R.layout.fragment_transacoes, container, false);
|
||||
View root = inflater.inflate(R.layout.fragment_ativos, container, false);
|
||||
|
||||
|
||||
return root;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class DefinicoesFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View root = inflater.inflate(R.layout.fragment_transacoes, container, false);
|
||||
View root = inflater.inflate(R.layout.fragment_definicoes, container, false);
|
||||
|
||||
|
||||
return root;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class DocumentosFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View root = inflater.inflate(R.layout.fragment_transacoes, container, false);
|
||||
View root = inflater.inflate(R.layout.fragment_documentos, container, false);
|
||||
|
||||
|
||||
return root;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class GraficosFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View root = inflater.inflate(R.layout.fragment_transacoes, container, false);
|
||||
View root = inflater.inflate(R.layout.fragment_graficos, container, false);
|
||||
|
||||
|
||||
return root;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class MetasFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View root = inflater.inflate(R.layout.fragment_transacoes, container, false);
|
||||
View root = inflater.inflate(R.layout.fragment_metas, container, false);
|
||||
|
||||
|
||||
return root;
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
android:backgroundTint="@color/preto"
|
||||
tools:context=".TelaInicialActivity">
|
||||
|
||||
<!-- <ScrollView-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:background="@color/cinza">-->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/cinza">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -412,12 +412,12 @@
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragmentContainerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="500dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/barraCardView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<!-- </ScrollView>-->
|
||||
</ScrollView>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/adicionarCardView"
|
||||
android:layout_width="376dp"
|
||||
android:layout_height="412dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="624dp"
|
||||
android:background="@drawable/cardview_background"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user