ja da login cria conta e vai para o menu principal.
parent
2cacb74626
commit
472180e9a7
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DeviceTable">
|
||||||
|
<option name="columnSorters">
|
||||||
|
<list>
|
||||||
|
<ColumnSorterState>
|
||||||
|
<option name="column" value="Name" />
|
||||||
|
<option name="order" value="ASCENDING" />
|
||||||
|
</ColumnSorterState>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "484378399106",
|
||||||
|
"project_id": "pap-findu",
|
||||||
|
"storage_bucket": "pap-findu.firebasestorage.app"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:484378399106:android:af0d3cf9792a6b347e3f9b",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.example.pap_findu"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyD9UEiI214aOpL-bIIDhWhba5ERUMi9IgM"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
package com.example.pap_findu;
|
package com.example.pap_findu;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.activity.EdgeToEdge;
|
import androidx.activity.EdgeToEdge;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
@ -10,6 +17,15 @@ import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
public class CriarConta extends AppCompatActivity {
|
public class CriarConta extends AppCompatActivity {
|
||||||
|
|
||||||
|
private EditText inputFullName;
|
||||||
|
private EditText emailEditText;
|
||||||
|
private EditText passwordEditText;
|
||||||
|
private EditText inputConfirmPassword;
|
||||||
|
private CheckBox checkTerms;
|
||||||
|
private Button btnCreateAccount;
|
||||||
|
private TextView loginLink;
|
||||||
|
private com.google.firebase.auth.FirebaseAuth mAuth;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
@ -20,5 +36,66 @@ public class CriarConta extends AppCompatActivity {
|
||||||
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Initialize views
|
||||||
|
inputFullName = findViewById(R.id.inputFullName);
|
||||||
|
emailEditText = findViewById(R.id.emailEditText);
|
||||||
|
passwordEditText = findViewById(R.id.passwordEditText);
|
||||||
|
inputConfirmPassword = findViewById(R.id.inputConfirmPassword);
|
||||||
|
checkTerms = findViewById(R.id.checkTerms);
|
||||||
|
btnCreateAccount = findViewById(R.id.btnCreateAccount);
|
||||||
|
loginLink = findViewById(R.id.loginLink);
|
||||||
|
|
||||||
|
mAuth = com.google.firebase.auth.FirebaseAuth.getInstance();
|
||||||
|
|
||||||
|
// Set click listener for the create account button
|
||||||
|
btnCreateAccount.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
String fullName = inputFullName.getText().toString();
|
||||||
|
String email = emailEditText.getText().toString();
|
||||||
|
String password = passwordEditText.getText().toString();
|
||||||
|
String confirmPassword = inputConfirmPassword.getText().toString();
|
||||||
|
|
||||||
|
if (fullName.isEmpty() || email.isEmpty() || password.isEmpty() || confirmPassword.isEmpty()) {
|
||||||
|
Toast.makeText(CriarConta.this, "Por favor, preencha todos os campos.", Toast.LENGTH_SHORT).show();
|
||||||
|
} else if (!password.equals(confirmPassword)) {
|
||||||
|
Toast.makeText(CriarConta.this, "As palavras-passe não coincidem.", Toast.LENGTH_SHORT).show();
|
||||||
|
} else if (!checkTerms.isChecked()) {
|
||||||
|
Toast.makeText(CriarConta.this, "Você deve concordar com os Termos de Serviço.", Toast.LENGTH_SHORT).show();
|
||||||
|
} else {
|
||||||
|
mAuth.createUserWithEmailAndPassword(email, password)
|
||||||
|
.addOnCompleteListener(CriarConta.this, new com.google.android.gms.tasks.OnCompleteListener<com.google.firebase.auth.AuthResult>() {
|
||||||
|
@Override
|
||||||
|
public void onComplete(@androidx.annotation.NonNull com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) {
|
||||||
|
if (task.isSuccessful()) {
|
||||||
|
// Sign in success, update UI with the signed-in user's information
|
||||||
|
Toast.makeText(CriarConta.this, "Conta criada com sucesso!", Toast.LENGTH_SHORT).show();
|
||||||
|
com.google.firebase.auth.FirebaseUser user = mAuth.getCurrentUser();
|
||||||
|
// You could save the full name to the database or profile here
|
||||||
|
Intent intent = new Intent(CriarConta.this, MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
// If sign in fails, display a message to the user.
|
||||||
|
Toast.makeText(CriarConta.this, "Falha ao criar conta: " + task.getException().getMessage(),
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set click listener for the login link text
|
||||||
|
loginLink.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
// Navigate back to the login activity
|
||||||
|
Intent intent = new Intent(CriarConta.this, login_activity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12,6 +12,8 @@ import androidx.navigation.ui.NavigationUI;
|
||||||
|
|
||||||
import com.example.pap_findu.databinding.ActivityMainBinding;
|
import com.example.pap_findu.databinding.ActivityMainBinding;
|
||||||
|
|
||||||
|
import androidx.navigation.fragment.NavHostFragment;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private ActivityMainBinding binding;
|
private ActivityMainBinding binding;
|
||||||
|
|
@ -25,9 +27,13 @@ public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
BottomNavigationView navView = binding.navView;
|
BottomNavigationView navView = binding.navView;
|
||||||
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
|
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
|
||||||
R.id.navigation_map, R.id.navigation_zones, R.id.navigation_alerts)
|
R.id.navigation_map, R.id.navigation_zones, R.id.navigation_alerts,
|
||||||
|
R.id.navigation_history, R.id.navigation_profile)
|
||||||
.build();
|
.build();
|
||||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment_activity_main);
|
|
||||||
|
NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager()
|
||||||
|
.findFragmentById(R.id.nav_host_fragment_activity_main);
|
||||||
|
NavController navController = navHostFragment.getNavController();
|
||||||
NavigationUI.setupWithNavController(binding.navView, navController);
|
NavigationUI.setupWithNavController(binding.navView, navController);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
|
@ -16,12 +16,12 @@ import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
public class login_activity extends AppCompatActivity {
|
public class login_activity extends AppCompatActivity {
|
||||||
|
|
||||||
private TextView emailInputEditText;
|
private EditText emailEditText;
|
||||||
private TextView passwordEditText;
|
private EditText passwordEditText;
|
||||||
private CheckBox rememberMeCheckBox;
|
|
||||||
private Button btnLogin;
|
private Button btnLogin;
|
||||||
private TextView criarContaTextView;
|
private TextView criarContaTextView;
|
||||||
private TextView esqueceuPasseTextView;
|
private com.google.firebase.auth.FirebaseAuth mAuth;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
@ -33,24 +33,65 @@ public class login_activity extends AppCompatActivity {
|
||||||
return insets;
|
return insets;
|
||||||
});
|
});
|
||||||
|
|
||||||
emailInputEditText = findViewById(R.id.emailEditText);
|
// Initialize Firebase Auth
|
||||||
|
mAuth = com.google.firebase.auth.FirebaseAuth.getInstance();
|
||||||
|
|
||||||
|
emailEditText = findViewById(R.id.emailEditText);
|
||||||
passwordEditText = findViewById(R.id.passwordEditText);
|
passwordEditText = findViewById(R.id.passwordEditText);
|
||||||
rememberMeCheckBox = findViewById(R.id.rememberMeCheckBox);
|
|
||||||
btnLogin = findViewById(R.id.btnLogin);
|
btnLogin = findViewById(R.id.btnLogin);
|
||||||
criarContaTextView = findViewById(R.id.criarContaTextView);
|
criarContaTextView = findViewById(R.id.criarContaTextView);
|
||||||
esqueceuPasseTextView = findViewById(R.id.esqueceuPasseTextView);
|
|
||||||
|
|
||||||
btnLogin.setOnClickListener(new View.OnClickListener() {
|
btnLogin.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (emailInputEditText.getText().toString().isEmpty() || passwordEditText.getText().toString().isEmpty()) {
|
String email = emailEditText.getText().toString();
|
||||||
Toast.makeText(login_activity.this, "Preencha todos os campos", Toast.LENGTH_SHORT).show();
|
String password = passwordEditText.getText().toString();
|
||||||
} else {
|
|
||||||
|
if (email.isEmpty() || password.isEmpty()) {
|
||||||
|
Toast.makeText(login_activity.this, "Por favor, preencha todos os campos.", Toast.LENGTH_SHORT).show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mAuth.signInWithEmailAndPassword(email, password)
|
||||||
|
.addOnCompleteListener(login_activity.this, new com.google.android.gms.tasks.OnCompleteListener<com.google.firebase.auth.AuthResult>() {
|
||||||
|
@Override
|
||||||
|
public void onComplete(@androidx.annotation.NonNull com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) {
|
||||||
|
if (task.isSuccessful()) {
|
||||||
|
// Sign in success, update UI with the signed-in user's information
|
||||||
|
com.google.firebase.auth.FirebaseUser user = mAuth.getCurrentUser();
|
||||||
|
Toast.makeText(login_activity.this, "Login com sucesso.",
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
Intent intent = new Intent(login_activity.this, MainActivity.class);
|
Intent intent = new Intent(login_activity.this, MainActivity.class);
|
||||||
// Lógica de autenticação aqui
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
// If sign in fails, display a message to the user.
|
||||||
|
Toast.makeText(login_activity.this, "Falha na autenticação.",
|
||||||
|
Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
criarContaTextView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(login_activity.this, CriarConta.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
// Check if user is signed in (non-null) and update UI accordingly.
|
||||||
|
com.google.firebase.auth.FirebaseUser currentUser = mAuth.getCurrentUser();
|
||||||
|
if(currentUser != null){
|
||||||
|
Intent intent = new Intent(login_activity.this, MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.example.pap_findu.ui.history;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
|
import com.example.pap_findu.databinding.FragmentHistoryBinding;
|
||||||
|
|
||||||
|
public class HistoryFragment extends Fragment {
|
||||||
|
|
||||||
|
private FragmentHistoryBinding binding;
|
||||||
|
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
|
ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
binding = FragmentHistoryBinding.inflate(inflater, container, false);
|
||||||
|
View root = binding.getRoot();
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
binding = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -14,11 +14,39 @@ public class MapFragment extends Fragment {
|
||||||
|
|
||||||
private FragmentMapBinding binding;
|
private FragmentMapBinding binding;
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
binding = FragmentMapBinding.inflate(inflater, container, false);
|
binding = FragmentMapBinding.inflate(inflater, container, false);
|
||||||
return binding.getRoot();
|
View root = binding.getRoot();
|
||||||
|
|
||||||
|
// Implement SOS Button logic
|
||||||
|
binding.sosButton.setOnClickListener(v -> {
|
||||||
|
android.content.Intent intent = new android.content.Intent(android.content.Intent.ACTION_DIAL);
|
||||||
|
intent.setData(android.net.Uri.parse("tel:112"));
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add dummy listeners for other interactive elements
|
||||||
|
binding.zoomInButton.setOnClickListener(v -> {
|
||||||
|
// Placeholder: Zoom In logic would go here if we had a real map
|
||||||
|
android.widget.Toast.makeText(getContext(), "Zoom In", android.widget.Toast.LENGTH_SHORT).show();
|
||||||
|
});
|
||||||
|
|
||||||
|
binding.zoomOutButton.setOnClickListener(v -> {
|
||||||
|
// Placeholder: Zoom Out logic
|
||||||
|
android.widget.Toast.makeText(getContext(), "Zoom Out", android.widget.Toast.LENGTH_SHORT).show();
|
||||||
|
});
|
||||||
|
|
||||||
|
binding.navigationFab.setOnClickListener(v -> {
|
||||||
|
android.widget.Toast.makeText(getContext(), "Centrar Localização", android.widget.Toast.LENGTH_SHORT)
|
||||||
|
.show();
|
||||||
|
});
|
||||||
|
|
||||||
|
binding.messagesFab.setOnClickListener(v -> {
|
||||||
|
android.widget.Toast.makeText(getContext(), "Abrir Chat", android.widget.Toast.LENGTH_SHORT).show();
|
||||||
|
});
|
||||||
|
|
||||||
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.example.pap_findu.ui.profile;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
||||||
|
import com.example.pap_findu.databinding.FragmentProfileBinding;
|
||||||
|
|
||||||
|
public class ProfileFragment extends Fragment {
|
||||||
|
|
||||||
|
private FragmentProfileBinding binding;
|
||||||
|
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater,
|
||||||
|
ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
binding = FragmentProfileBinding.inflate(inflater, container, false);
|
||||||
|
View root = binding.getRoot();
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
binding = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,3 +7,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,3 +17,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,12 @@
|
||||||
<stroke
|
<stroke
|
||||||
android:width="1dp"
|
android:width="1dp"
|
||||||
android:color="#E0E7F1" />
|
android:color="#E0E7F1" />
|
||||||
<padding android:all="8dp" />
|
|
||||||
</shape>
|
</shape>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,3 +11,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,3 +10,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@android:color/white" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="#E0E0E0" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#F3F4F6" />
|
||||||
|
<corners android:radius="12dp" />
|
||||||
|
</shape>
|
||||||
|
|
@ -12,3 +12,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,3 +15,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,3 +13,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,3 +15,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,166 +1,135 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/azulClaro">
|
android:background="#D0E0E3"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".criar_conta_activity">
|
||||||
|
|
||||||
<!-- Gradiente topo -->
|
|
||||||
<View
|
|
||||||
android:id="@+id/topGradient"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="260dp"
|
|
||||||
android:background="@drawable/bg_gradient_top"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
<!-- Ícone -->
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/logoIcon"
|
android:id="@+id/logoIcon"
|
||||||
android:layout_width="85dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="85dp"
|
android:layout_height="60dp"
|
||||||
android:src="@drawable/logo"
|
android:layout_marginTop="48dp"
|
||||||
android:layout_marginTop="35dp"
|
android:src="@drawable/logo" />
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
<!-- Título -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/titleFindU"
|
android:id="@+id/titleFindU"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:text="FindU"
|
android:text="FindU"
|
||||||
android:textSize="26sp"
|
android:textColor="#FFFFFF"
|
||||||
android:textColor="@android:color/white"
|
android:textSize="28sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/logoIcon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
<!-- Subtítulo -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subtitle"
|
android:id="@+id/subtitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Segurança em Tempo Real"
|
android:text="Segurança em Tempo Real"
|
||||||
android:textSize="14sp"
|
android:textColor="#FFFFFF" />
|
||||||
android:textColor="@android:color/white"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/titleFindU"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
<!-- Card -->
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/cardRegister"
|
android:id="@+id/cardRegister"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginTop="24dp"
|
||||||
android:layout_marginTop="18dp"
|
android:layout_marginEnd="24dp"
|
||||||
app:cardCornerRadius="22dp"
|
android:layout_marginBottom="24dp"
|
||||||
app:cardElevation="8dp"
|
app:cardCornerRadius="28dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/subtitle"
|
app:cardElevation="4dp">
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="22dp"
|
android:padding="24dp">
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<!-- Nome -->
|
<EditText
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/inputFullName"
|
android:id="@+id/inputFullName"
|
||||||
android:hint="Nome Completo"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<!-- Email -->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/emailEditText"
|
|
||||||
android:hint="Email"
|
|
||||||
android:inputType="textEmailAddress"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<!-- Password -->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
app:endIconMode="password_toggle">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/passwordEditText"
|
|
||||||
android:hint="Palavra-passe"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<!-- Confirmar Password -->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
app:endIconMode="password_toggle">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/inputConfirmPassword"
|
|
||||||
android:hint="Confirmar Palavra-passe"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<!-- Termos -->
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/checkTerms"
|
|
||||||
android:text="Concordo com os Termos de Serviço e Política de Privacidade"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<!-- Botão Criar Conta -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnCreateAccount"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="18dp"
|
android:background="@drawable/edit_text_background_light_gray"
|
||||||
|
android:hint="Nome Completo"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/emailEditText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/edit_text_background_light_gray"
|
||||||
|
android:hint="Email"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/passwordEditText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/edit_text_background_light_gray"
|
||||||
|
android:hint="Palavra-passe"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/inputConfirmPassword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/edit_text_background_light_gray"
|
||||||
|
android:hint="Confirmar Palavra-passe"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/checkTerms"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Concordo com os Termos de Serviço e Política de Privacidade"
|
||||||
|
android:textColor="#6B7280"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnCreateAccount"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="55dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:backgroundTint="#838996"
|
||||||
android:text="Criar Conta"
|
android:text="Criar Conta"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textSize="16sp"
|
|
||||||
android:backgroundTint="#838996"
|
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
app:cornerRadius="15dp" />
|
android:textSize="16sp"
|
||||||
|
app:cornerRadius="12dp" />
|
||||||
|
|
||||||
<!-- Entrar -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:text="Já tem conta? Entrar agora"
|
android:id="@+id/loginLink"
|
||||||
android:textColor="#1E52FF"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:layout_marginTop="18dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="Já tem conta? Entrar agora"
|
||||||
|
android:textColor="#3B82F6"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/nav_host_fragment_activity_main"
|
android:id="@+id/nav_host_fragment_activity_main"
|
||||||
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:defaultNavHost="true"
|
app:defaultNavHost="true"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.history.HistoryFragment">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_history"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Histórico"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#F3F6FB"
|
android:background="#F3F6FB"
|
||||||
android:paddingBottom="90dp"
|
tools:context=".ui.map.MapFragment">
|
||||||
tools:context=".ui.map.MapFragment"
|
|
||||||
android:id="@+id/bottomNavigation"
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_gravity="bottom"
|
android:id="@+id/scrollView"
|
||||||
app:labelVisibilityMode="labeled"
|
android:layout_width="0dp"
|
||||||
app:menu="@menu/bottom_nav_menu">
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/sosButton"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -310,7 +313,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="🏠"
|
android:text="@string/zone_home_icon"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
@ -344,7 +347,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="🏫"
|
android:text="@string/zone_school_icon"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
@ -427,6 +430,8 @@
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/sosButton"
|
android:id="@+id/sosButton"
|
||||||
|
|
@ -434,20 +439,22 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
android:backgroundTint="#E53935"
|
android:backgroundTint="#E53935"
|
||||||
android:cornerRadius="18dp"
|
app:cornerRadius="18dp"
|
||||||
android:drawablePadding="12dp"
|
android:drawablePadding="12dp"
|
||||||
android:drawableEnd="@android:drawable/ic_menu_call"
|
android:drawableEnd="@android:drawable/ic_menu_call"
|
||||||
android:icon="@android:drawable/ic_dialog_alert"
|
app:icon="@android:drawable/ic_dialog_alert"
|
||||||
android:iconPadding="12dp"
|
app:iconPadding="12dp"
|
||||||
android:iconTint="#FFFFFF"
|
app:iconTint="#FFFFFF"
|
||||||
android:text="@string/sos_button_text"
|
android:text="@string/sos_button_text"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:iconGravity="textStart" />
|
app:iconGravity="textStart"
|
||||||
</LinearLayout>
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".ui.profile.ProfileFragment">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/text_profile"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Perfil"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -81,9 +81,9 @@
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginEnd="24dp"
|
android:layout_marginEnd="24dp"
|
||||||
android:backgroundTint="#1F6AEF"
|
android:backgroundTint="#1F6AEF"
|
||||||
android:cornerRadius="16dp"
|
app:cornerRadius="16dp"
|
||||||
android:icon="@android:drawable/ic_input_add"
|
app:icon="@android:drawable/ic_input_add"
|
||||||
android:iconTint="#FFFFFF"
|
app:iconTint="#FFFFFF"
|
||||||
android:text="@string/zones_add_button"
|
android:text="@string/zones_add_button"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="#FFFFFF"
|
android:textColor="#FFFFFF"
|
||||||
|
|
@ -114,8 +114,8 @@
|
||||||
android:padding="20dp">
|
android:padding="20dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android.layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android.layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="🏫"
|
android:text="@string/zone_school_icon"
|
||||||
android:textSize="24sp" />
|
android:textSize="24sp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:gravity="space_between"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
@ -217,7 +217,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="🏠"
|
android:text="@string/zone_home_icon"
|
||||||
android:textSize="24sp" />
|
android:textSize="24sp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
@ -257,7 +257,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:gravity="space_between"
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
||||||
|
|
@ -1,173 +1,125 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/azulClaro">
|
android:background="#D0E0E3"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".login_activity">
|
||||||
|
|
||||||
<!-- GRADIENTE AZUL DO TOPO -->
|
|
||||||
|
|
||||||
<!-- LOGO ÍCONE -->
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/logoIcon"
|
android:id="@+id/logoIcon"
|
||||||
android:layout_width="90dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="90dp"
|
android:layout_height="60dp"
|
||||||
android:src="@drawable/logo"
|
android:layout_marginTop="60dp"
|
||||||
android:layout_marginTop="40dp"
|
android:src="@drawable/logo" />
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
<!-- TÍTULO -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/titleFindU"
|
android:id="@+id/titleFindU"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="FindU"
|
|
||||||
android:textSize="28sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/logoIcon"
|
android:text="FindU"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:textColor="#FFFFFF"
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
android:textSize="28sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<!-- SUBTÍTULO -->
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/subtitle"
|
android:id="@+id/subtitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Segurança em Tempo Real"
|
android:text="Segurança em Tempo Real"
|
||||||
android:textSize="14sp"
|
android:textColor="#FFFFFF" />
|
||||||
android:textColor="@android:color/white"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/titleFindU"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
<!-- CARD BRANCO -->
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/cardLogin"
|
android:id="@+id/cardLogin"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="24dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginTop="32dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginEnd="24dp"
|
||||||
app:cardElevation="8dp"
|
app:cardCornerRadius="28dp"
|
||||||
app:cardCornerRadius="22dp"
|
app:cardElevation="4dp">
|
||||||
app:layout_constraintTop_toBottomOf="@id/subtitle"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="22dp"
|
android:orientation="vertical"
|
||||||
android:orientation="vertical">
|
android:padding="24dp">
|
||||||
<!-- EMAIL -->
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:text="Bem-vindo de volta"
|
||||||
|
android:textColor="#1F2937"
|
||||||
|
android:textSize="22sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
android:id="@+id/emailEditText"
|
android:id="@+id/emailEditText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="20dp">
|
android:layout_marginTop="24dp"
|
||||||
|
android:background="@drawable/edit_text_background_light_gray"
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/emailInputEditText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:hint="Email"
|
android:hint="Email"
|
||||||
android:inputType="textEmailAddress" />
|
android:inputType="textEmailAddress"
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<!-- PASSWORD -->
|
<EditText
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
app:endIconMode="password_toggle">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/passwordEditText"
|
android:id="@+id/passwordEditText"
|
||||||
android:hint="Palavra-passe"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<!-- LEMBRAR + ESQUECEU -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/rememberMeCheckBox"
|
|
||||||
android:layout_width="123dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Lembrar-me" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- BOTÃO ENTRAR -->
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/btnLogin"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/edit_text_background_light_gray"
|
||||||
|
android:hint="Palavra-passe"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:paddingStart="20dp"
|
||||||
|
android:paddingEnd="20dp"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnLogin"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="55dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:backgroundTint="#838996"
|
||||||
android:text="Entrar"
|
android:text="Entrar"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:cornerRadius="15dp"
|
app:cornerRadius="12dp" />
|
||||||
android:backgroundTint="#838996"
|
|
||||||
android:textColor="@android:color/white" />
|
|
||||||
|
|
||||||
<!-- OU -->
|
|
||||||
<TextView
|
|
||||||
android:text="————— ou —————"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:textColor="#888"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_marginTop="18dp"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<!-- CRIAR CONTA -->
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/criarContaTextView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="Ainda não tem conta? Criar conta"
|
|
||||||
android:textColor="#1E52FF"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/esqueceuPasseTextView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Esqueceu a passe?"
|
|
||||||
android:textColor="#1E52FF"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="14sp"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<!-- RODAPÉ -->
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/footerText"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Ao entrar, concorda com os nossos Termos de Serviço e Política de Privacidade"
|
android:text="Ainda não tem conta? "
|
||||||
android:textColor="#555"
|
android:textColor="#FFFFFF"
|
||||||
android:textSize="11sp"
|
android:textSize="14sp" />
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<TextView
|
||||||
|
android:id="@+id/criarContaTextView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Criar conta"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
@ -2,27 +2,27 @@
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_home"
|
android:id="@+id/navigation_map"
|
||||||
android:icon="@drawable/ic_nav_home"
|
android:icon="@drawable/ic_nav_home"
|
||||||
android:title="Mapa" />
|
android:title="Mapa" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_zones"
|
android:id="@+id/navigation_zones"
|
||||||
android:icon="@drawable/ic_location_pin"
|
android:icon="@drawable/ic_nav_zones"
|
||||||
android:title="Zonas" />
|
android:title="Zonas" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_alerts"
|
android:id="@+id/navigation_alerts"
|
||||||
android:icon="@drawable/ic_bell"
|
android:icon="@drawable/ic_nav_alerts"
|
||||||
android:title="Alertas" />
|
android:title="Alertas" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_history"
|
android:id="@+id/navigation_history"
|
||||||
android:icon="@drawable/ic_history"
|
android:icon="@drawable/ic_history"
|
||||||
android:title="Histórico" />
|
android:title="Histórico" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_profile"
|
android:id="@+id/navigation_profile"
|
||||||
android:icon="@drawable/ic_profile"
|
android:icon="@drawable/ic_profile"
|
||||||
android:title="Perfil" />
|
android:title="Perfil" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,16 @@
|
||||||
android:label="Alertas"
|
android:label="Alertas"
|
||||||
tools:layout="@layout/fragment_alerts" />
|
tools:layout="@layout/fragment_alerts" />
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/navigation_history"
|
||||||
|
android:name="com.example.pap_findu.ui.history.HistoryFragment"
|
||||||
|
android:label="Histórico"
|
||||||
|
tools:layout="@layout/fragment_history" />
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/navigation_profile"
|
||||||
|
android:name="com.example.pap_findu.ui.profile.ProfileFragment"
|
||||||
|
android:label="Perfil"
|
||||||
|
tools:layout="@layout/fragment_profile" />
|
||||||
|
|
||||||
</navigation>
|
</navigation>
|
||||||
|
|
|
||||||
|
|
@ -53,4 +53,6 @@
|
||||||
<string name="alerts_status_resolved">Resolvido</string>
|
<string name="alerts_status_resolved">Resolvido</string>
|
||||||
<string name="alerts_geofence_time">13:32</string>
|
<string name="alerts_geofence_time">13:32</string>
|
||||||
<string name="alerts_geofence_action">Registado automaticamente</string>
|
<string name="alerts_geofence_action">Registado automaticamente</string>
|
||||||
|
<string name="zone_school_icon">🏫</string>
|
||||||
|
<string name="zone_home_icon">🏠</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[versions]
|
[versions]
|
||||||
agp = "8.13.1"
|
agp = "8.13.2"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
junitVersion = "1.3.0"
|
junitVersion = "1.3.0"
|
||||||
espressoCore = "3.7.0"
|
espressoCore = "3.7.0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue