Aplicacion trabajadores finalizado, a falta de limpiar y organizar el codigo
This commit is contained in:
parent
b5853be7fb
commit
98ebf897fc
|
|
@ -1,5 +0,0 @@
|
|||
package com.andresgmoran.apptrabajadores.interfaces;
|
||||
|
||||
public interface IOChangeFragmentListener {
|
||||
void changeFragment(String fragmentName);
|
||||
}
|
||||
|
|
@ -7,5 +7,5 @@ import com.andresgmoran.apptrabajadores.models.Resident;
|
|||
import java.util.List;
|
||||
|
||||
public interface IOClickOnAddParticipantListener {
|
||||
void onClickOnAddParticipant(Activity activity, List<ActivityResident> participants , List<Resident> residents);
|
||||
void onClickOnAddParticipant(Activity activity, List<ActivityResident> participants );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package com.andresgmoran.apptrabajadores.models;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Residence {
|
||||
private final Long id;
|
||||
private final String name;
|
||||
private final String email;
|
||||
private final List<Long> users;
|
||||
private final List<Long> residents;
|
||||
|
||||
public Residence(Long id, String name, String email, List<Long> users, List<Long> residents) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.email = email;
|
||||
this.users = users;
|
||||
this.residents = residents;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public List<Long> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public List<Long> getResidents() {
|
||||
return residents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Residence residence = (Residence) o;
|
||||
return Objects.equals(id, residence.id) && Objects.equals(name, residence.name) && Objects.equals(email, residence.email) && Objects.equals(users, residence.users) && Objects.equals(residents, residence.residents);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, email, users, residents);
|
||||
}
|
||||
}
|
||||
|
|
@ -11,15 +11,21 @@ public class Resident implements Serializable {
|
|||
private final String surnames;
|
||||
private final LocalDate birthDate;
|
||||
private final String identityCard;
|
||||
private final String family1;
|
||||
private final String family2;
|
||||
private final Long residenceId;
|
||||
private final boolean isTakenDown;
|
||||
|
||||
public Resident(Long id, String name, String surnames, LocalDate birthDate, String identityCard , Long residenceId) {
|
||||
public Resident(Long id, String name, String surnames, LocalDate birthDate, String identityCard, String family1, String family2, Long residenceId, boolean isTakenDown) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.surnames = surnames;
|
||||
this.birthDate = birthDate;
|
||||
this.identityCard = identityCard;
|
||||
this.family1 = family1;
|
||||
this.family2 = family2;
|
||||
this.residenceId = residenceId;
|
||||
this.isTakenDown = isTakenDown;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,10 @@ import com.andresgmoran.apptrabajadores.models.ActivityResident;
|
|||
import com.andresgmoran.apptrabajadores.models.ActivityState;
|
||||
import com.andresgmoran.apptrabajadores.models.Game;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ActivitiesAdapter extends RecyclerView.Adapter<ActivitiesAdapter.ActivitiesViewHolder> {
|
||||
|
||||
|
|
@ -49,6 +51,12 @@ public class ActivitiesAdapter extends RecyclerView.Adapter<ActivitiesAdapter.Ac
|
|||
return new ActivitiesAdapter.ActivitiesViewHolder(view);
|
||||
}
|
||||
|
||||
public void updateData(List<Activity> newActivities, List<ActivityResident> newParticipants) {
|
||||
this.activities = newActivities;
|
||||
this.participants = newParticipants;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ActivitiesViewHolder holder, int position) {
|
||||
Activity activity = activities.get(position);
|
||||
|
|
@ -63,12 +71,12 @@ public class ActivitiesAdapter extends RecyclerView.Adapter<ActivitiesAdapter.Ac
|
|||
if (activity.getState() != ActivityState.CERRADO){
|
||||
holder.activityStateButton.setOnClickListener( v -> {
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle("Confirmación")
|
||||
.setMessage("No se podra cambiar el estado de la actividad una vez cerrada. ¿Desea continuar?")
|
||||
.setPositiveButton("Aceptar", (dialog, which) -> {
|
||||
.setTitle(context.getString(R.string.close_activity_title))
|
||||
.setMessage(context.getString(R.string.close_activity_message))
|
||||
.setPositiveButton(context.getString(R.string.accept_text), (dialog, which) -> {
|
||||
changeStateListener.onChangeStateActivity(activity, ActivityState.CERRADO);
|
||||
})
|
||||
.setNegativeButton("Cancelar", (dialog, which) -> {
|
||||
.setNegativeButton(context.getString(R.string.cancel_text), (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
})
|
||||
.show();
|
||||
|
|
@ -108,6 +116,7 @@ public class ActivitiesAdapter extends RecyclerView.Adapter<ActivitiesAdapter.Ac
|
|||
|
||||
private final TextView activityName;
|
||||
private final TextView activityDate;
|
||||
private final TextView activityTime;
|
||||
private final ImageButton optionsButton;
|
||||
private final ImageButton activityStateButton;
|
||||
|
||||
|
|
@ -116,6 +125,7 @@ public class ActivitiesAdapter extends RecyclerView.Adapter<ActivitiesAdapter.Ac
|
|||
super(view);
|
||||
activityName = itemView.findViewById(R.id.name_salida);
|
||||
activityDate = itemView.findViewById(R.id.date_text_activityItem);
|
||||
activityTime = itemView.findViewById(R.id.time_text_activityItem);
|
||||
optionsButton = itemView.findViewById(R.id.more_options_activity_item);
|
||||
activityStateButton = itemView.findViewById(R.id.activity_status_button);
|
||||
|
||||
|
|
@ -123,7 +133,17 @@ public class ActivitiesAdapter extends RecyclerView.Adapter<ActivitiesAdapter.Ac
|
|||
|
||||
public void bindActivity(Activity activity) {
|
||||
activityName.setText(activity.getName());
|
||||
activityDate.setText(activity.getDate().toString());
|
||||
|
||||
Locale currentLocale = itemView.getContext().getResources().getConfiguration().getLocales().get(0);
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("EEEE, d MMMM yyyy", currentLocale);
|
||||
String fechaFormateada = activity.getDate().format(formatter);
|
||||
fechaFormateada = fechaFormateada.substring(0, 1).toUpperCase() + fechaFormateada.substring(1);
|
||||
activityDate.setText(fechaFormateada);
|
||||
|
||||
DateTimeFormatter formatterHora = DateTimeFormatter.ofPattern("HH:mm", currentLocale);
|
||||
String horaFormateada = activity.getDate().format(formatterHora).toLowerCase();
|
||||
activityTime.setText(horaFormateada);
|
||||
|
||||
if (activity.getState() == ActivityState.ABIERTO) {
|
||||
activityStateButton.setImageResource(R.drawable.open_activity_status);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -14,14 +14,17 @@ import com.andresgmoran.apptrabajadores.interfaces.IOClickOnGameListener;
|
|||
import com.andresgmoran.apptrabajadores.models.Game;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class GamesAdapter extends RecyclerView.Adapter<GamesAdapter.GamesViewHolder> {
|
||||
private List<Game> games;
|
||||
private final IOClickOnGameListener listener;
|
||||
private final Map<Long, Double> weeklyPercentages;
|
||||
|
||||
public GamesAdapter(List<Game> games, IOClickOnGameListener listener) {
|
||||
public GamesAdapter(List<Game> games, IOClickOnGameListener listener, Map<Long, Double> weeklyPercentages) {
|
||||
this.games = games;
|
||||
this.listener = listener;
|
||||
this.weeklyPercentages = weeklyPercentages;
|
||||
}
|
||||
|
||||
public void updateData(List<Game> newGames) {
|
||||
|
|
@ -31,22 +34,17 @@ public class GamesAdapter extends RecyclerView.Adapter<GamesAdapter.GamesViewHol
|
|||
|
||||
@NonNull
|
||||
@Override
|
||||
public GamesAdapter.GamesViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
public GamesViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
final View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_list_container, parent, false);
|
||||
return new GamesAdapter.GamesViewHolder(view);
|
||||
return new GamesViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull GamesAdapter.GamesViewHolder holder, int position) {
|
||||
public void onBindViewHolder(@NonNull GamesViewHolder holder, int position) {
|
||||
Game game = games.get(position);
|
||||
holder.bindGame(game);
|
||||
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
listener.onClickOnGame(game);
|
||||
}
|
||||
});
|
||||
holder.itemView.setOnClickListener(v -> listener.onClickOnGame(game));
|
||||
}
|
||||
|
||||
public int getItemCount() {
|
||||
|
|
@ -54,15 +52,15 @@ public class GamesAdapter extends RecyclerView.Adapter<GamesAdapter.GamesViewHol
|
|||
}
|
||||
|
||||
public class GamesViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private final TextView gameName;
|
||||
private final ImageView gameImage;
|
||||
|
||||
private final TextView percentageView;
|
||||
|
||||
public GamesViewHolder(View view) {
|
||||
super(view);
|
||||
gameName = view.findViewById(R.id.name_list_item);
|
||||
gameImage = view.findViewById(R.id.item_list_image);
|
||||
percentageView = view.findViewById(R.id.resident_info_item); // asegúrate que existe en el layout
|
||||
}
|
||||
|
||||
public void bindGame(Game game) {
|
||||
|
|
@ -74,6 +72,9 @@ public class GamesAdapter extends RecyclerView.Adapter<GamesAdapter.GamesViewHol
|
|||
int imageResId = itemView.getContext().getResources().getIdentifier(resourceName, "drawable", itemView.getContext().getPackageName());
|
||||
if (imageResId != 0)
|
||||
gameImage.setImageResource(imageResId);
|
||||
|
||||
double percentage = weeklyPercentages.getOrDefault(game.getId(), 0.0);
|
||||
percentageView.setText(percentage + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,12 @@ public class LastGamesAdapter extends RecyclerView.Adapter<LastGamesAdapter.Last
|
|||
this(gameStats, List.of(game), residents, listener);
|
||||
}
|
||||
|
||||
public void updateData(List<GameStat> newGameStats) {
|
||||
this.gameStats.clear();
|
||||
this.gameStats.addAll(newGameStats);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public LastGamesViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
|
@ -155,12 +161,13 @@ public class LastGamesAdapter extends RecyclerView.Adapter<LastGamesAdapter.Last
|
|||
}
|
||||
}
|
||||
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("EEEE, d 'de' MMMM 'de' yyyy", new Locale("es", "ES"));
|
||||
Locale currentLocale = itemView.getContext().getResources().getConfiguration().getLocales().get(0);
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("EEEE, d MMMM yyyy", currentLocale);
|
||||
String fechaFormateada = gameStat.getDateTime().format(formatter);
|
||||
fechaFormateada = fechaFormateada.substring(0, 1).toUpperCase() + fechaFormateada.substring(1);
|
||||
date.setText(fechaFormateada);
|
||||
|
||||
DateTimeFormatter formatterHora = DateTimeFormatter.ofPattern("h:mma", Locale.ENGLISH);
|
||||
DateTimeFormatter formatterHora = DateTimeFormatter.ofPattern("HH:mm", currentLocale);
|
||||
String horaFormateada = gameStat.getDateTime().format(formatterHora).toLowerCase();
|
||||
time.setText(horaFormateada);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ public class ParticipantsAdapter extends RecyclerView.Adapter<ParticipantsAdapte
|
|||
if (activity.getState() == ActivityState.ABIERTO){
|
||||
if (activityResident.isMaterialHelp()){
|
||||
listener.onClickOnMaterialHelp(activityResident, false);
|
||||
} else {
|
||||
}
|
||||
if (!activityResident.isMaterialHelp()) {
|
||||
listener.onClickOnMaterialHelp(activityResident, true);
|
||||
}
|
||||
}
|
||||
|
|
@ -99,7 +100,8 @@ public class ParticipantsAdapter extends RecyclerView.Adapter<ParticipantsAdapte
|
|||
if (activity.getState() == ActivityState.ABIERTO){
|
||||
if (activityResident.isHumanHelp()){
|
||||
listener.onClickOnHumanHelp(activityResident, false);
|
||||
} else {
|
||||
}
|
||||
if (!activityResident.isHumanHelp()) {
|
||||
listener.onClickOnHumanHelp(activityResident, true);
|
||||
}
|
||||
}
|
||||
|
|
@ -109,19 +111,23 @@ public class ParticipantsAdapter extends RecyclerView.Adapter<ParticipantsAdapte
|
|||
if (activityResident.isAssistance()){
|
||||
holder.assitanceButton.setBackgroundResource(R.drawable.activity_button_pressed_background);
|
||||
}
|
||||
|
||||
if (activityResident.isMaterialHelp()){
|
||||
holder.materialHelp.setBackgroundResource(R.drawable.activity_button_pressed_background);
|
||||
}
|
||||
Log.e( "TAG", "MaterialHelp: " + activityResident.isMaterialHelp());
|
||||
if (activityResident.isHumanHelp()){
|
||||
holder.humanHelp.setBackgroundResource(R.drawable.activity_button_pressed_background);
|
||||
}
|
||||
Log.e( "TAG", "HumanHelp: " + activityResident.isHumanHelp());
|
||||
Log.e( "TAG", "State: " + activity.getState());
|
||||
Log.e( "TAG", "PreOpinion: " + activityResident.getPreOpinion());
|
||||
Log.e( "TAG", " State: " + activityResident.isAssistance());
|
||||
if (activity.getState() == ActivityState.ABIERTO && !activityResident.getPreOpinion().isEmpty()){
|
||||
holder.opinionButton.setBackgroundResource(R.drawable.activity_button_pressed_background);
|
||||
}
|
||||
Log.e( "TAG", "Opinion: " + activityResident.getPostOpinion() + " State: " + activityResident.isAssistance());
|
||||
if (activity.getState() == ActivityState.FINALIZADA && !activityResident.getPostOpinion().isEmpty()){
|
||||
Log.e( "TAG", "Opinion: " + activityResident.getPostOpinion());
|
||||
holder.opinionButton.setBackgroundResource(R.drawable.activity_button_pressed_background);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.andresgmoran.apptrabajadores.R;
|
|||
import com.andresgmoran.apptrabajadores.interfaces.IOClickOnResidentListener;
|
||||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class ResidentsAdapter extends RecyclerView.Adapter<ResidentsAdapter.ResidentsViewHolder> {
|
||||
|
|
@ -26,7 +27,7 @@ public class ResidentsAdapter extends RecyclerView.Adapter<ResidentsAdapter.Resi
|
|||
}
|
||||
|
||||
public void updateData(List<Resident> newResidents) {
|
||||
this.residents = newResidents; // O la lista que uses internamente
|
||||
this.residents = newResidents;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
|
@ -73,17 +74,20 @@ public class ResidentsAdapter extends RecyclerView.Adapter<ResidentsAdapter.Resi
|
|||
|
||||
private final TextView residentName;
|
||||
private final ImageButton optionsButton;
|
||||
private final TextView birthDate;
|
||||
|
||||
|
||||
public ResidentsViewHolder(View view) {
|
||||
super(view);
|
||||
residentName = view.findViewById(R.id.name_list_item);
|
||||
optionsButton = view.findViewById(R.id.more_options_item_list);
|
||||
birthDate = view.findViewById(R.id.resident_info_item);
|
||||
}
|
||||
|
||||
public void bindResident(Resident resident) {
|
||||
String fullName = resident.getName() + " " + resident.getSurnames();
|
||||
residentName.setText(fullName);
|
||||
birthDate.setText(resident.getBirthDate().toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package com.andresgmoran.apptrabajadores.models.parsers;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.exceptions.ParserException;
|
||||
import com.andresgmoran.apptrabajadores.models.Residence;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ResidenceParser {
|
||||
|
||||
public static Residence parseResidence(String jsonText) throws ParserException {
|
||||
try {
|
||||
JSONObject obj = new JSONObject(jsonText);
|
||||
|
||||
Long id = obj.getLong("id");
|
||||
String nombre = obj.getString("nombre");
|
||||
String email = obj.getString("email");
|
||||
|
||||
List<Long> usuarios = new ArrayList<>();
|
||||
if (obj.has("usuarios") && !obj.isNull("usuarios")) {
|
||||
JSONArray usuariosArray = obj.getJSONArray("usuarios");
|
||||
for (int i = 0; i < usuariosArray.length(); i++) {
|
||||
usuarios.add(usuariosArray.getLong(i));
|
||||
}
|
||||
}
|
||||
|
||||
List<Long> residentes = new ArrayList<>();
|
||||
if (obj.has("residentes") && !obj.isNull("residentes")) {
|
||||
JSONArray residentesArray = obj.getJSONArray("residentes");
|
||||
for (int i = 0; i < residentesArray.length(); i++) {
|
||||
residentes.add(residentesArray.getLong(i));
|
||||
}
|
||||
}
|
||||
|
||||
return new Residence(id, nombre, email, usuarios, residentes);
|
||||
|
||||
} catch (JSONException e) {
|
||||
throw new ParserException("Error al parsear residencia: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -32,9 +32,14 @@ public class ResidentParser {
|
|||
|
||||
String identityCard = obj.getString("documentoIdentidad");
|
||||
|
||||
String family1 = obj.optString("familiar1", null);
|
||||
String family2 = obj.optString("familiar2", null);
|
||||
|
||||
Long residenceId = obj.getLong("idResidencia");
|
||||
|
||||
residents.add(new Resident(id, name, surnames, birthDate, identityCard, residenceId));
|
||||
boolean isTakenDown = obj.optBoolean("baja", false);
|
||||
|
||||
residents.add(new Resident(id, name, surnames, birthDate, identityCard, family1, family2, residenceId, isTakenDown));
|
||||
}
|
||||
} catch (JSONException | IllegalArgumentException e) {
|
||||
throw new ParserException("Error al parsear residentes", e);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import java.io.InputStream;
|
|||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class ApiClient {
|
||||
|
|
@ -27,7 +28,10 @@ public class ApiClient {
|
|||
// Endpoints
|
||||
private static final String ENDPOINT_GET_USERS = "/resi/user/getAll";
|
||||
private static final String ENDPOINT_GET_ME = "/resi/user/me";
|
||||
private static final String ENDPOINT_RESIDENCE = "/resi/get";
|
||||
private static final String ENDPOINT_GET_RESIDENTS = "/resi/resident/getAll";
|
||||
private static final String ENDPOINT_GET_RESIDENTS_TAKEN_OUT = "/resi/resident/getAll/bajas";
|
||||
private static final String ENDPOINT_ADD_RESIDENT = "/resi/resident/add";
|
||||
private static final String ENDPOINT_GET_GAMES = "/resi/juego/getAll";
|
||||
private static final String ENDPOINT_GET_STATS = "/resi/registro/getAll";
|
||||
private static final String ENDPOINT_GET_ACTIVITIES = "/resi/evento/getAll";
|
||||
|
|
@ -40,6 +44,8 @@ public class ApiClient {
|
|||
private static final String ENDPOINT_ACTIVITY_PARTICIPANTS = "/resi/evento/%d/participante/getAll";
|
||||
private static final String ENDPOINT_ADD_PARTICIPANT = "/resi/evento/%d/participante/add";
|
||||
private static final String ENDPOINT_UPDATE_PARTICIPANT = "/resi/evento/%d/participante/%d/update";
|
||||
private static final String ENDPOINT_ALLOW_PARTICIPANT = "/resi/evento/%d/participante/%d/allow";
|
||||
private static final String ENDPOINT_DENY_PARTICIPANT = "/resi/evento/%d/participante/%d/deny";
|
||||
private static final String ENDPOINT_TAKE_OUT_RESIDENT = "/resi/resident/%d/baja";
|
||||
|
||||
public interface RawCallback {
|
||||
|
|
@ -60,9 +66,16 @@ public class ApiClient {
|
|||
makeGetRequest(context, ENDPOINT_GET_ME, callback);
|
||||
}
|
||||
|
||||
public static void getResidence( Context context, RawCallback callback) {
|
||||
makeGetRequest(context, ENDPOINT_RESIDENCE, callback);
|
||||
}
|
||||
|
||||
public static void getResidents(Context context, RawCallback callback) {
|
||||
makeGetRequest(context, ENDPOINT_GET_RESIDENTS, callback);
|
||||
}
|
||||
public static void getResidentsTakenOut(Context context, RawCallback callback) {
|
||||
makeGetRequest(context, ENDPOINT_GET_RESIDENTS_TAKEN_OUT , callback);
|
||||
}
|
||||
|
||||
public static void getGames(Context context, RawCallback callback) {
|
||||
makeGetRequest(context, ENDPOINT_GET_GAMES, callback);
|
||||
|
|
@ -85,6 +98,16 @@ public class ApiClient {
|
|||
makePostRequest(null, ENDPOINT_LOGIN, jsonBody, callback);
|
||||
}
|
||||
|
||||
public static void postResident(Context context, String nombre, String apellido, LocalDate fechaNacimiento,
|
||||
String documentoIdentidad, String familiar1, String familiar2, int year, int month,
|
||||
RawCallback callback) {
|
||||
String jsonBody = String.format(
|
||||
"{\"nombre\":\"%s\", \"apellido\":\"%s\", \"fechaNacimiento\":\"%s\", \"documentoIdentidad\":\"%s\", " +
|
||||
"\"familiar1\":\"%s\", \"familiar2\":\"%s\", \"year\":%d, \"month\":%d}",
|
||||
nombre, apellido, fechaNacimiento.toString(), documentoIdentidad, familiar1, familiar2, year, month);
|
||||
makePostRequest(context, ENDPOINT_ADD_RESIDENT, jsonBody, callback);
|
||||
}
|
||||
|
||||
public static void postEvento(Context context, String nombre, String descripcion, LocalDateTime fecha, RawCallback callback) {
|
||||
String jsonBody = String.format("{\"nombre\":\"%s\", \"descripcion\":\"%s\", \"fecha\":\"%s\", \"estado\":\"%s\"}",
|
||||
nombre, descripcion, fecha.toString(), ActivityState.ABIERTO);
|
||||
|
|
@ -113,6 +136,12 @@ public class ApiClient {
|
|||
String jsonBody, RawCallback callback) {
|
||||
makePatchRequest(context, String.format(ENDPOINT_UPDATE_PARTICIPANT, idActivity, idParticipant), jsonBody, callback);
|
||||
}
|
||||
public static void allowParticipant(Context context, long idActivity, long idParticipant, RawCallback callback) {
|
||||
makePostRequest(context, String.format(ENDPOINT_ALLOW_PARTICIPANT, idActivity, idParticipant), "", callback);
|
||||
}
|
||||
public static void denyParticipant(Context context, long idActivity, long idParticipant, RawCallback callback) {
|
||||
makePostRequest(context, String.format(ENDPOINT_DENY_PARTICIPANT, idActivity, idParticipant), "" ,callback);
|
||||
}
|
||||
|
||||
public static void patchTakeOutResident(Context context, long idResident, RawCallback callback) {
|
||||
makePatchRequest(context, String.format(ENDPOINT_TAKE_OUT_RESIDENT, idResident), "", callback);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,18 @@
|
|||
package com.andresgmoran.apptrabajadores.repository;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Bitmap;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
import com.andresgmoran.apptrabajadores.exceptions.ParserException;
|
||||
import com.andresgmoran.apptrabajadores.models.Activity;
|
||||
import com.andresgmoran.apptrabajadores.models.ActivityResident;
|
||||
import com.andresgmoran.apptrabajadores.models.ActivityState;
|
||||
import com.andresgmoran.apptrabajadores.models.Game;
|
||||
import com.andresgmoran.apptrabajadores.models.Residence;
|
||||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.models.User;
|
||||
import com.andresgmoran.apptrabajadores.models.gameStats.GameStat;
|
||||
|
|
@ -15,10 +20,16 @@ import com.andresgmoran.apptrabajadores.models.parsers.ActivityParser;
|
|||
import com.andresgmoran.apptrabajadores.models.parsers.ActivityResidentParser;
|
||||
import com.andresgmoran.apptrabajadores.models.parsers.GameParser;
|
||||
import com.andresgmoran.apptrabajadores.models.parsers.GameStatParser;
|
||||
import com.andresgmoran.apptrabajadores.models.parsers.ResidenceParser;
|
||||
import com.andresgmoran.apptrabajadores.models.parsers.ResidentParser;
|
||||
import com.andresgmoran.apptrabajadores.models.parsers.UserParser;
|
||||
import com.andresgmoran.apptrabajadores.network.ApiClient;
|
||||
import com.andresgmoran.apptrabajadores.ui.MainActivity;
|
||||
import com.andresgmoran.apptrabajadores.utils.SecurePreferencesUtil;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -30,7 +41,9 @@ public class AppDataRepository {
|
|||
private User actualUser;
|
||||
private Bitmap actualUserImage;
|
||||
private List<User> users = new ArrayList<>();
|
||||
private Residence residence = null;
|
||||
private List<Resident> residents = new ArrayList<>();
|
||||
private List<Resident> residentsTakenOut = new ArrayList<>();
|
||||
private List<Game> games = new ArrayList<>();
|
||||
private List<GameStat> gameStats = new ArrayList<>();
|
||||
private List<Activity> activities = new ArrayList<>();
|
||||
|
|
@ -52,9 +65,15 @@ public class AppDataRepository {
|
|||
public List<User> getUsers() { return users; }
|
||||
public void setUsers(List<User> list) { this.users = new ArrayList<>(list); }
|
||||
|
||||
public Residence getResidence() { return residence; }
|
||||
public void setResidence(Residence residence) { this.residence = residence; }
|
||||
|
||||
public List<Resident> getResidents() { return residents; }
|
||||
public void setResidents(List<Resident> list) { this.residents = new ArrayList<>(list); }
|
||||
|
||||
public List<Resident> getResidentsTakenOut() { return residentsTakenOut; }
|
||||
public void setResidentsTakenOut(List<Resident> list) { this.residentsTakenOut = new ArrayList<>(list); }
|
||||
|
||||
public List<Game> getGames() { return games; }
|
||||
public void setGames(List<Game> list) { this.games = new ArrayList<>(list); }
|
||||
|
||||
|
|
@ -69,18 +88,23 @@ public class AppDataRepository {
|
|||
|
||||
// -------------------- API Calls --------------------
|
||||
|
||||
public void fetchActualUser(Context context, Runnable onFinish) {
|
||||
public void fetchActualUser(Context context, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.getActualUser(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
try {
|
||||
actualUser = UserParser.parseUser(jsonText);
|
||||
fetchUserImage(context, actualUser.getAccountImage(), onFinish);
|
||||
fetchUserImage(context, actualUser.getAccountImage(), onSuccess);
|
||||
} catch (Exception e) {
|
||||
Log.e("UserParser", "Error al parsear usuario: " + e.getMessage());
|
||||
onError.run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al obtener usuario: " + error);
|
||||
onFinish.run();
|
||||
onError.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -106,7 +130,7 @@ public class AppDataRepository {
|
|||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
users = UserParser.parseUsers(jsonText);
|
||||
fetchResidents(context, onFinish);
|
||||
fetchResidence(context, onFinish);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -117,12 +141,28 @@ public class AppDataRepository {
|
|||
});
|
||||
}
|
||||
|
||||
public void fetchResidence( Context context, Runnable onFinish) {
|
||||
ApiClient.getResidence(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
residence = ResidenceParser.parseResidence(jsonText);
|
||||
fetchResidents(context, onFinish);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al obtener residencia: " + error);
|
||||
onFinish.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void fetchResidents(Context context, Runnable onFinish) {
|
||||
ApiClient.getResidents(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
residents = ResidentParser.parseResidents(jsonText);
|
||||
fetchGames(context, onFinish);
|
||||
fetchResidentsTakenOut(context, onFinish);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -133,6 +173,22 @@ public class AppDataRepository {
|
|||
});
|
||||
}
|
||||
|
||||
public void fetchResidentsTakenOut(Context context, Runnable onFinish) {
|
||||
ApiClient.getResidentsTakenOut(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
residentsTakenOut = ResidentParser.parseResidents(jsonText);
|
||||
fetchGames(context, onFinish);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al obtener residentes dados de baja: " + error);
|
||||
onFinish.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void fetchGames(Context context, Runnable onFinish) {
|
||||
ApiClient.getGames(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
|
|
@ -267,6 +323,22 @@ public class AppDataRepository {
|
|||
});
|
||||
}
|
||||
|
||||
public void fetchResidenceOnly( Context context, Runnable onFinish) {
|
||||
ApiClient.getResidence(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
residence = ResidenceParser.parseResidence(jsonText);
|
||||
onFinish.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al obtener residencia: " + error);
|
||||
onFinish.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void fetchResidentsOnly(Context context, Runnable onFinish) {
|
||||
ApiClient.getResidents(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
|
|
@ -283,6 +355,22 @@ public class AppDataRepository {
|
|||
});
|
||||
}
|
||||
|
||||
public void fetchResidentsTakenOutOnly(Context context, Runnable onFinish) {
|
||||
ApiClient.getResidentsTakenOut(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
residentsTakenOut = ResidentParser.parseResidents(jsonText);
|
||||
onFinish.run();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al obtener residentes dados de baja: " + error);
|
||||
onFinish.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void fetchGamesOnly(Context context, Runnable onFinish) {
|
||||
ApiClient.getGames(context, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
|
|
@ -331,17 +419,17 @@ public class AppDataRepository {
|
|||
});
|
||||
}
|
||||
|
||||
public void fetchParticipantsOnly(Context context, List<Activity> sourceActivities, Runnable onFinish) {
|
||||
public void fetchParticipantsOnly(Context context, Runnable onSuccess) {
|
||||
activityResidents.clear();
|
||||
final int total = sourceActivities.size();
|
||||
final int total = activities.size();
|
||||
final int[] completed = {0};
|
||||
|
||||
if (total == 0) {
|
||||
onFinish.run();
|
||||
onSuccess.run();
|
||||
return;
|
||||
}
|
||||
|
||||
for (Activity activity : sourceActivities) {
|
||||
for (Activity activity : activities) {
|
||||
ApiClient.getAllParticipants(context, activity.getId(), new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
|
|
@ -362,7 +450,7 @@ public class AppDataRepository {
|
|||
synchronized (completed) {
|
||||
completed[0]++;
|
||||
if (completed[0] == total) {
|
||||
onFinish.run();
|
||||
onSuccess.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -373,62 +461,236 @@ public class AppDataRepository {
|
|||
|
||||
// -------------------- Otras acciones API --------------------
|
||||
|
||||
public void addActivity(Context context, String nombre, String descripcion, LocalDateTime fecha, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.postEvento(context, nombre, descripcion, fecha, new ApiClient.RawCallback() {
|
||||
public void login(Context context, String email, String password, boolean rememberPassword, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.postLogin(email, password, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchActivities(context, onSuccess);
|
||||
try {
|
||||
JSONObject json = new JSONObject(jsonText);
|
||||
String token = json.getString("token");
|
||||
long expiresIn = json.getLong("expiresIn");
|
||||
long idResidence = json.getLong("idResidencia");
|
||||
long idUser = json.getLong("idUser");
|
||||
|
||||
long tokenExpiration = System.currentTimeMillis() + expiresIn;
|
||||
|
||||
SharedPreferences.Editor editor = SecurePreferencesUtil.getEncryptedPrefs(context).edit();
|
||||
editor.putString("token", token);
|
||||
editor.putLong("token_expiration", tokenExpiration);
|
||||
editor.putBoolean("rememberPassword", rememberPassword);
|
||||
editor.putLong("idResidence", idResidence);
|
||||
editor.putLong("idUser", idUser);
|
||||
|
||||
if (rememberPassword) {
|
||||
editor.putString("email", email);
|
||||
editor.putString("password", password);
|
||||
}
|
||||
|
||||
SecurePreferencesUtil.edit(context, editor);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new ParserException("Error al parsear respuesta de login: " + e.getMessage(), e);
|
||||
}
|
||||
Log.d("API", "Inicio de sesión exitoso");
|
||||
fetchActualUser(context, onSuccess, onError);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al añadir actividad: " + error);
|
||||
Log.e("API", "Error al iniciar sesión: " + error);
|
||||
onError.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteGameStat(Context context, long id, Runnable onSuccess) {
|
||||
public void addResident(Context context, String nombre, String apellido, LocalDate fechaNacimiento, String documentoIdentidad, String familiar1, String familiar2, int year, int month, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.postResident(context, nombre, apellido, fechaNacimiento, documentoIdentidad, familiar1, familiar2, year, month, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchResidentsOnly(context, onSuccess);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al añadir residente: " + error);
|
||||
onError.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void addActivity(Context context, String nombre, String descripcion, LocalDateTime fecha, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.postEvento(context, nombre, descripcion, fecha, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchActivitiesOnly(context, onSuccess);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al añadir actividad: " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void deleteGameStat(Context context, long id, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.deleteGameStat(context, id, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchGameStats(context, onSuccess);
|
||||
fetchGameStatsOnly(context, onSuccess);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al borrar partida: " + error);
|
||||
onSuccess.run(); // puede seguir aunque falle
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateObservation(Context context, String comment, long id, Runnable onSuccess) {
|
||||
public void updateObservation(Context context, String comment, long id, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.patchObservation(context, comment, id, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchGameStats(context, onSuccess);
|
||||
fetchGameStatsOnly(context, onSuccess);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al actualizar observación: " + error);
|
||||
onSuccess.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void changeActivityState(Context context, long id, ActivityState state, Runnable onSuccess) {
|
||||
public void changeActivityState(Context context, long id, ActivityState state, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.patchActivityState(context, id, state, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchActivities(context, onSuccess);
|
||||
fetchActivitiesOnly(context, onSuccess);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
Log.e("API", "Error al cambiar estado: " + error);
|
||||
onSuccess.run();
|
||||
onError.run();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void takeDownResident(Context context, long residentid, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.patchTakeOutResident( context, residentid, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
Log.d("API", "Residente dado de baja correctamente");
|
||||
fetchResidentsOnly(context, onSuccess); //TODO: Que llame a fetchResidentsTakenOutOnly también
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al eliminar residente: " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void updateAssistance(Context context, long activityId, long participantId, boolean assistance, Runnable onSuccess, Runnable onError) {
|
||||
if (assistance){
|
||||
ApiClient.allowParticipant( context, activityId, participantId , new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchParticipantsOnly(context, onSuccess);
|
||||
Log.d("API", "Asistencia actualizada correctamente");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al actualizar asistencia: " + error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ApiClient.denyParticipant( context, activityId, participantId , new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchParticipantsOnly(context, onSuccess);
|
||||
Log.d("API", "Asistencia actualizada correctamente");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al actualizar asistencia: " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
public void updateOpinion(Context context, long activityId, long participantId, boolean isPreOpinion, String opinion, Runnable onSuccess, Runnable onError) {
|
||||
String jsonBody = "";
|
||||
if (isPreOpinion) {
|
||||
jsonBody = "{\"preOpinion\": \"" + opinion + "\"}";
|
||||
} else {
|
||||
jsonBody = "{\"postOpinion\": \"" + opinion + "\"}";
|
||||
}
|
||||
ApiClient.patchParticipant( context, activityId, participantId , jsonBody, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchParticipantsOnly(context, onSuccess);
|
||||
Log.d("API", "Opinión actualizada correctamente");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al actualizar opinión: " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void updateMaterialHelp(Context context, long activityId, long participantId, boolean materialHelp, Runnable onSuccess, Runnable onError) {
|
||||
String jsonBody = "{\"recursosMateriales\": " + materialHelp + "}";
|
||||
ApiClient.patchParticipant( context, activityId, participantId , jsonBody, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchParticipantsOnly(context, onSuccess);
|
||||
Log.d("API", "Ayuda material actualizada correctamente");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al actualizar ayuda material: " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void updateHumanHelp(Context context, long activityId, long participantId, boolean humanHelp, Runnable onSuccess, Runnable onError) {
|
||||
String jsonBody = "{\"recursosHumanos\": " + humanHelp + "}";
|
||||
ApiClient.patchParticipant( context, activityId, participantId , jsonBody, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchParticipantsOnly(context, onSuccess);
|
||||
Log.d("API", "Ayuda humana actualizada correctamente");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al actualizar ayuda humana: " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void addParticipant(Context context, long activityId, long residentId, Runnable onSuccess, Runnable onError) {
|
||||
ApiClient.postParticipant(context, residentId, false, false, "", "", activityId, new ApiClient.RawCallback() {
|
||||
@Override
|
||||
public void onSuccess(String jsonText) {
|
||||
fetchParticipantsOnly(context, onSuccess);
|
||||
Log.d("API", "Participante añadido correctamente");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
onError.run();
|
||||
Log.e("API", "Error al añadir participante: " + error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,26 +1,40 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.account;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
import com.andresgmoran.apptrabajadores.interfaces.IOChangeFragmentListener;
|
||||
import com.andresgmoran.apptrabajadores.models.User;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
|
||||
public class AccountFragment extends Fragment {
|
||||
private Button editAccountButton;
|
||||
private User actualUser = AppDataRepository.getInstance().getActualUser();
|
||||
private Bitmap userImage = AppDataRepository.getInstance().getActualUserImage();
|
||||
|
||||
private View userCardView;
|
||||
private TextView userNameTextView;
|
||||
private ImageView userImageView;
|
||||
private Button residenceButton;
|
||||
private Button languageButton;
|
||||
private Button logOutButton;
|
||||
private IOChangeFragmentListener listener;
|
||||
private IOAccountFragmentListener accountFragmentListener;
|
||||
|
||||
public interface IOAccountFragmentListener {
|
||||
void OnResidenceButtonClicked();
|
||||
void onLanguageSelected(String selectedLanguageCode);
|
||||
void onLogOutButtonClicked();
|
||||
}
|
||||
|
||||
|
|
@ -33,18 +47,61 @@ public class AccountFragment extends Fragment {
|
|||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
editAccountButton = view.findViewById(R.id.edit_account_button);
|
||||
logOutButton = view.findViewById(R.id.btn_cerrar_sesion);
|
||||
editAccountButton.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#0062FF"));
|
||||
|
||||
userCardView = view.findViewById(R.id.account_card_view);
|
||||
|
||||
userCardView.findViewById(R.id.back_button).setVisibility(View.GONE);
|
||||
|
||||
userNameTextView = userCardView.findViewById(R.id.banner_name_game);
|
||||
userNameTextView.setText(actualUser.getName() + " " + actualUser.getSurnames());
|
||||
|
||||
userImageView = userCardView.findViewById(R.id.image_item_person_banner);
|
||||
userImageView.setImageBitmap(userImage);
|
||||
|
||||
residenceButton = view.findViewById(R.id.residence_button_account);
|
||||
residenceButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
listener.changeFragment("AccountFragment");
|
||||
accountFragmentListener.OnResidenceButtonClicked();
|
||||
}
|
||||
});
|
||||
|
||||
languageButton = view.findViewById(R.id.btn_idioma);
|
||||
languageButton.setOnClickListener(v -> {
|
||||
final String[] idiomas = {
|
||||
getString(R.string.es_language_text),
|
||||
getString(R.string.en_language_text),
|
||||
getString(R.string.va_language_text)
|
||||
};
|
||||
final String[] codigos = {"es", "en", "va"};
|
||||
|
||||
new AlertDialog.Builder(requireContext())
|
||||
.setTitle(getString(R.string.select_language_tile))
|
||||
.setItems(idiomas, (dialog, which) -> {
|
||||
String selectedLanguageCode = codigos[which];
|
||||
accountFragmentListener.onLanguageSelected(selectedLanguageCode);
|
||||
})
|
||||
.show();
|
||||
});
|
||||
|
||||
|
||||
logOutButton = view.findViewById(R.id.btn_cerrar_sesion);
|
||||
logOutButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
new AlertDialog.Builder(getContext())
|
||||
.setTitle(getString(R.string.logout_title))
|
||||
.setMessage(getString(R.string.confirm_logout_message))
|
||||
.setPositiveButton( getString(R.string.accept_text), (dialog, which) -> {
|
||||
accountFragmentListener.onLogOutButtonClicked();
|
||||
})
|
||||
.setNegativeButton(getString(R.string.cancel_text), (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
})
|
||||
.show();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -53,7 +110,6 @@ public class AccountFragment extends Fragment {
|
|||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
listener = (IOChangeFragmentListener) context;
|
||||
accountFragmentListener = (IOAccountFragmentListener) context;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.account;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
|
||||
public class EditAccountFragment extends Fragment {
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_edit_account, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +1,48 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
import com.andresgmoran.apptrabajadores.interfaces.IOChangeFragmentListener;
|
||||
import com.andresgmoran.apptrabajadores.interfaces.IOClickOnActivityListener;
|
||||
import com.andresgmoran.apptrabajadores.interfaces.IOnChageStateActivityListener;
|
||||
import com.andresgmoran.apptrabajadores.models.Activity;
|
||||
import com.andresgmoran.apptrabajadores.models.ActivityResident;
|
||||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.models.ActivityState;
|
||||
import com.andresgmoran.apptrabajadores.models.adapters.ActivitiesAdapter;
|
||||
import com.andresgmoran.apptrabajadores.ui.MainActivity;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class ActivitiesFragment extends Fragment {
|
||||
|
||||
public interface IOOnAttachListener{
|
||||
List<Activity> getActivities();
|
||||
List<ActivityResident> getParticipants();
|
||||
private ActivitiesAdapter activitiesAdapter;
|
||||
private RecyclerView activitiesRecyclerView;
|
||||
|
||||
public interface IOnActivities {
|
||||
void onRefreshActivities();
|
||||
void onClickOnAddActivity();
|
||||
}
|
||||
private IOnActivities listener;
|
||||
|
||||
private IOChangeFragmentListener changeFragmentListener;
|
||||
|
||||
private List<Activity> activities;
|
||||
private List<ActivityResident> participants;
|
||||
private List<Activity> activities = AppDataRepository.getInstance().getActivities();
|
||||
private List<ActivityResident> participants = AppDataRepository.getInstance().getActivityResidents();
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
|
@ -47,33 +53,94 @@ public class ActivitiesFragment extends Fragment {
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#CCCCCC"));
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_layout_activities_list);
|
||||
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
((MainActivity) requireActivity()).refreshActivitiesAndReload();
|
||||
listener.onRefreshActivities();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
|
||||
ActivitiesAdapter activitiesAdapter = new ActivitiesAdapter(requireContext(), activities, participants, (IOClickOnActivityListener) requireActivity(), (IOnChageStateActivityListener) requireActivity());
|
||||
RecyclerView activitiesRecyclerView = view.findViewById(R.id.activities_recycleView);
|
||||
activitiesAdapter = new ActivitiesAdapter(requireContext(), activities, participants, (IOClickOnActivityListener) requireActivity(), (IOnChageStateActivityListener) requireActivity());
|
||||
activitiesRecyclerView = view.findViewById(R.id.activities_recycleView);
|
||||
activitiesRecyclerView.setAdapter(activitiesAdapter);
|
||||
activitiesRecyclerView.setHasFixedSize(true);
|
||||
activitiesRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
|
||||
|
||||
FloatingActionButton fab = view.findViewById(R.id.add_activity_button);
|
||||
fab.setOnClickListener(v -> {
|
||||
if (changeFragmentListener != null) {
|
||||
changeFragmentListener.changeFragment("ActivitiesFragment");
|
||||
setupFab(view);
|
||||
filterButton(view);
|
||||
}
|
||||
|
||||
private void setupFab(View view) {
|
||||
MaterialButton fab = view.findViewById(R.id.add_activity_button);
|
||||
|
||||
fab.setOnClickListener(v ->
|
||||
listener.onClickOnAddActivity()
|
||||
);
|
||||
|
||||
|
||||
NestedScrollView scrollView = view.findViewById(R.id.nested_scroll_view_activities);
|
||||
scrollView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
|
||||
private int lastScrollY = 0;
|
||||
private boolean isButtonVisible = true;
|
||||
|
||||
@Override
|
||||
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
|
||||
if (scrollY > lastScrollY + 10 && isButtonVisible) {
|
||||
fab.animate().translationY(fab.getHeight() + 50).alpha(0.0f).setDuration(200).withEndAction(() -> fab.setVisibility(View.GONE));
|
||||
isButtonVisible = false;
|
||||
} else if (scrollY < lastScrollY - 10 && !isButtonVisible) {
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
fab.setAlpha(0f);
|
||||
fab.setTranslationY(fab.getHeight() + 50);
|
||||
fab.animate().translationY(0).alpha(1.0f).setDuration(200);
|
||||
isButtonVisible = true;
|
||||
}
|
||||
lastScrollY = scrollY;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void filterButton(View view){
|
||||
ImageButton filterButton = view.findViewById(R.id.filter_activities_list_button);
|
||||
filterButton.setOnClickListener( v -> {
|
||||
String[] options = {getString(R.string.status_open_filter_text),
|
||||
getString(R.string.status_closed_filter_text),
|
||||
getString(R.string.status_on_going_filter_text),
|
||||
getString(R.string.status_finished_filter_text),
|
||||
getString(R.string.activity_date_filter_text)};
|
||||
|
||||
new androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||
.setTitle(R.string.filter_activities_title)
|
||||
.setItems(options, (dialog, which) -> filterActivities(options[which]))
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
private void filterActivities(String option) {
|
||||
List<Activity> filteredList = new ArrayList<>(AppDataRepository.getInstance().getActivities());
|
||||
|
||||
if (option.equals(getString(R.string.status_open_filter_text))) {
|
||||
filteredList.removeIf(activity -> activity.getState() != ActivityState.ABIERTO);
|
||||
} else if (option.equals(getString(R.string.status_closed_filter_text))) {
|
||||
filteredList.removeIf(activity -> activity.getState() != ActivityState.CERRADO);
|
||||
} else if (option.equals(getString(R.string.status_on_going_filter_text))) {
|
||||
filteredList.removeIf(activity -> activity.getState() != ActivityState.EN_CURSO);
|
||||
} else if (option.equals(getString(R.string.status_finished_filter_text))) {
|
||||
filteredList.removeIf(activity -> activity.getState() != ActivityState.FINALIZADA);
|
||||
} else if (option.equals(getString(R.string.activity_date_filter_text))) {
|
||||
filteredList.sort(Comparator.comparing(Activity::getDate));
|
||||
}
|
||||
|
||||
activitiesAdapter.updateData(filteredList, participants);
|
||||
activitiesRecyclerView.scrollToPosition(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
changeFragmentListener = (IOChangeFragmentListener) context;
|
||||
ActivitiesFragment.IOOnAttachListener attachListener = (ActivitiesFragment.IOOnAttachListener) context;
|
||||
activities = attachListener.getActivities();
|
||||
participants = attachListener.getParticipants();
|
||||
listener = (IOnActivities) context;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.activities;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -27,6 +30,7 @@ import com.andresgmoran.apptrabajadores.models.ActivityResident;
|
|||
import com.andresgmoran.apptrabajadores.models.ActivityState;
|
||||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.models.adapters.ParticipantsAdapter;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
import com.andresgmoran.apptrabajadores.ui.MainActivity;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
|
|
@ -37,15 +41,16 @@ public class ActivityDetailFragment extends Fragment {
|
|||
|
||||
private Activity activity;
|
||||
private List<ActivityResident> participants;
|
||||
private List<Resident> residents;
|
||||
private List<Resident> residents = AppDataRepository.getInstance().getResidents();
|
||||
|
||||
private IOClickOnAddParticipantListener addParticipantListener;
|
||||
private IOnChageStateActivityListener changeStateActivityListener;
|
||||
private IOnClickOnBackButtonListener backButtonListener;
|
||||
|
||||
public interface IOOnAttachListener {
|
||||
List<Resident> getResidents();
|
||||
public interface OnRefreshActivityDetailListener {
|
||||
void onRefreshActivityDetail();
|
||||
}
|
||||
private OnRefreshActivityDetailListener refreshActivityDetailListener;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
|
@ -56,6 +61,10 @@ public class ActivityDetailFragment extends Fragment {
|
|||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#0062FF"));
|
||||
|
||||
setupSwipeRefresh(view);
|
||||
setupBackButton(view);
|
||||
setupActivityInfo(view);
|
||||
|
|
@ -68,7 +77,7 @@ public class ActivityDetailFragment extends Fragment {
|
|||
private void setupSwipeRefresh(View view) {
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_activity_detail);
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
((MainActivity) requireActivity()).refreshActivitiesAndReload();
|
||||
refreshActivityDetailListener.onRefreshActivityDetail();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
}
|
||||
|
|
@ -92,31 +101,30 @@ public class ActivityDetailFragment extends Fragment {
|
|||
|
||||
MaterialButton startEndButton = view.findViewById(R.id.btn_start_end_activity);
|
||||
ActivityState state = activity.getState();
|
||||
|
||||
if (state == ActivityState.ABIERTO){
|
||||
startEndButton.setVisibility(View.GONE);
|
||||
}else {
|
||||
switch (state) {
|
||||
case ABIERTO:
|
||||
configureButton(startEndButton, "Cerrar actividad", R.color.purple_200, () ->
|
||||
changeStateActivityListener.onChangeStateActivity(activity, ActivityState.CERRADO));
|
||||
break;
|
||||
case CERRADO:
|
||||
configureButton(startEndButton, "Iniciar actividad", R.color.purple_200, () ->
|
||||
configureButton(startEndButton, getContext().getString(R.string.start_activity_text), "#59FF00", () ->
|
||||
changeStateActivityListener.onChangeStateActivity(activity, ActivityState.EN_CURSO));
|
||||
break;
|
||||
case EN_CURSO:
|
||||
configureButton(startEndButton, "Finalizar actividad", R.color.teal_200, () ->
|
||||
configureButton(startEndButton, getContext().getString(R.string.finish_activity_text), "#FF0000" , () ->
|
||||
changeStateActivityListener.onChangeStateActivity(activity, ActivityState.FINALIZADA));
|
||||
break;
|
||||
case FINALIZADA:
|
||||
startEndButton.setText("Actividad finalizada");
|
||||
startEndButton.setBackgroundTintList(ContextCompat.getColorStateList(requireContext(), R.color.teal_200));
|
||||
startEndButton.setText(getContext().getString(R.string.activity_finished_text));
|
||||
startEndButton.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor("#324F5E")));
|
||||
startEndButton.setEnabled(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void configureButton(MaterialButton button, String text, int colorRes, Runnable onClick) {
|
||||
private void configureButton(MaterialButton button, String text, String hexColor, Runnable onClick) {
|
||||
button.setText(text);
|
||||
button.setBackgroundTintList(ContextCompat.getColorStateList(requireContext(), colorRes));
|
||||
button.setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(hexColor)));
|
||||
button.setOnClickListener(v -> onClick.run());
|
||||
}
|
||||
|
||||
|
|
@ -150,8 +158,10 @@ public class ActivityDetailFragment extends Fragment {
|
|||
int humanCount = 0, materialCount = 0;
|
||||
for (ActivityResident p : participants) {
|
||||
if (p.getActivityId() == activity.getId()) {
|
||||
if (p.isHumanHelp()) humanCount++;
|
||||
else if (p.isMaterialHelp()) materialCount++;
|
||||
if (p.isHumanHelp())
|
||||
humanCount++;
|
||||
if (p.isMaterialHelp())
|
||||
materialCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -169,11 +179,11 @@ public class ActivityDetailFragment extends Fragment {
|
|||
|
||||
private void setupFab(View view) {
|
||||
MaterialButton fab = view.findViewById(R.id.add_participant_button);
|
||||
if (activity.getState() == ActivityState.CERRADO) {
|
||||
if (activity.getState() != ActivityState.ABIERTO) {
|
||||
fab.setVisibility(View.GONE);
|
||||
} else {
|
||||
fab.setOnClickListener(v ->
|
||||
addParticipantListener.onClickOnAddParticipant(activity, participants, residents)
|
||||
addParticipantListener.onClickOnAddParticipant(activity, participants)
|
||||
);
|
||||
|
||||
NestedScrollView scrollView = view.findViewById(R.id.nested_scroll_game_detail);
|
||||
|
|
@ -208,7 +218,8 @@ public class ActivityDetailFragment extends Fragment {
|
|||
participants = (List<ActivityResident>) getArguments().getSerializable("participants");
|
||||
}
|
||||
|
||||
residents = ((IOOnAttachListener) context).getResidents();
|
||||
refreshActivityDetailListener = (OnRefreshActivityDetailListener) context;
|
||||
|
||||
addParticipantListener = (IOClickOnAddParticipantListener) context;
|
||||
changeStateActivityListener = (IOnChageStateActivityListener) context;
|
||||
backButtonListener = (IOnClickOnBackButtonListener) context;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.activities;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.TimePickerDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.TextView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TimePicker;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
|
@ -16,20 +19,21 @@ import androidx.fragment.app.Fragment;
|
|||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
|
||||
public class AddActivityFragment extends Fragment {
|
||||
|
||||
public interface IOnAddActivity {
|
||||
void onAddActivity(String activityName, String activityDescription, LocalDateTime date);
|
||||
void onAddActivity(String activityName, String activityDescription, LocalDateTime dateTime);
|
||||
}
|
||||
|
||||
private IOnAddActivity listener;
|
||||
|
||||
private Button buttonFecha;
|
||||
private LocalDateTime selectedDate;
|
||||
private EditText nameEditText;
|
||||
private EditText descriptionEditText;
|
||||
private LocalDateTime selectedDateTime;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
|
@ -41,22 +45,19 @@ public class AddActivityFragment extends Fragment {
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
TextView textViewNombre = view.findViewById(R.id.add_activity_name_input);
|
||||
TextView textViewDescripcion = view.findViewById(R.id.add_activity_description_input);
|
||||
nameEditText = view.findViewById(R.id.add_activity_name_input);
|
||||
descriptionEditText = view.findViewById(R.id.add_activity_description_input);
|
||||
buttonFecha = view.findViewById(R.id.buttonFecha);
|
||||
Button buttonAgregar = view.findViewById(R.id.save_new_activity_button);
|
||||
|
||||
buttonFecha.setOnClickListener(v -> showDatePickerDialog());
|
||||
|
||||
buttonAgregar.setOnClickListener(v -> {
|
||||
String activityName = textViewNombre.getText().toString();
|
||||
String activityDescription = textViewDescripcion.getText().toString();
|
||||
if (validarCampos()) {
|
||||
String activityName = nameEditText.getText().toString().trim();
|
||||
String activityDescription = descriptionEditText.getText().toString().trim();
|
||||
|
||||
if (activityName.isEmpty() || activityDescription.isEmpty() || selectedDate == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (listener != null) {
|
||||
listener.onAddActivity(activityName, activityDescription, selectedDate);
|
||||
listener.onAddActivity(activityName, activityDescription, selectedDateTime);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -67,16 +68,49 @@ public class AddActivityFragment extends Fragment {
|
|||
int month = calendar.get(Calendar.MONTH);
|
||||
int day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
|
||||
DatePickerDialog datePickerDialog = new DatePickerDialog(
|
||||
new DatePickerDialog(
|
||||
requireContext(),
|
||||
(DatePicker view, int selectedYear, int selectedMonth, int selectedDayOfMonth) -> {
|
||||
selectedDate = LocalDateTime.of(selectedYear, selectedMonth + 1, selectedDayOfMonth, 0, 0);
|
||||
buttonFecha.setText(selectedDate.toLocalDate().toString());
|
||||
showTimePickerDialog(selectedYear, selectedMonth + 1, selectedDayOfMonth);
|
||||
},
|
||||
year, month, day
|
||||
);
|
||||
).show();
|
||||
}
|
||||
|
||||
datePickerDialog.show();
|
||||
private void showTimePickerDialog(int year, int month, int dayOfMonth) {
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
int hour = calendar.get(Calendar.HOUR_OF_DAY);
|
||||
int minute = calendar.get(Calendar.MINUTE);
|
||||
|
||||
new TimePickerDialog(
|
||||
requireContext(),
|
||||
(TimePicker view, int selectedHour, int selectedMinute) -> {
|
||||
selectedDateTime = LocalDateTime.of(year, month, dayOfMonth, selectedHour, selectedMinute);
|
||||
buttonFecha.setText(selectedDateTime.toString().replace('T', ' '));
|
||||
},
|
||||
hour, minute, true
|
||||
).show();
|
||||
}
|
||||
|
||||
private boolean validarCampos() {
|
||||
boolean valido = true;
|
||||
|
||||
if (TextUtils.isEmpty(nameEditText.getText())) {
|
||||
nameEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(descriptionEditText.getText())) {
|
||||
descriptionEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (selectedDateTime == null) {
|
||||
buttonFecha.setError("Selecciona fecha y hora");
|
||||
valido = false;
|
||||
} else {
|
||||
buttonFecha.setError(null); // limpia error si está bien
|
||||
}
|
||||
|
||||
return valido;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.activities;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
@ -17,26 +17,37 @@ import com.andresgmoran.apptrabajadores.R;
|
|||
import com.andresgmoran.apptrabajadores.models.ActivityResident;
|
||||
|
||||
public class OpinionFragment extends Fragment {
|
||||
|
||||
private ActivityResident participant;
|
||||
private boolean isPreOpinion;
|
||||
|
||||
public interface OnAddOpinionListener {
|
||||
void onAddOpinion(ActivityResident participant, boolean isPreOpinion, String opinion);
|
||||
}
|
||||
|
||||
private OnAddOpinionListener listener;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_add_opinion, container, false); }
|
||||
return inflater.inflate(R.layout.fragment_add_opinion, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
EditText opinionEditText = view.findViewById(R.id.opinion_edit_text);
|
||||
Button addOpinionButton = view.findViewById(R.id.add_opinion_button);
|
||||
|
||||
addOpinionButton.setOnClickListener(v -> {
|
||||
String opinion = opinionEditText.getText().toString();
|
||||
String opinion = opinionEditText.getText().toString().trim();
|
||||
|
||||
if (TextUtils.isEmpty(opinion)) {
|
||||
opinionEditText.setError("Campo obligatorio");
|
||||
return;
|
||||
}
|
||||
|
||||
requireActivity().getSupportFragmentManager().popBackStack();
|
||||
listener.onAddOpinion(participant, isPreOpinion, opinion);
|
||||
});
|
||||
|
|
@ -45,11 +56,16 @@ public class OpinionFragment extends Fragment {
|
|||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
if (context instanceof OnAddOpinionListener) {
|
||||
listener = (OnAddOpinionListener) context;
|
||||
} else {
|
||||
throw new RuntimeException(context + " must implement OnAddOpinionListener");
|
||||
}
|
||||
|
||||
if (getArguments() != null) {
|
||||
participant = (ActivityResident) getArguments().getSerializable("participant");
|
||||
isPreOpinion = getArguments().getBoolean("isPreOpinion");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,133 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
import com.andresgmoran.apptrabajadores.interfaces.IOnClickOnBackButtonListener;
|
||||
import com.andresgmoran.apptrabajadores.models.Activity;
|
||||
import com.andresgmoran.apptrabajadores.models.ActivityResident;
|
||||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ParticipantDetailFragment extends Fragment {
|
||||
|
||||
private ImageButton backButton;
|
||||
|
||||
private TextView participantNameTextView;
|
||||
private ImageView participantImageView;
|
||||
private TextView participantActivityTextView;
|
||||
private TextView needMaterialHelpTextView;
|
||||
private TextView needHumanHelpTextView;
|
||||
private TextView preOpinionTextView;
|
||||
private TextView postOpinionTextView;
|
||||
|
||||
private ActivityResident participant;
|
||||
private List<Resident> residents;
|
||||
private List<Activity> activities;
|
||||
|
||||
public interface IOnRefreshParticipantDetailListener {
|
||||
void onRefreshParticipantDetail();
|
||||
}
|
||||
|
||||
private IOnRefreshParticipantDetailListener refreshParticipantDetailListener;
|
||||
private IOnClickOnBackButtonListener backButtonListener;
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_participant_detail, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#0062FF"));
|
||||
|
||||
View participantCardView = view.findViewById(R.id.participant_card_view);
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_participant_detail);
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
refreshParticipantDetailListener.onRefreshParticipantDetail();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
|
||||
backButton = participantCardView.findViewById(R.id.back_button);
|
||||
backButton.setOnClickListener(v -> backButtonListener.onClickOnBackButton());
|
||||
|
||||
|
||||
participantNameTextView = participantCardView.findViewById( R.id.banner_name_game);
|
||||
participantImageView = participantCardView.findViewById(R.id.image_item_person_banner);
|
||||
participantActivityTextView = view.findViewById(R.id.tv_activity_participant);
|
||||
needMaterialHelpTextView = view.findViewById(R.id.tv_need_material_help_participant_detail);
|
||||
needHumanHelpTextView = view.findViewById(R.id.tv_need_human_help_participant_detail);
|
||||
preOpinionTextView = view.findViewById(R.id.tv_pre_opinion_participant_detail);
|
||||
postOpinionTextView = view.findViewById(R.id.tv_post_opinion_participant_detail);
|
||||
|
||||
for (Resident resident : residents) {
|
||||
if (resident.getId().equals(participant.getIdResident())) {
|
||||
participantNameTextView.setText(resident.getName() + " " + resident.getSurnames());
|
||||
//participantImageView.setImageBitmap(resident.getImage());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (Activity activity : activities) {
|
||||
if (activity.getId().equals(participant.getActivityId())) {
|
||||
participantActivityTextView.setText(activity.getName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (participant.isMaterialHelp())
|
||||
needMaterialHelpTextView.setText("Si");
|
||||
else
|
||||
needMaterialHelpTextView.setText("No");
|
||||
|
||||
if (participant.isHumanHelp())
|
||||
needHumanHelpTextView.setText("Si");
|
||||
else
|
||||
needHumanHelpTextView.setText("No");
|
||||
|
||||
if (participant.getPreOpinion().isEmpty())
|
||||
preOpinionTextView.setText("No hay opinión previa");
|
||||
else
|
||||
preOpinionTextView.setText(participant.getPreOpinion());
|
||||
|
||||
if (participant.getPostOpinion().isEmpty())
|
||||
postOpinionTextView.setText("No hay opinión posterior");
|
||||
else
|
||||
postOpinionTextView.setText(participant.getPostOpinion());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (getArguments() != null) {
|
||||
participant = (ActivityResident) getArguments().getSerializable("participant");
|
||||
}
|
||||
residents = AppDataRepository.getInstance().getResidents();
|
||||
activities = AppDataRepository.getInstance().getActivities();
|
||||
|
||||
refreshParticipantDetailListener = (IOnRefreshParticipantDetailListener) context;
|
||||
backButtonListener = (IOnClickOnBackButtonListener) context;
|
||||
}
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ import androidx.fragment.app.DialogFragment;
|
|||
import com.andresgmoran.apptrabajadores.models.Activity;
|
||||
import com.andresgmoran.apptrabajadores.models.ActivityResident;
|
||||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -26,8 +27,7 @@ public class ParticipantSelectionDialogFragment extends DialogFragment {
|
|||
private List<ActivityResident> participants;
|
||||
private List<Resident> residentList;
|
||||
|
||||
public ParticipantSelectionDialogFragment(Activity activityId, List<ActivityResident> participants, List<Resident> residents) {
|
||||
this.residentList = residents;
|
||||
public ParticipantSelectionDialogFragment(Activity activityId, List<ActivityResident> participants) {
|
||||
this.participants = participants;
|
||||
this.activityId = activityId;
|
||||
}
|
||||
|
|
@ -68,6 +68,8 @@ public class ParticipantSelectionDialogFragment extends DialogFragment {
|
|||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
residentList = AppDataRepository.getInstance().getResidents();
|
||||
if (context instanceof OnParticipantSelectedListener) {
|
||||
listener = (OnParticipantSelectedListener) context;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.andresgmoran.apptrabajadores.ui.fragments.game;
|
|||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -23,6 +24,7 @@ import com.andresgmoran.apptrabajadores.models.Game;
|
|||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.models.adapters.LastGamesAdapter;
|
||||
import com.andresgmoran.apptrabajadores.models.gameStats.GameStat;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
import com.andresgmoran.apptrabajadores.ui.MainActivity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -30,10 +32,15 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class GameFragment extends Fragment {
|
||||
private List<GameStat> gameStats;
|
||||
private List<Resident> residents;
|
||||
private List<GameStat> gameStats = AppDataRepository.getInstance().getGameStats();
|
||||
private List<Resident> residents = AppDataRepository.getInstance().getResidents();
|
||||
private Game game;
|
||||
|
||||
public interface IOnRefreshGameListener {
|
||||
void onRefreshGameStats();
|
||||
}
|
||||
private IOnRefreshGameListener refreshGameListener;
|
||||
|
||||
private IOnClickOnBackButtonListener backButtonListener;
|
||||
|
||||
private TextView gameNameTextView;
|
||||
|
|
@ -50,6 +57,10 @@ public class GameFragment extends Fragment {
|
|||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#0062FF"));
|
||||
|
||||
gameNameTextView = view.findViewById(R.id.banner_name_game);
|
||||
numberOfGamesLastWeekTextView = view.findViewById(R.id.tv_number_of_games_last_week);
|
||||
totalGamesPlayedTextView = view.findViewById(R.id.tv_total_games_played);
|
||||
|
|
@ -58,7 +69,7 @@ public class GameFragment extends Fragment {
|
|||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_game);
|
||||
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
((MainActivity) requireActivity()).refreshGameStatsAndReload();
|
||||
refreshGameListener.onRefreshGameStats();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
|
||||
|
|
@ -142,11 +153,10 @@ public class GameFragment extends Fragment {
|
|||
super.onAttach(context);
|
||||
|
||||
if(getArguments() != null) {
|
||||
gameStats = (List<GameStat>) getArguments().getSerializable("gameStats");
|
||||
residents = (List<Resident>) getArguments().getSerializable("residents");
|
||||
game = (Game) getArguments().getSerializable("game");
|
||||
|
||||
}
|
||||
refreshGameListener = (IOnRefreshGameListener) context;
|
||||
backButtonListener = (IOnClickOnBackButtonListener) context;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.gameDetail;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -21,6 +22,7 @@ import com.andresgmoran.apptrabajadores.models.Game;
|
|||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.models.User;
|
||||
import com.andresgmoran.apptrabajadores.models.gameStats.GameStat;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
import com.andresgmoran.apptrabajadores.ui.MainActivity;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -29,16 +31,19 @@ public class GameDetailFragment extends Fragment {
|
|||
|
||||
public interface IOnAddObservationListener {
|
||||
void onAddObservation(String observation, long gameId, long gameStatId);
|
||||
List<User> getUsers();
|
||||
}
|
||||
public interface IOnRefreshGameStatsListener {
|
||||
void onRefreshGameStats();
|
||||
}
|
||||
private IOnRefreshGameStatsListener refreshGameStatsListener;
|
||||
private IOnAddObservationListener addObservationListener;
|
||||
private IOnClickOnBackButtonListener backButtonListener;
|
||||
|
||||
private GameStat gameStat;
|
||||
private Resident gameStatResident;
|
||||
private Game gameStatGame;
|
||||
private User actualUser;
|
||||
private List<User> users;
|
||||
private User actualUser = AppDataRepository.getInstance().getActualUser();
|
||||
private List<User> users = AppDataRepository.getInstance().getUsers();
|
||||
|
||||
private TextView residentNameTextView;
|
||||
private TextView gameNameTextView;
|
||||
|
|
@ -57,10 +62,13 @@ public class GameDetailFragment extends Fragment {
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#0062FF"));
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_game_detail);
|
||||
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
((MainActivity) requireActivity()).refreshGameStatsAndReload();
|
||||
refreshGameStatsListener.onRefreshGameStats();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
|
||||
|
|
@ -131,16 +139,14 @@ public class GameDetailFragment extends Fragment {
|
|||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
refreshGameStatsListener = (IOnRefreshGameStatsListener) context;
|
||||
addObservationListener = (IOnAddObservationListener) context;
|
||||
backButtonListener = (IOnClickOnBackButtonListener) context;
|
||||
|
||||
users = addObservationListener.getUsers();
|
||||
|
||||
if(getArguments() != null) {
|
||||
gameStat = (GameStat) getArguments().getSerializable("gameStat");
|
||||
gameStatResident = (Resident) getArguments().getSerializable("gameStatResident");
|
||||
gameStatGame = (Game) getArguments().getSerializable("gameStatGame");
|
||||
actualUser = (User) getArguments().getSerializable("user");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.andresgmoran.apptrabajadores.ui.fragments.home;
|
|||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
|
@ -11,8 +12,8 @@ import android.widget.TextView;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
|
@ -28,29 +29,23 @@ import com.andresgmoran.apptrabajadores.models.adapters.GamesAdapter;
|
|||
import com.andresgmoran.apptrabajadores.models.adapters.LastGamesAdapter;
|
||||
import com.andresgmoran.apptrabajadores.models.adapters.ResidentsAdapter;
|
||||
import com.andresgmoran.apptrabajadores.models.gameStats.GameStat;
|
||||
import com.andresgmoran.apptrabajadores.ui.MainActivity;
|
||||
import com.andresgmoran.apptrabajadores.viewmodel.HomeViewModel;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class HomeFragment extends Fragment {
|
||||
|
||||
public interface IOnAttachListener {
|
||||
List<Resident> getResidents();
|
||||
List<GameStat> getGameStats();
|
||||
List<Game> getGames();
|
||||
User getActualUser();
|
||||
Bitmap getActualUserImage();
|
||||
}
|
||||
|
||||
private List<Resident> residents;
|
||||
private List<GameStat> gameStats;
|
||||
private List<Game> games;
|
||||
private User user;
|
||||
private Bitmap userImageBitmap;
|
||||
private List<Resident> residents = AppDataRepository.getInstance().getResidents();
|
||||
private List<GameStat> gameStats = AppDataRepository.getInstance().getGameStats();
|
||||
private List<Game> games = AppDataRepository.getInstance().getGames();
|
||||
private User user = AppDataRepository.getInstance().getActualUser();
|
||||
private Bitmap userImageBitmap = AppDataRepository.getInstance().getActualUserImage();
|
||||
|
||||
private TextView userNameTextView;
|
||||
private ImageView userImage;
|
||||
|
|
@ -63,6 +58,17 @@ public class HomeFragment extends Fragment {
|
|||
|
||||
private GamesAdapter gamesAdapter;
|
||||
private ResidentsAdapter residentsAdapter;
|
||||
private LastGamesAdapter lastGamesAdapter;
|
||||
|
||||
public interface IOnRefreshHomeListener {
|
||||
void onRefreshHome();
|
||||
}
|
||||
private IOnRefreshHomeListener refreshListener;
|
||||
|
||||
public interface IOnClickOnAddParticipantListener {
|
||||
void onClickOnAddParticipant();
|
||||
}
|
||||
private IOnClickOnAddParticipantListener addParticipantListener;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
|
@ -73,18 +79,23 @@ public class HomeFragment extends Fragment {
|
|||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#CCCCCC"));
|
||||
|
||||
setupSwipeRefresh(view);
|
||||
setupUserInfo(view);
|
||||
setupLastGamesList(view);
|
||||
setupGamesList(view);
|
||||
setupResidentsList(view);
|
||||
setupFilterButtons(view);
|
||||
setupFab(view);
|
||||
}
|
||||
|
||||
private void setupSwipeRefresh(View view) {
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_home);
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
((MainActivity) requireActivity()).refreshGameStatsAndReload();
|
||||
refreshListener.onRefreshHome();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
}
|
||||
|
|
@ -100,8 +111,8 @@ public class HomeFragment extends Fragment {
|
|||
emptyLatestGamesText = view.findViewById(R.id.tv_lastgames_empty_home);
|
||||
recyclerViewLastGames = view.findViewById(R.id.latestGames_recycleView_home);
|
||||
|
||||
LastGamesAdapter adapter = new LastGamesAdapter(gameStats, games, residents, (IOClickOnGameStatsListener) requireActivity());
|
||||
recyclerViewLastGames.setAdapter(adapter);
|
||||
lastGamesAdapter = new LastGamesAdapter(gameStats, games, residents, (IOClickOnGameStatsListener) requireActivity());
|
||||
recyclerViewLastGames.setAdapter(lastGamesAdapter);
|
||||
recyclerViewLastGames.setHasFixedSize(true);
|
||||
recyclerViewLastGames.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false));
|
||||
|
||||
|
|
@ -118,7 +129,9 @@ public class HomeFragment extends Fragment {
|
|||
emptyGamesText = view.findViewById(R.id.tv_games_empty_home);
|
||||
recyclerViewGames = view.findViewById(R.id.games_recycleView_home);
|
||||
|
||||
gamesAdapter = new GamesAdapter(games, (IOClickOnGameListener) requireActivity());
|
||||
Map<Long, Double> weeklyPercentages = calculateWeeklyGamePercentages();
|
||||
|
||||
gamesAdapter = new GamesAdapter(games, (IOClickOnGameListener) requireActivity(), weeklyPercentages);
|
||||
recyclerViewGames.setAdapter(gamesAdapter);
|
||||
recyclerViewGames.setHasFixedSize(true);
|
||||
recyclerViewGames.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||
|
|
@ -132,6 +145,29 @@ public class HomeFragment extends Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
private Map<Long, Double> calculateWeeklyGamePercentages() {
|
||||
LocalDateTime oneWeekAgo = LocalDateTime.now().minusDays(7);
|
||||
Map<Long, Long> countMap = new HashMap<>();
|
||||
|
||||
for (Game game : games) {
|
||||
long count = gameStats.stream()
|
||||
.filter(stat -> stat.getGameId() == game.getId())
|
||||
.filter(stat -> stat.getDateTime().isAfter(oneWeekAgo))
|
||||
.count();
|
||||
countMap.put(game.getId(), count);
|
||||
}
|
||||
|
||||
long total = countMap.values().stream().mapToLong(Long::longValue).sum();
|
||||
Map<Long, Double> percentageMap = new HashMap<>();
|
||||
|
||||
for (Map.Entry<Long, Long> entry : countMap.entrySet()) {
|
||||
double percentage = total > 0 ? (entry.getValue() * 100.0) / total : 0;
|
||||
percentageMap.put(entry.getKey(), percentage);
|
||||
}
|
||||
|
||||
return percentageMap;
|
||||
}
|
||||
|
||||
private void setupResidentsList(View view) {
|
||||
emptyResidentsText = view.findViewById(R.id.tv_residents_empty_home);
|
||||
recyclerViewResidents = view.findViewById(R.id.residents_recycleView_home);
|
||||
|
|
@ -148,63 +184,104 @@ public class HomeFragment extends Fragment {
|
|||
recyclerViewResidents.setVisibility(View.VISIBLE);
|
||||
emptyResidentsText.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
filterResidentsList("default");
|
||||
}
|
||||
|
||||
private void setupFilterButtons(View view) {
|
||||
View filterGamesButton = view.findViewById(R.id.filter_games_list_button);
|
||||
View filterResidentsButton = view.findViewById(R.id.filter_residents_list_button);
|
||||
View filterLastGamesButton = view.findViewById(R.id.filter_lastgames_list_button);
|
||||
|
||||
filterGamesButton.setOnClickListener(v -> showGamesFilterDialog());
|
||||
filterResidentsButton.setOnClickListener(v -> showResidentsFilterDialog());
|
||||
filterLastGamesButton.setOnClickListener(v -> showLastGamesFilterDialog());
|
||||
}
|
||||
|
||||
private void setupFab(View view) {
|
||||
MaterialButton fab = view.findViewById(R.id.add_resident_button);
|
||||
|
||||
fab.setOnClickListener(v ->
|
||||
addParticipantListener.onClickOnAddParticipant()
|
||||
);
|
||||
|
||||
NestedScrollView scrollView = view.findViewById(R.id.nested_scroll_view_home);
|
||||
scrollView.setOnScrollChangeListener(new View.OnScrollChangeListener() {
|
||||
private int lastScrollY = 0;
|
||||
private boolean isButtonVisible = true;
|
||||
|
||||
@Override
|
||||
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
|
||||
if (scrollY > lastScrollY + 10 && isButtonVisible) {
|
||||
fab.animate().translationY(fab.getHeight() + 50).alpha(0.0f).setDuration(200).withEndAction(() -> fab.setVisibility(View.GONE));
|
||||
isButtonVisible = false;
|
||||
} else if (scrollY < lastScrollY - 10 && !isButtonVisible) {
|
||||
fab.setVisibility(View.VISIBLE);
|
||||
fab.setAlpha(0f);
|
||||
fab.setTranslationY(fab.getHeight() + 50);
|
||||
fab.animate().translationY(0).alpha(1.0f).setDuration(200);
|
||||
isButtonVisible = true;
|
||||
}
|
||||
lastScrollY = scrollY;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
IOnAttachListener attachListener = (IOnAttachListener) context;
|
||||
|
||||
user = attachListener.getActualUser();
|
||||
userImageBitmap = attachListener.getActualUserImage();
|
||||
residents = attachListener.getResidents();
|
||||
games = attachListener.getGames();
|
||||
gameStats = attachListener.getGameStats();
|
||||
refreshListener = (IOnRefreshHomeListener) context;
|
||||
addParticipantListener = (IOnClickOnAddParticipantListener) context;
|
||||
}
|
||||
|
||||
private void showGamesFilterDialog() {
|
||||
String[] options = {"A-Z", "Z-A", "Más jugados"};
|
||||
String[] options = {getString(R.string.game_name_a_z_filter_text), getString(R.string.game_name_z_a_filter_text), getString(R.string.most_played_filter_text)};
|
||||
|
||||
new androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||
.setTitle("Filtrar juegos")
|
||||
.setTitle(R.string.filter_games_title)
|
||||
.setItems(options, (dialog, which) -> filterGamesList(options[which]))
|
||||
.show();
|
||||
}
|
||||
|
||||
private void showResidentsFilterDialog() {
|
||||
String[] options = {"A-Z", "Z-A", "Fecha de nacimiento"};
|
||||
String[] options = {getString(R.string.resident_name_a_z_filter_text), getString(R.string.resident_name_z_a_filter_text), getString(R.string.date_of_birth_filter_text)};
|
||||
|
||||
new androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||
.setTitle("Filtrar residentes")
|
||||
.setTitle(R.string.filter_residents_title)
|
||||
.setItems(options, (dialog, which) -> filterResidentsList(options[which]))
|
||||
.show();
|
||||
}
|
||||
|
||||
private void showLastGamesFilterDialog() {
|
||||
String[] options = {
|
||||
getString(R.string.resident_name_a_z_filter_text),
|
||||
getString(R.string.resident_name_z_a_filter_text),
|
||||
getString(R.string.game_name_a_z_filter_text),
|
||||
getString(R.string.game_name_z_a_filter_text),
|
||||
getString(R.string.first_to_last_filter_text),
|
||||
getString(R.string.last_to_first_filter_text),
|
||||
};
|
||||
|
||||
new androidx.appcompat.app.AlertDialog.Builder(requireContext())
|
||||
.setTitle(getString( R.string.filter_last_games_title))
|
||||
.setItems(options, (dialog, which) -> filterLastGamesList(options[which]))
|
||||
.show();
|
||||
}
|
||||
|
||||
private void filterGamesList(String option) {
|
||||
List<Game> filteredList = new ArrayList<>(games);
|
||||
|
||||
switch (option) {
|
||||
case "A-Z":
|
||||
if (option.equals(getString(R.string.game_name_a_z_filter_text))) {
|
||||
filteredList.sort(Comparator.comparing(Game::getName));
|
||||
break;
|
||||
case "Z-A":
|
||||
} else if (option.equals(getString(R.string.game_name_z_a_filter_text))) {
|
||||
filteredList.sort((g1, g2) -> g2.getName().compareTo(g1.getName()));
|
||||
break;
|
||||
case "Más jugados":
|
||||
} else if (option.equals(getString(R.string.most_played_filter_text))) {
|
||||
filteredList.sort((g1, g2) -> {
|
||||
long count1 = gameStats.stream().filter(stat -> stat.getGameId() == g1.getId()).count();
|
||||
long count2 = gameStats.stream().filter(stat -> stat.getGameId() == g2.getId()).count();
|
||||
return Long.compare(count2, count1);
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
gamesAdapter.updateData(filteredList);
|
||||
|
|
@ -214,19 +291,56 @@ public class HomeFragment extends Fragment {
|
|||
private void filterResidentsList(String option) {
|
||||
List<Resident> filteredList = new ArrayList<>(residents);
|
||||
|
||||
switch (option) {
|
||||
case "A-Z":
|
||||
if (option.equals(getString(R.string.resident_name_a_z_filter_text))) {
|
||||
filteredList.sort(Comparator.comparing(Resident::getName));
|
||||
break;
|
||||
case "Z-A":
|
||||
} else if (option.equals(getString(R.string.resident_name_z_a_filter_text))) {
|
||||
filteredList.sort((r1, r2) -> r2.getName().compareTo(r1.getName()));
|
||||
break;
|
||||
case "Fecha de nacimiento":
|
||||
} else if (option.equals(getString(R.string.date_of_birth_filter_text))) {
|
||||
filteredList.sort(Comparator.comparing(Resident::getBirthDate));
|
||||
break;
|
||||
} else {
|
||||
filteredList.sort((r1, r2) -> Long.compare(r2.getId(), r1.getId()));
|
||||
}
|
||||
|
||||
residentsAdapter.updateData(filteredList);
|
||||
recyclerViewResidents.scrollToPosition(0);
|
||||
}
|
||||
|
||||
private void filterLastGamesList(String option) {
|
||||
List<GameStat> filteredList = new ArrayList<>(gameStats);
|
||||
|
||||
if (option.equals(getString(R.string.resident_name_a_z_filter_text))) {
|
||||
filteredList.sort(Comparator.comparing(stat -> getResidentNameById(stat.getResidentId())));
|
||||
} else if (option.equals(getString(R.string.resident_name_z_a_filter_text))) {
|
||||
filteredList.sort((s1, s2) -> getResidentNameById(s2.getResidentId()).compareTo(getResidentNameById(s1.getResidentId())));
|
||||
} else if (option.equals(getString(R.string.game_name_a_z_filter_text))) {
|
||||
filteredList.sort(Comparator.comparing(stat -> getGameNameById(stat.getGameId())));
|
||||
} else if (option.equals(getString(R.string.game_name_z_a_filter_text))) {
|
||||
filteredList.sort((s1, s2) -> getGameNameById(s2.getGameId()).compareTo(getGameNameById(s1.getGameId())));
|
||||
} else if (option.equals(getString(R.string.first_to_last_filter_text))) {
|
||||
filteredList.sort(Comparator.comparing(GameStat::getDateTime));
|
||||
} else if (option.equals(getString(R.string.last_to_first_filter_text))) {
|
||||
filteredList.sort((s1, s2) -> s2.getDateTime().compareTo(s1.getDateTime()));
|
||||
} else {
|
||||
filteredList.sort((s1, s2) -> s2.getDateTime().compareTo(s1.getDateTime()));
|
||||
}
|
||||
|
||||
lastGamesAdapter.updateData(filteredList);
|
||||
recyclerViewLastGames.scrollToPosition(0);
|
||||
}
|
||||
|
||||
private String getResidentNameById(Long id) {
|
||||
return residents.stream()
|
||||
.filter(r -> r.getId().equals(id))
|
||||
.map(Resident::getName)
|
||||
.findFirst()
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
private String getGameNameById(Long id) {
|
||||
return games.stream()
|
||||
.filter(g -> g.getId().equals(id))
|
||||
.map(Game::getName)
|
||||
.findFirst()
|
||||
.orElse("");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,311 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.residence;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
import com.andresgmoran.apptrabajadores.interfaces.IOnClickOnBackButtonListener;
|
||||
import com.andresgmoran.apptrabajadores.models.Game;
|
||||
import com.andresgmoran.apptrabajadores.models.Residence;
|
||||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.models.gameStats.GameStat;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
import com.andresgmoran.apptrabajadores.ui.graphics.CustomBarChartView;
|
||||
import com.andresgmoran.apptrabajadores.ui.graphics.CustomPieChartView;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ResidenceDetailFragment extends Fragment {
|
||||
|
||||
private TextView residenceNameTextView;
|
||||
private TextView totalResidentsTextView;
|
||||
private TextView residentsTakenOutTextView;
|
||||
private TextView allGamesTextView;
|
||||
private TextView gamesLastWeekTextView;
|
||||
private TextView statsEmptyTextView;
|
||||
|
||||
private CardView pieChartCardView;
|
||||
private CustomPieChartView pieChart;
|
||||
private LinearLayout barChartsContainer;
|
||||
|
||||
private Residence residence;
|
||||
private List<Resident> residents;
|
||||
private List<Resident> residentsTakenOut;
|
||||
private List<GameStat> gameStats;
|
||||
private List<Game> games;
|
||||
|
||||
public interface IOnRefreshResidenceDetailListener {
|
||||
void onRefreshResidenceDetail();
|
||||
}
|
||||
|
||||
private IOnRefreshResidenceDetailListener refreshListener;
|
||||
private IOnClickOnBackButtonListener backButtonListener;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_residence_detail, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#0062FF"));
|
||||
|
||||
setupSwipeRefresh(view);
|
||||
setupBackButton(view);
|
||||
|
||||
residenceNameTextView = view.findViewById(R.id.residence_detail_name);
|
||||
totalResidentsTextView = view.findViewById(R.id.tv_residents_residence_detail);
|
||||
residentsTakenOutTextView = view.findViewById(R.id.tv_residents_taken_down_residence_detail);
|
||||
allGamesTextView = view.findViewById(R.id.tv_total_games_residence_detail);
|
||||
gamesLastWeekTextView = view.findViewById(R.id.tv_games_last_week_residence_detail);
|
||||
updateUI();
|
||||
|
||||
statsEmptyTextView = view.findViewById(R.id.tv_stats_empty_residence_detail);
|
||||
pieChartCardView = view.findViewById(R.id.pieCard_residence_detail);
|
||||
pieChart = view.findViewById(R.id.pieChart_residence_detail);
|
||||
barChartsContainer = view.findViewById(R.id.barChartsContainer_residence_detail);
|
||||
|
||||
if(gameStats.isEmpty()){
|
||||
pieChartCardView.setVisibility(View.GONE);
|
||||
barChartsContainer.setVisibility(View.GONE);
|
||||
statsEmptyTextView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
statsEmptyTextView.setVisibility(View.GONE);
|
||||
pieChartCardView.setVisibility(View.VISIBLE);
|
||||
barChartsContainer.setVisibility(View.VISIBLE);
|
||||
pieChart(view);
|
||||
generateBarCharts(view);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
if (residence != null) {
|
||||
residenceNameTextView.setText(residence.getName());
|
||||
totalResidentsTextView.setText(String.valueOf(residence.getResidents().size()));
|
||||
residentsTakenOutTextView.setText(String.valueOf(residentsTakenOut.size()));
|
||||
allGamesTextView.setText(String.valueOf(gameStats.size()));
|
||||
|
||||
int gamesLastWeekCount = 0;
|
||||
for (GameStat gameStat : gameStats) {
|
||||
if (gameStat.getDateTime() != null &&
|
||||
gameStat.getDateTime().toLocalDate().isAfter(java.time.LocalDate.now().minusDays(7))) {
|
||||
gamesLastWeekCount++;
|
||||
}
|
||||
}
|
||||
gamesLastWeekTextView.setText(String.valueOf(gamesLastWeekCount));
|
||||
}
|
||||
}
|
||||
|
||||
private void setupSwipeRefresh(View view) {
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_residence_detail);
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
refreshListener.onRefreshResidenceDetail();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
}
|
||||
|
||||
private void setupBackButton(View view) {
|
||||
ImageButton backButton;
|
||||
backButton = view.findViewById(R.id.back_button);
|
||||
backButton.setOnClickListener(v ->
|
||||
backButtonListener.onClickOnBackButton());
|
||||
}
|
||||
|
||||
private void pieChart(View view){
|
||||
TextView[] gameNames = new TextView[]{
|
||||
view.findViewById(R.id.pie_game_1_name_residence_detail),
|
||||
view.findViewById(R.id.pie_game_2_name_residence_detail),
|
||||
view.findViewById(R.id.pie_game_3_name_residence_detail),
|
||||
view.findViewById(R.id.pie_game_4_name_residence_detail),
|
||||
view.findViewById(R.id.pie_game_5_name_residence_detail)
|
||||
};
|
||||
|
||||
// Mapa juegoId → número de partidas jugadas
|
||||
Map<Long, Integer> gameCountMap = new HashMap<>();
|
||||
List<Long> residentIds = residence.getResidents();
|
||||
|
||||
for (GameStat stat : gameStats) {
|
||||
if (residentIds.contains(stat.getResidentId())) {
|
||||
Long gameId = stat.getGameId();
|
||||
gameCountMap.put(gameId, gameCountMap.getOrDefault(gameId, 0) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
int totalPartidas = gameCountMap.values().stream().mapToInt(Integer::intValue).sum();
|
||||
if (totalPartidas == 0) {
|
||||
pieChart.setVisibility(View.GONE);
|
||||
view.findViewById(R.id.tv_stats_empty_residence_detail).setVisibility(View.VISIBLE);
|
||||
for (TextView tv : gameNames) tv.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
float[] pieValues = new float[gameCountMap.size()];
|
||||
int[] pieColors = new int[gameCountMap.size()];
|
||||
int[] colorPool = { Color.YELLOW, Color.RED, Color.GREEN, Color.MAGENTA, Color.CYAN };
|
||||
|
||||
int index = 0;
|
||||
for (Map.Entry<Long, Integer> entry : gameCountMap.entrySet()) {
|
||||
float porcentaje = (entry.getValue() * 100f) / totalPartidas;
|
||||
pieValues[index] = porcentaje;
|
||||
pieColors[index] = colorPool[index % colorPool.length];
|
||||
|
||||
String nombreJuego = "";
|
||||
for (Game g : games) {
|
||||
if (g.getId().equals(entry.getKey())) {
|
||||
nombreJuego = g.getName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (index < gameNames.length) {
|
||||
String texto = nombreJuego + " - " + String.format("%.1f", porcentaje) + "%";
|
||||
gameNames[index].setText(texto);
|
||||
gameNames[index].setVisibility(View.VISIBLE);
|
||||
gameNames[index].setBackgroundColor(colorPool[index % colorPool.length]);
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
// Ocultar los TextView sobrantes
|
||||
for (int i = index; i < gameNames.length; i++) {
|
||||
gameNames[i].setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
pieChart.setVisibility(View.VISIBLE);
|
||||
pieChart.setData(pieValues, pieColors);
|
||||
}
|
||||
|
||||
private void generateBarCharts(View view) {
|
||||
barChartsContainer.removeAllViews();
|
||||
|
||||
// Mapa de juego → [día de la semana → cantidad de partidas]
|
||||
Map<Long, Map<Integer, Integer>> juegosPorDias = new HashMap<>();
|
||||
List<Long> residentIds = residence.getResidents();
|
||||
|
||||
for (GameStat stat : gameStats) {
|
||||
if (residentIds.contains(stat.getResidentId())) {
|
||||
Long gameId = stat.getGameId();
|
||||
int dia = stat.getDateTime().getDayOfWeek().getValue(); // 1 = lunes, ..., 7 = domingo
|
||||
|
||||
juegosPorDias
|
||||
.computeIfAbsent(gameId, k -> new HashMap<>())
|
||||
.put(dia, juegosPorDias.get(gameId).getOrDefault(dia, 0) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
LinearLayout currentRow = null;
|
||||
|
||||
for (Map.Entry<Long, Map<Integer, Integer>> entry : juegosPorDias.entrySet()) {
|
||||
if (index >= 5) break;
|
||||
|
||||
if (index % 2 == 0) {
|
||||
currentRow = new LinearLayout(requireContext());
|
||||
currentRow.setOrientation(LinearLayout.HORIZONTAL);
|
||||
LinearLayout.LayoutParams rowParams = new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
);
|
||||
rowParams.setMargins(0, 0, 0, 32);
|
||||
currentRow.setLayoutParams(rowParams);
|
||||
barChartsContainer.addView(currentRow);
|
||||
}
|
||||
|
||||
String nombreJuego = "";
|
||||
for (Game g : games) {
|
||||
if (g.getId().equals(entry.getKey())) {
|
||||
nombreJuego = g.getName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
float[] datos = new float[7];
|
||||
Map<Integer, Integer> actividadDias = entry.getValue();
|
||||
for (int i = 1; i <= 7; i++) {
|
||||
datos[i - 1] = actividadDias.getOrDefault(i, 0);
|
||||
}
|
||||
|
||||
// Layout vertical por gráfico
|
||||
LinearLayout chartLayout = new LinearLayout(requireContext());
|
||||
chartLayout.setOrientation(LinearLayout.VERTICAL);
|
||||
chartLayout.setPadding(16, 16, 16, 16);
|
||||
|
||||
TextView title = new TextView(requireContext());
|
||||
title.setText(nombreJuego);
|
||||
title.setTextColor(Color.BLACK);
|
||||
title.setTextSize(14);
|
||||
chartLayout.addView(title);
|
||||
|
||||
TextView subtitle = new TextView(requireContext());
|
||||
subtitle.setText("Actividad semanal");
|
||||
subtitle.setTextColor(Color.GRAY);
|
||||
subtitle.setTextSize(12);
|
||||
chartLayout.addView(subtitle);
|
||||
|
||||
CustomBarChartView chart = new CustomBarChartView(requireContext(), null);
|
||||
chart.setLayoutParams(new ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
500
|
||||
));
|
||||
chart.setData(datos);
|
||||
chartLayout.addView(chart);
|
||||
|
||||
CardView cardView = new CardView(requireContext());
|
||||
cardView.setCardElevation(6f);
|
||||
cardView.setRadius(32f);
|
||||
cardView.setUseCompatPadding(true);
|
||||
cardView.setCardBackgroundColor(Color.WHITE);
|
||||
cardView.addView(chartLayout);
|
||||
|
||||
LinearLayout.LayoutParams colParams = new LinearLayout.LayoutParams(
|
||||
0,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
1f
|
||||
);
|
||||
colParams.setMargins(8, 0, 8, 0);
|
||||
cardView.setLayoutParams(colParams);
|
||||
|
||||
if (currentRow != null) {
|
||||
currentRow.addView(cardView);
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
residence = AppDataRepository.getInstance().getResidence();
|
||||
residents = AppDataRepository.getInstance().getResidents();
|
||||
residentsTakenOut = AppDataRepository.getInstance().getResidentsTakenOut();
|
||||
gameStats = AppDataRepository.getInstance().getGameStats();
|
||||
games = AppDataRepository.getInstance().getGames();
|
||||
|
||||
refreshListener = (IOnRefreshResidenceDetailListener) context;
|
||||
backButtonListener = (IOnClickOnBackButtonListener) context;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
package com.andresgmoran.apptrabajadores.ui.fragments.resident;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.andresgmoran.apptrabajadores.R;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeParseException;
|
||||
|
||||
public class AddResidentFragment extends Fragment {
|
||||
|
||||
public interface OnAddResidentListener {
|
||||
void onAddResidentFormSubmitted(
|
||||
String nombre,
|
||||
String apellido,
|
||||
LocalDate fechaNacimiento,
|
||||
String documentoIdentidad,
|
||||
String familiar1,
|
||||
String familiar2,
|
||||
int year,
|
||||
int month
|
||||
);
|
||||
}
|
||||
|
||||
private OnAddResidentListener listener;
|
||||
|
||||
private EditText nombreEditText;
|
||||
private EditText apellidoEditText;
|
||||
private EditText fechaNacimientoEditText;
|
||||
private EditText documentoIdentidadEditText;
|
||||
private EditText familiar1EditText;
|
||||
private EditText familiar2EditText;
|
||||
private EditText yearEditText;
|
||||
private EditText monthEditText;
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
if (context instanceof OnAddResidentListener) {
|
||||
listener = (OnAddResidentListener) context;
|
||||
} else {
|
||||
throw new RuntimeException(context + " debe implementar OnAddResidentListener");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_add_resident, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
nombreEditText = view.findViewById(R.id.et_add_resident_nombre);
|
||||
apellidoEditText = view.findViewById(R.id.et_add_resident_apellido);
|
||||
fechaNacimientoEditText = view.findViewById(R.id.et_add_resident_fecha_nacimiento);
|
||||
documentoIdentidadEditText = view.findViewById(R.id.et_add_resident_documento_identidad);
|
||||
familiar1EditText = view.findViewById(R.id.et_add_resident_familiar_1);
|
||||
familiar2EditText = view.findViewById(R.id.et_add_resident_familiar_2);
|
||||
yearEditText = view.findViewById(R.id.et_add_resident_year);
|
||||
monthEditText = view.findViewById(R.id.et_add_resident_month);
|
||||
|
||||
Button guardarButton = view.findViewById(R.id.btn_add_resident_guardar);
|
||||
guardarButton.setOnClickListener(v -> {
|
||||
if (validarCampos()) {
|
||||
try {
|
||||
String nombre = nombreEditText.getText().toString().trim();
|
||||
String apellido = apellidoEditText.getText().toString().trim();
|
||||
LocalDate fechaNacimiento = LocalDate.parse(fechaNacimientoEditText.getText().toString().trim());
|
||||
String documento = documentoIdentidadEditText.getText().toString().trim();
|
||||
String familiar1 = familiar1EditText.getText().toString().trim();
|
||||
String familiar2 = familiar2EditText.getText().toString().trim();
|
||||
int year = Integer.parseInt(yearEditText.getText().toString().trim());
|
||||
int month = Integer.parseInt(monthEditText.getText().toString().trim());
|
||||
|
||||
listener.onAddResidentFormSubmitted(
|
||||
nombre, apellido, fechaNacimiento, documento, familiar1, familiar2, year, month
|
||||
);
|
||||
} catch (DateTimeParseException e) {
|
||||
fechaNacimientoEditText.setError("Formato inválido (usar YYYY-MM-DD)");
|
||||
} catch (NumberFormatException e) {
|
||||
if (!isInteger(yearEditText.getText().toString().trim())) {
|
||||
yearEditText.setError("Año inválido");
|
||||
}
|
||||
if (!isInteger(monthEditText.getText().toString().trim())) {
|
||||
monthEditText.setError("Mes inválido");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean validarCampos() {
|
||||
boolean valido = true;
|
||||
|
||||
if (TextUtils.isEmpty(nombreEditText.getText())) {
|
||||
nombreEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(apellidoEditText.getText())) {
|
||||
apellidoEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(fechaNacimientoEditText.getText())) {
|
||||
fechaNacimientoEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(documentoIdentidadEditText.getText())) {
|
||||
documentoIdentidadEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(familiar1EditText.getText())) {
|
||||
familiar1EditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(familiar2EditText.getText())) {
|
||||
familiar2EditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(yearEditText.getText())) {
|
||||
yearEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
if (TextUtils.isEmpty(monthEditText.getText())) {
|
||||
monthEditText.setError("Campo obligatorio");
|
||||
valido = false;
|
||||
}
|
||||
|
||||
return valido;
|
||||
}
|
||||
|
||||
private boolean isInteger(String value) {
|
||||
try {
|
||||
Integer.parseInt(value);
|
||||
return true;
|
||||
} catch (NumberFormatException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,11 @@ import android.widget.TextView;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
|
@ -25,10 +29,13 @@ import com.andresgmoran.apptrabajadores.models.Game;
|
|||
import com.andresgmoran.apptrabajadores.models.Resident;
|
||||
import com.andresgmoran.apptrabajadores.models.adapters.LastGamesAdapter;
|
||||
import com.andresgmoran.apptrabajadores.models.gameStats.GameStat;
|
||||
import com.andresgmoran.apptrabajadores.ui.MainActivity;
|
||||
import com.andresgmoran.apptrabajadores.repository.AppDataRepository;
|
||||
import com.andresgmoran.apptrabajadores.ui.graphics.CustomBarChartView;
|
||||
import com.andresgmoran.apptrabajadores.ui.graphics.CustomPieChartView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -36,16 +43,24 @@ import java.util.Objects;
|
|||
|
||||
public class ResidentFragment extends Fragment {
|
||||
private Resident resident;
|
||||
private List<Game> games;
|
||||
private List<GameStat> gameStats;
|
||||
private List<Game> games = AppDataRepository.getInstance().getGames();
|
||||
private List<GameStat> gameStats = AppDataRepository.getInstance().getGameStats();
|
||||
|
||||
private ImageButton backButton;
|
||||
private TextView residentName;
|
||||
|
||||
private CardView pieCard;
|
||||
private TextView tvLastGamesEmpty;
|
||||
private TextView tvStatsEmpty;
|
||||
|
||||
private RecyclerView recyclerViewLastGames;
|
||||
private LastGamesAdapter lastGamesAdapter;
|
||||
private List<GameStat> filteredStats;
|
||||
|
||||
public interface IOnRefreshResidentListener {
|
||||
void onRefreshGameStats();
|
||||
}
|
||||
|
||||
private IOnRefreshResidentListener refreshListener;
|
||||
private IOnClickOnBackButtonListener backButtonListener;
|
||||
|
||||
@Nullable
|
||||
|
|
@ -58,42 +73,46 @@ public class ResidentFragment extends Fragment {
|
|||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_resident);
|
||||
View statusBar = requireActivity().findViewById(R.id.status_bar_background);
|
||||
statusBar.setBackgroundColor(Color.parseColor("#0062FF"));
|
||||
|
||||
SwipeRefreshLayout swipeRefreshLayout = view.findViewById(R.id.swipe_refresh_resident);
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> {
|
||||
((MainActivity) requireActivity()).refreshGameStatsAndReload();
|
||||
refreshListener.onRefreshGameStats();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
});
|
||||
|
||||
pieCard = view.findViewById(R.id.pieCard);
|
||||
tvLastGamesEmpty = view.findViewById(R.id.tv_lastgames_empty_resident);
|
||||
tvStatsEmpty = view.findViewById(R.id.tv_stats_empty_resident);
|
||||
recyclerViewLastGames = view.findViewById(R.id.latestGames_recycleView_resident);
|
||||
|
||||
View banner = view.findViewById(R.id.resident_banner);
|
||||
|
||||
backButton = banner.findViewById(R.id.back_button);
|
||||
backButton.setOnClickListener(v -> {
|
||||
backButtonListener.onClickOnBackButton();
|
||||
});
|
||||
backButton.setOnClickListener(v -> backButtonListener.onClickOnBackButton());
|
||||
|
||||
residentName = banner.findViewById(R.id.banner_name_game);
|
||||
String fullName = resident.getName() + " " + resident.getSurnames();
|
||||
residentName.setText(fullName);
|
||||
|
||||
List<GameStat> filteredStats = new ArrayList<>();
|
||||
residentName.setText(resident.getName() + " " + resident.getSurnames());
|
||||
|
||||
filteredStats = new ArrayList<>();
|
||||
for (GameStat stat : gameStats) {
|
||||
if (Objects.equals(stat.getResidentId(), resident.getId())) {
|
||||
filteredStats.add(stat);
|
||||
}
|
||||
}
|
||||
|
||||
LastGamesAdapter lastGamesAdapter = new LastGamesAdapter(filteredStats, games, resident, (IOClickOnGameStatsListener) requireActivity());
|
||||
RecyclerView recyclerViewLastGames = view.findViewById(R.id.latestGames_recycleView_resident);
|
||||
lastGamesAdapter = new LastGamesAdapter(filteredStats, games, resident, (IOClickOnGameStatsListener) requireActivity());
|
||||
recyclerViewLastGames.setAdapter(lastGamesAdapter);
|
||||
recyclerViewLastGames.setHasFixedSize(true);
|
||||
recyclerViewLastGames.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false));
|
||||
|
||||
ImageButton filterButton = view.findViewById(R.id.filter_lastgames_list_button);
|
||||
filterButton.setOnClickListener(v -> showLastGamesFilterDialog());
|
||||
|
||||
updateVisibility(view);
|
||||
}
|
||||
|
||||
private void updateVisibility(View view) {
|
||||
if (filteredStats.isEmpty()) {
|
||||
pieCard.setVisibility(View.GONE);
|
||||
recyclerViewLastGames.setVisibility(View.GONE);
|
||||
|
|
@ -104,12 +123,66 @@ public class ResidentFragment extends Fragment {
|
|||
recyclerViewLastGames.setVisibility(View.VISIBLE);
|
||||
tvLastGamesEmpty.setVisibility(View.GONE);
|
||||
tvStatsEmpty.setVisibility(View.GONE);
|
||||
|
||||
pieChart(view);
|
||||
generateBarCharts(view);
|
||||
}
|
||||
}
|
||||
|
||||
private void showLastGamesFilterDialog() {
|
||||
String[] options = {
|
||||
"Nombre juego [A-Z]",
|
||||
"Nombre juego [Z-A]",
|
||||
"De primera a última",
|
||||
"default"
|
||||
};
|
||||
|
||||
new AlertDialog.Builder(requireContext())
|
||||
.setTitle("Filtrar últimas partidas")
|
||||
.setItems(options, (dialog, which) -> filterLastGamesList(options[which]))
|
||||
.show();
|
||||
}
|
||||
|
||||
private void filterLastGamesList(String option) {
|
||||
List<GameStat> sortedList = new ArrayList<>(filteredStats);
|
||||
|
||||
switch (option) {
|
||||
case "Nombre juego [A-Z]":
|
||||
sortedList.sort(Comparator.comparing(stat -> getGameNameById(stat.getGameId())));
|
||||
break;
|
||||
case "Nombre juego [Z-A]":
|
||||
sortedList.sort((s1, s2) -> getGameNameById(s2.getGameId()).compareTo(getGameNameById(s1.getGameId())));
|
||||
break;
|
||||
case "De primera a última":
|
||||
sortedList.sort(Comparator.comparing(GameStat::getDateTime));
|
||||
break;
|
||||
default:
|
||||
sortedList.sort((s1, s2) -> s2.getDateTime().compareTo(s1.getDateTime()));
|
||||
break;
|
||||
}
|
||||
|
||||
lastGamesAdapter.updateData(sortedList);
|
||||
recyclerViewLastGames.scrollToPosition(0);
|
||||
}
|
||||
|
||||
private String getGameNameById(Long id) {
|
||||
return games.stream()
|
||||
.filter(g -> g.getId().equals(id))
|
||||
.map(Game::getName)
|
||||
.findFirst()
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
Bundle args = getArguments();
|
||||
if (args != null) {
|
||||
resident = (Resident) args.getSerializable("resident");
|
||||
}
|
||||
refreshListener = (IOnRefreshResidentListener) context;
|
||||
backButtonListener = (IOnClickOnBackButtonListener) context;
|
||||
}
|
||||
|
||||
private void pieChart(View view){
|
||||
CustomPieChartView pieChart = view.findViewById(R.id.pieChart);
|
||||
|
||||
|
|
@ -262,17 +335,4 @@ public class ResidentFragment extends Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
Bundle args = getArguments();
|
||||
if (args != null) {
|
||||
resident = (Resident) args.getSerializable("resident");
|
||||
games = (ArrayList<Game>) args.getSerializable("games");
|
||||
gameStats = (ArrayList<GameStat>) args.getSerializable("gameStats");
|
||||
}
|
||||
|
||||
backButtonListener = (IOnClickOnBackButtonListener) context;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,15 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="#CCCCCC">
|
||||
|
||||
<View
|
||||
android:id="@+id/status_bar_background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="#CCCCCC"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fcvMain"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -1,107 +1,62 @@
|
|||
<?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"
|
||||
android:background="#CCCCCC">
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
android:id="@+id/account_card_view"
|
||||
layout="@layout/item_person_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/edit_account_button"
|
||||
android:layout_width="118dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginStart="159dp"
|
||||
android:layout_marginTop="224dp"
|
||||
android:layout_marginEnd="159dp"
|
||||
android:backgroundTint="#324F5E"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Editar perfil"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.52"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_highlights"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#FFFF"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Destacados"
|
||||
android:gravity="center"
|
||||
android:text="@string/featured_title"
|
||||
android:textSize="18sp"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/account_card_view"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edit_account_button" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_favoritos"
|
||||
android:id="@+id/residence_button_account"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Favoritos"
|
||||
android:text="@string/residence_title"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_highlights"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/label_highlights" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_residentes"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Residentes"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_favoritos" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_juegos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Juegos"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_residentes" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_preferences"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFFFF"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Preferencias"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="@string/preferences_title"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintTop_toBottomOf="@id/residence_button_account"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_juegos" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_idioma"
|
||||
|
|
@ -111,41 +66,25 @@
|
|||
android:background="@android:color/transparent"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Idioma"
|
||||
android:text="@string/language_title"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_preferences"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/label_preferences" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_modo_oscuro"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Ajustes"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_idioma" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_cerrar_sesion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:paddingStart="20dp"
|
||||
android:text="Cerrar Sesión"
|
||||
android:text="@string/logout_title"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_idioma"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/btn_modo_oscuro" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view_activities"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
|
@ -33,7 +34,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Actividades"
|
||||
android:text="@string/activities_list_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
|
@ -56,17 +57,22 @@
|
|||
app:layout_constraintStart_toStartOf="@+id/linearLayout3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
<!-- Botón reemplazado con MaterialButton -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/add_activity_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:text="@string/add_activity_text"
|
||||
android:contentDescription="Añadir actividad"
|
||||
android:textColor="@android:color/white"
|
||||
app:icon="@android:drawable/ic_input_add"
|
||||
app:iconTint="@android:color/white"
|
||||
app:iconPadding="8dp"
|
||||
app:iconGravity="textStart"
|
||||
app:backgroundTint="#324F5E"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:srcCompat="@android:drawable/ic_input_add"
|
||||
app:tint="@android:color/white" />
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="TextView"
|
||||
android:text=""
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Iniciar actividad"
|
||||
android:text="@string/start_activity_text"
|
||||
android:textColor="@android:color/white"
|
||||
app:backgroundTint="#28A745"
|
||||
app:iconTint="@android:color/white"
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
android:background="#FFFFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="Descripción"
|
||||
android:text="@string/description_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="Información"
|
||||
android:text="@string/information_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Fecha"
|
||||
android:text="@string/date_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="20/09/2025"
|
||||
android:text=""
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Hora de salida"
|
||||
android:text="@string/departure_time_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -168,20 +168,20 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="10:00am"
|
||||
android:text=""
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/label_exit_time_activity_detail" />
|
||||
|
||||
<!-- Hora de vuelta estimada -->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_total_residents_activity_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Residentes totales"
|
||||
android:text="@string/total_residents_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_total_participants_activity_detail"
|
||||
|
|
@ -205,7 +205,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Residentes que si van"
|
||||
android:text="@string/residents_going_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_confirmed_residents"
|
||||
|
|
@ -217,7 +217,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="20"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -230,7 +229,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Residentes que no van"
|
||||
android:text="@string/residents_not_going_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_unconfirmed_residents"
|
||||
|
|
@ -242,7 +241,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="11"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -255,7 +253,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Asistencia humana necesaria"
|
||||
android:text="@string/human_assistance_needed_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_required_human_attendance"
|
||||
|
|
@ -267,7 +265,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="9"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -279,7 +276,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Asistencia material necesaria"
|
||||
android:text="@string/material_assistance_needed_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_required_material_attendance"
|
||||
|
|
@ -291,7 +288,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="9"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -309,7 +305,7 @@
|
|||
android:background="#FFFFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="Participantes"
|
||||
android:text="@string/participants_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -333,7 +329,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:text="Añadir participante"
|
||||
android:text="@string/add_participant_button_text"
|
||||
android:contentDescription="Añadir participante"
|
||||
app:icon="@android:drawable/ic_input_add"
|
||||
app:iconTint="@android:color/white"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
android:id="@+id/add_activity_name_input"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Nombre"
|
||||
android:hint="@string/name_text"
|
||||
android:inputType="textPersonName"
|
||||
android:textColor="#324F5E"
|
||||
android:textColorLink="#6CADFF"
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="top|start"
|
||||
android:hint="Descripción"
|
||||
android:hint="@string/description_title"
|
||||
android:inputType="textMultiLine"
|
||||
android:minLines="3"
|
||||
android:textColor="#324F5E"
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:backgroundTint="#00AF4848"
|
||||
android:text="Seleccionar fecha"
|
||||
android:text="@string/select_date_text"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="#324F5E"
|
||||
android:textColorLink="#6CADFF"
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:backgroundTint="#324F5E"
|
||||
android:text="Guardar"
|
||||
android:text="@string/save_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/buttonFecha"
|
||||
app:layout_constraintTop_toBottomOf="@id/buttonFecha" />
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
android:id="@+id/opinion_edit_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Escribe algo aquí"
|
||||
android:hint="@string/write_opinion_text"
|
||||
android:padding="12dp"
|
||||
android:textColor="#000000"
|
||||
android:textColorHint="#888888"
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
android:id="@+id/add_opinion_button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Enviar"
|
||||
android:text="@string/save_text"
|
||||
android:textColor="#FFFFFF"
|
||||
android:backgroundTint="#324F5E"
|
||||
android:layout_marginTop="16dp"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,117 @@
|
|||
<?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"
|
||||
android:id="@+id/layout_add_resident"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Nombre -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_nombre"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/name_text"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Apellido -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_apellido"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/surnames_text"
|
||||
android:inputType="textPersonName"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_nombre"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Fecha de nacimiento -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_fecha_nacimiento"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/date_of_birth_text"
|
||||
android:inputType="date"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_apellido"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Documento de identidad -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_documento_identidad"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/identification_document_text"
|
||||
android:inputType="text"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_fecha_nacimiento"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Año -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_year"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/year_of_document_validity_text"
|
||||
android:inputType="number"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_documento_identidad"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Mes -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_month"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/month_of_document_validity_text"
|
||||
android:inputType="number"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_year"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Familiar 1 -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_familiar_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/email_family_member_text"
|
||||
android:inputType="textPersonName"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_month"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Familiar 2 -->
|
||||
<EditText
|
||||
android:id="@+id/et_add_resident_familiar_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/email_family_member_text"
|
||||
android:inputType="textPersonName"
|
||||
android:layout_marginTop="12dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_familiar_1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Botón Guardar -->
|
||||
<Button
|
||||
android:id="@+id/btn_add_resident_guardar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/save_text"
|
||||
android:backgroundTint="@color/teal_700"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginTop="24dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_add_resident_familiar_2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
<?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"
|
||||
android:background="#CCCCCC">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextText5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:inputType="text"
|
||||
android:text="Numero de telefono"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textView13"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView13"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView13" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextText6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:inputType="text"
|
||||
android:text="Numero de telefono"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textView14"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView14"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView12"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Correo Electronico (id)"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/editTextText"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextText"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextText" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView13"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Numero de telefono"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/editTextText3"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextText3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextText3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView14"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Contraseña"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/editTextText5"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextText5"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextText5" />
|
||||
|
||||
<include
|
||||
android:id="@+id/include"
|
||||
layout="@layout/item_person_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/edit_account_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginStart="159dp"
|
||||
android:layout_marginTop="224dp"
|
||||
android:layout_marginEnd="159dp"
|
||||
android:backgroundTint="#324F5E"
|
||||
android:text="Cambiar imagen"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.52"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Nombre"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/edit_account_button" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:inputType="text"
|
||||
android:text="Name"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textView10"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView10"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView10" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextText3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:inputType="text"
|
||||
android:text="Correo Electronico"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textView12"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView12"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView12" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:backgroundTint="#324F5E"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Actualizar"
|
||||
app:layout_constraintEnd_toEndOf="@+id/editTextText6"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextText6"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextText6" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="Información"
|
||||
android:text="@string/information_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Partidas última semana"
|
||||
android:text="@string/last_games_list_title"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_number_of_games_last_week"
|
||||
|
|
@ -116,14 +116,14 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/label_number_of_games_last_week" />
|
||||
|
||||
<!-- Fallos -->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_total_games_played"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Partidas jugadas"
|
||||
android:text="@string/total_games_played_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_total_games_played"
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Top jugador"
|
||||
android:text="@string/top_player_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_total_games_played"
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
android:background="#FFFFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="Partidas"
|
||||
android:text="@string/games_played_text"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -196,7 +196,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="No hay partidas disponibles"
|
||||
android:text="@string/no_games_played_text"
|
||||
android:textColor="#96A7AF"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textView6"
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="Información"
|
||||
android:text="@string/information_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Duración"
|
||||
android:text="@string/duration_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_duration"
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Fallos"
|
||||
android:text="@string/fails_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_fails"
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
android:background="#FFFFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="Observacion"
|
||||
android:text="@string/observations_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_view_home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
|
@ -18,6 +22,7 @@
|
|||
android:background="#CCCCCC"
|
||||
tools:context=".ui.fragments.home.HomeFragment">
|
||||
|
||||
<!-- CABECERA DE USUARIO -->
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -38,33 +43,24 @@
|
|||
<TextView
|
||||
android:id="@+id/home_user_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Maria Cartes Sanchez"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/observation_person_role"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="Psicologa"
|
||||
android:textColor="#96A7AF"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/user_image_home"
|
||||
android:layout_width="55dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
app:shapeAppearanceOverlay="@style/CircularShapeAppearance"
|
||||
app:srcCompat="@drawable/woman_avatar" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ÚLTIMAS PARTIDAS -->
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -82,22 +78,22 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Últimas partidas"
|
||||
android:text="@string/last_games_list_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView17"
|
||||
android:layout_width="0dp"
|
||||
<!-- NUEVO BOTÓN DE FILTRO -->
|
||||
<ImageButton
|
||||
android:id="@+id/filter_lastgames_list_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="right"
|
||||
android:text="Ver más"
|
||||
android:textColor="#0062FF"
|
||||
android:textSize="14sp" />
|
||||
android:layout_gravity="center"
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="Filtro últimas partidas"
|
||||
app:srcCompat="@drawable/filter" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/latestGames_recycleView_home"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -115,13 +111,14 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="No hay partidas disponibles"
|
||||
android:text="@string/no_games_played_text"
|
||||
android:textColor="#96A7AF"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/linearLayout2"
|
||||
app:layout_constraintStart_toStartOf="@+id/linearLayout2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout2" />
|
||||
|
||||
<!-- JUEGOS -->
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout4"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -139,7 +136,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Juegos"
|
||||
android:text="@string/games_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
|
@ -170,13 +167,14 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="No hay juegos disponibles"
|
||||
android:text="@string/no_games_text"
|
||||
android:textColor="#96A7AF"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/linearLayout4"
|
||||
app:layout_constraintStart_toStartOf="@+id/linearLayout4"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout4" />
|
||||
|
||||
<!-- RESIDENTES -->
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -194,7 +192,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Residentes"
|
||||
android:text="@string/residents_list_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
|
@ -225,15 +223,29 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="No hay residentes disponibles"
|
||||
android:text="@string/no_residents_text"
|
||||
android:textColor="#96A7AF"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@+id/linearLayout3"
|
||||
app:layout_constraintStart_toStartOf="@+id/linearLayout3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
<!-- BOTÓN FLOTANTE FUERA DEL SCROLL -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/add_resident_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/add_resident_text"
|
||||
android:contentDescription="Añadir residente"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:textColor="@android:color/white"
|
||||
app:icon="@android:drawable/ic_input_add"
|
||||
app:iconTint="@android:color/white"
|
||||
app:iconPadding="8dp"
|
||||
app:iconGravity="textStart"
|
||||
app:backgroundTint="#324F5E" />
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="48dp"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:text="Iniciar Sesión"
|
||||
android:text="@string/login_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:hint="Correo electrónico"
|
||||
android:hint="@string/email_text"
|
||||
android:inputType="textEmailAddress"
|
||||
android:textColorLink="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:hint="Contraseña"
|
||||
android:hint="@string/password_text"
|
||||
android:inputType="textPassword"
|
||||
android:textColorLink="#324F5E"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="Recordar contraseña"
|
||||
android:text="@string/remember_password_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/password_input_login" />
|
||||
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="#324F5E"
|
||||
android:text="Iniciar sesión"
|
||||
android:text="@string/login_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/remember_password_checkBox" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,184 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/swipe_refresh_participant_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_participant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#CCCCCC"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- Banner del participante -->
|
||||
<include
|
||||
android:id="@+id/participant_card_view"
|
||||
layout="@layout/item_person_banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Sección Información -->
|
||||
<TextView
|
||||
android:id="@+id/label_information"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="@string/information_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/participant_card_view" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/info_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:background="#CCCCCC"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_information"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_activity"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/activity_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_activity_participant" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_activity_participant"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toTopOf="@id/label_activity"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_ayuda_material"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/material_assistance_needed_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_activity"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_need_material_help_participant_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_need_material_help_participant_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toTopOf="@id/label_ayuda_material"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_ayuda_humana"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/human_assistance_needed_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_ayuda_material"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_need_human_help_participant_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_need_human_help_participant_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toTopOf="@id/label_ayuda_humana"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- Sección PreOpinion -->
|
||||
<TextView
|
||||
android:id="@+id/label_preopinion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pre_opinion_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center"
|
||||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toBottomOf="@id/info_container"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pre_opinion_participant_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:padding="16dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_preopinion"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Sección PostOpinion -->
|
||||
<TextView
|
||||
android:id="@+id/label_postopinion"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/post_opinion_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center"
|
||||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_pre_opinion_participant_detail"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_post_opinion_participant_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
android:padding="16dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_postopinion"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="32dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</FrameLayout>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
@ -0,0 +1,292 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/swipe_refresh_residence_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nested_scroll_residence_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#CCCCCC"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- Banner azul -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/background_banner"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="174dp"
|
||||
android:background="#0062FF"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/back_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@null"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/arrow_left" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/residence_detail_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_bold"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="24sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- Sección Información -->
|
||||
<TextView
|
||||
android:id="@+id/info_title_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="@string/information_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/background_banner" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/info_container_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#CCCCCC"
|
||||
android:padding="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/info_title_residence_detail">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_residents_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="@string/residents_list_title"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_residents_residence_detail"
|
||||
app:layout_constraintHorizontal_bias="0" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_residents_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/label_residents_residence_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_residents_taken_down_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="@string/residents_taken_down_title"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_residents_residence_detail"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_residents_taken_down_residence_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_residents_taken_down_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/label_residents_taken_down_residence_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_total_games_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="@string/total_games_played_text"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_total_games_residence_detail"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_residents_taken_down_residence_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_games_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/label_total_games_residence_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label_games_last_week_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="@string/last_games_list_title"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_games_last_week_residence_detail"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/label_total_games_residence_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_games_last_week_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:textColor="#2C3E50"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/label_games_last_week_residence_detail" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- Gráficos -->
|
||||
<TextView
|
||||
android:id="@+id/stats_title_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFFFFF"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="center"
|
||||
android:text="@string/stats_title"
|
||||
android:textColor="#324F5E"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/info_container_residence_detail" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_stats_empty_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:text="@string/no_stats_available_text"
|
||||
android:textColor="#96A7AF"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/stats_title_residence_detail"
|
||||
app:layout_constraintStart_toStartOf="@id/stats_title_residence_detail"
|
||||
app:layout_constraintTop_toBottomOf="@id/stats_title_residence_detail" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/pieCard_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginTop="20dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/stats_title_residence_detail"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.andresgmoran.apptrabajadores.ui.graphics.CustomPieChartView
|
||||
android:id="@+id/pieChart_residence_detail"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pie_game_1_name_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#FFFF00"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pie_game_2_name_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#FF6666"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pie_game_3_name_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#FF00FF"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pie_game_4_name_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#00FF00"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pie_game_5_name_residence_detail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#00FF00"
|
||||
android:textColor="#000000" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/barChartsContainer_residence_detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_margin="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/pieCard_residence_detail"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- Banner superior -->
|
||||
<include
|
||||
android:id="@+id/resident_banner"
|
||||
layout="@layout/item_person_banner"
|
||||
|
|
@ -49,15 +48,14 @@
|
|||
android:textColor="#324F5E"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView17"
|
||||
android:layout_width="0dp"
|
||||
<ImageButton
|
||||
android:id="@+id/filter_lastgames_list_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/assistant_semibold"
|
||||
android:gravity="right"
|
||||
android:text="Ver más"
|
||||
android:textColor="#0062FF" />
|
||||
android:layout_gravity="center"
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="Filtrar últimas partidas"
|
||||
app:srcCompat="@drawable/filter" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
|
@ -98,7 +96,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/latestGames_recycleView_resident" />
|
||||
|
||||
<!-- Card con gráfico de dona -->
|
||||
<TextView
|
||||
android:id="@+id/tv_stats_empty_resident"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -190,7 +187,6 @@
|
|||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Contenedor de gráficos de barras -->
|
||||
<LinearLayout
|
||||
android:id="@+id/barChartsContainer"
|
||||
android:layout_width="0dp"
|
||||
|
|
@ -201,7 +197,6 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/pieCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
android:id="@+id/textview_salida"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Salida"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/activity_title"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/resident_progress_item"
|
||||
android:id="@+id/resident_info_item"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Progress" />
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?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"
|
||||
|
|
@ -55,7 +56,7 @@
|
|||
</ScrollView>
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/circularImageView"
|
||||
android:id="@+id/image_item_person_banner"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
<item
|
||||
android:id="@+id/navigation_activities"
|
||||
android:icon="@drawable/ic_dashboard_black_24dp"
|
||||
android:title="Activities" />
|
||||
android:title="@string/activities_list_title" />
|
||||
|
||||
<item
|
||||
android:id="@+id/navigation_account"
|
||||
android:icon="@drawable/ic_account_circle_24"
|
||||
android:title="Account" />
|
||||
android:title="@string/account_detail" />
|
||||
|
||||
</menu>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_delete"
|
||||
android:title="Eliminar" />
|
||||
android:title="@string/delete_text" />
|
||||
</menu>
|
||||
|
|
@ -9,4 +9,83 @@
|
|||
<string name="no_last_games_available_text">There are no games available</string>
|
||||
<string name="stats_title">Stats</string>
|
||||
<string name="no_stats_available_text">No stats available</string>
|
||||
<string name="featured_title">Featured</string>
|
||||
<string name="residence_title">Residence</string>
|
||||
<string name="preferences_title">Preferences</string>
|
||||
<string name="language_title">Language</string>
|
||||
<string name="logout_title">Log out</string>
|
||||
<string name="activities_list_title">Activities</string>
|
||||
<string name="add_activity_text">Add activity</string>
|
||||
<string name="start_activity_text">Start activity</string>
|
||||
<string name="description_title">Description</string>
|
||||
<string name="information_title">Information</string>
|
||||
<string name="date_text">Date</string>
|
||||
<string name="departure_time_text">Departure time</string>
|
||||
<string name="total_residents_text">All residents</string>
|
||||
<string name="residents_going_text">Residents going</string>
|
||||
<string name="residents_not_going_text">Residents not going</string>
|
||||
<string name="human_assistance_needed_text">Human assistance needed</string>
|
||||
<string name="material_assistance_needed_text">Material assistance needed</string>
|
||||
<string name="participants_title">Participants</string>
|
||||
<string name="add_participant_button_text">Add participant</string>
|
||||
<string name="name_text">Name</string>
|
||||
<string name="select_date_text">Select date</string>
|
||||
<string name="save_text">Save</string>
|
||||
<string name="write_opinion_text">Write opinion</string>
|
||||
<string name="surnames_text">Surnames</string>
|
||||
<string name="date_of_birth_text">Date of birth (YYYY-MM-DD)</string>
|
||||
<string name="identification_document_text">ID document</string>
|
||||
<string name="year_of_document_validity_text">Year of validity of the document (e.g. 2025)</string>
|
||||
<string name="month_of_document_validity_text">Month of validity of the document (1-12)</string>
|
||||
<string name="email_family_member_text">Family email</string>
|
||||
<string name="total_games_played_text">Games played</string>
|
||||
<string name="top_player_text">Top player</string>
|
||||
<string name="games_played_text">Games</string>
|
||||
<string name="no_games_played_text">No games available</string>
|
||||
<string name="duration_text">Duration</string>
|
||||
<string name="fails_text">Fails</string>
|
||||
<string name="observations_title">Observation</string>
|
||||
<string name="games_title">Games</string>
|
||||
<string name="no_games_text">No games available</string>
|
||||
<string name="no_residents_text">No residents available</string>
|
||||
<string name="add_resident_text">Add resident</string>
|
||||
<string name="login_title">Log in</string>
|
||||
<string name="email_text">Email adress</string>
|
||||
<string name="password_text">Password</string>
|
||||
<string name="remember_password_text">Remember password</string>
|
||||
<string name="activity_text">Activity</string>
|
||||
<string name="pre_opinion_title">Pre opinion</string>
|
||||
<string name="post_opinion_title">Post opinion</string>
|
||||
<string name="residents_taken_down_title">Residents taken down</string>
|
||||
<string name="select_language_tile">Select a language</string>
|
||||
<string name="es_language_text">Spanish</string>
|
||||
<string name="en_language_text">English</string>
|
||||
<string name="va_language_text">Valenciano</string>
|
||||
<string name="confirm_logout_message">Are you sure you want to log out?</string>
|
||||
<string name="accept_text">Accept</string>
|
||||
<string name="cancel_text">Cancel</string>
|
||||
<string name="close_activity_title">Close activity</string>
|
||||
<string name="close_activity_message">The status of the activity cannot be changed once it\'s closed. Do you want to continue?</string>
|
||||
<string name="finish_activity_text">Finish activity</string>
|
||||
<string name="activity_finished_text">"Activity finished "</string>
|
||||
<string name="delete_text">Delete</string>
|
||||
<string name="most_played_filter_text">Most played this week</string>
|
||||
<string name="filter_games_title">Filter games</string>
|
||||
<string name="date_of_birth_filter_text">Date of birth</string>
|
||||
<string name="resident_name_a_z_filter_text">Resident name [A-Z]</string>
|
||||
<string name="resident_name_z_a_filter_text">Resident name [Z-A]</string>
|
||||
<string name="game_name_a_z_filter_text">Game name [A-Z]</string>
|
||||
<string name="game_name_z_a_filter_text">Game name [Z-A]</string>
|
||||
<string name="first_to_last_filter_text">Firts to last played</string>
|
||||
<string name="last_to_first_filter_text">Last to first played</string>
|
||||
<string name="filter_last_games_title">Filter last games</string>
|
||||
<string name="filter_residents_title">Filter residents</string>
|
||||
<string name="status_open_filter_text">State [OPEN]</string>
|
||||
<string name="status_closed_filter_text">State [CLOSED]</string>
|
||||
<string name="status_on_going_filter_text">State [ON GOING]</string>
|
||||
<string name="status_finished_filter_text">State [FINISHED]</string>
|
||||
<string name="activity_date_filter_text">Date</string>
|
||||
<string name="filter_activities_title">Filter activities</string>
|
||||
<string name="activity_title">Activity</string>
|
||||
<string name="account_detail">Account</string>
|
||||
</resources>
|
||||
|
|
@ -1,12 +1,91 @@
|
|||
<resources>
|
||||
<string name="app_name">App Trabajadores</string>
|
||||
<string name="title_home">Home</string>
|
||||
<string name="title_home">Inicio</string>
|
||||
<string name="title_dashboard">Dashboard</string>
|
||||
<string name="title_notifications">Notifications</string>
|
||||
<string name="residents_list_title">Residentes</string>
|
||||
<string name="last_games_list_title">Últimas partidas\n</string>
|
||||
<string name="last_games_list_title">Últimas partidas</string>
|
||||
<string name="no_last_games_available_text">No hay partidas disponibles</string>
|
||||
<string name="stats_title">Estadísticas</string>
|
||||
<string name="no_stats_available_text">No hay estadisticas disponibles</string>
|
||||
<string name="featured_title">"Destacados "</string>
|
||||
<string name="residence_title">Residencia</string>
|
||||
<string name="preferences_title">Preferencias</string>
|
||||
<string name="language_title">Idioma</string>
|
||||
<string name="logout_title">Cerrar sesión</string>
|
||||
<string name="activities_list_title">Actividades</string>
|
||||
<string name="add_activity_text">Añadir actividad</string>
|
||||
<string name="start_activity_text">Iniciar actividad</string>
|
||||
<string name="description_title">Descripción</string>
|
||||
<string name="information_title">Información</string>
|
||||
<string name="date_text">Fecha</string>
|
||||
<string name="departure_time_text">Hora de salida</string>
|
||||
<string name="total_residents_text">Residentes totales</string>
|
||||
<string name="residents_going_text">Residentes que si van</string>
|
||||
<string name="residents_not_going_text">Residentes que no van</string>
|
||||
<string name="human_assistance_needed_text">Asistencia humana necesaria</string>
|
||||
<string name="material_assistance_needed_text">Asistencia material necesaria</string>
|
||||
<string name="participants_title">Participantes</string>
|
||||
<string name="add_participant_button_text">Añadir participante</string>
|
||||
<string name="name_text">Nombre</string>
|
||||
<string name="select_date_text">Seleccionar fecha</string>
|
||||
<string name="save_text">Guardar</string>
|
||||
<string name="write_opinion_text">Escribir opinión</string>
|
||||
<string name="surnames_text">Apellidos</string>
|
||||
<string name="date_of_birth_text">Fecha de nacimiento (YYYY-MM-DD)</string>
|
||||
<string name="identification_document_text">Documento de identidad</string>
|
||||
<string name="year_of_document_validity_text">Año de validez del documento (ej. 2025)</string>
|
||||
<string name="month_of_document_validity_text">Mes de validez del documento (1-12)</string>
|
||||
<string name="email_family_member_text">Correo de familiar</string>
|
||||
<string name="total_games_played_text">Partidas jugadas</string>
|
||||
<string name="top_player_text">Top jugador</string>
|
||||
<string name="games_played_text">Partidas</string>
|
||||
<string name="no_games_played_text">No hay partidas disponibles</string>
|
||||
<string name="duration_text">Duración</string>
|
||||
<string name="fails_text">Fallos</string>
|
||||
<string name="observations_title">Observación</string>
|
||||
<string name="games_title">Juegos</string>
|
||||
<string name="no_games_text">No hay juegos disponibles</string>
|
||||
<string name="no_residents_text">No hay residentes disponibles</string>
|
||||
<string name="add_resident_text">Añadir residente</string>
|
||||
<string name="login_title">Iniciar sesión</string>
|
||||
<string name="email_text">Correo electrónico</string>
|
||||
<string name="password_text">Contraseña</string>
|
||||
<string name="remember_password_text">Recordar contraseña</string>
|
||||
<string name="activity_text">Actividad</string>
|
||||
<string name="pre_opinion_title">Opinión previa</string>
|
||||
<string name="post_opinion_title">Opinión posterior</string>
|
||||
<string name="residents_taken_down_title">Residentes dados de baja</string>
|
||||
<string name="select_language_tile">Selecciona un idioma</string>
|
||||
<string name="es_language_text">Español</string>
|
||||
<string name="en_language_text">Ingles</string>
|
||||
<string name="va_language_text">Valenciano</string>
|
||||
<string name="confirm_logout_message">¿Estás seguro de que quieres cerrar sesión?</string>
|
||||
<string name="accept_text">Aceptar</string>
|
||||
<string name="cancel_text">Cancelar</string>
|
||||
<string name="close_activity_title">Cerrar actividad</string>
|
||||
<string name="close_activity_message">No se podra cambiar el estado de la actividad una vez cerrada. ¿Desea continuar?</string>
|
||||
<string name="finish_activity_text">Finalizar actividad</string>
|
||||
<string name="activity_finished_text">Actividad finalizada</string>
|
||||
<string name="delete_text">Eliminar</string>
|
||||
<string name="most_played_filter_text">Más jugado en la ultima semana</string>
|
||||
<string name="filter_games_title">Filtrar juegos</string>
|
||||
<string name="date_of_birth_filter_text">Fecha de nacimiento</string>
|
||||
<string name="resident_name_a_z_filter_text">Nombre residente [A-Z]</string>
|
||||
<string name="resident_name_z_a_filter_text">Nombre residente [Z-A]</string>
|
||||
<string name="game_name_a_z_filter_text">Nombre juego [A-Z]</string>
|
||||
<string name="game_name_z_a_filter_text">Nombre juego [Z-A]</string>
|
||||
<string name="first_to_last_filter_text">De primera a última</string>
|
||||
<string name="last_to_first_filter_text">De última a primera</string>
|
||||
<string name="filter_last_games_title">Filtrar últimas partidas</string>
|
||||
<string name="filter_residents_title">Filtrar residentes</string>
|
||||
<string name="status_open_filter_text">Estado [ABIERTO]</string>
|
||||
<string name="status_closed_filter_text">Estado [CERRADO]</string>
|
||||
<string name="status_on_going_filter_text">Estado [EN CURSO]</string>
|
||||
<string name="status_finished_filter_text">Estado [FINALIZADO]</string>
|
||||
<string name="activity_date_filter_text">Fecha de salida</string>
|
||||
<string name="filter_activities_title">Filtrar actividades</string>
|
||||
<string name="activity_title">Actividad</string>
|
||||
<string name="account_detail">Cuenta</string>
|
||||
|
||||
</resources>
|
||||
|
|
@ -11,6 +11,8 @@
|
|||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
|
||||
<!-- Fix fondo blanco momentáneo en recreate() -->
|
||||
<item name="android:windowBackground">#CCCCCC</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -10,7 +10,7 @@ dock_filesystem_display_mode=0
|
|||
dock_filesystem_file_sort=0
|
||||
dock_filesystem_file_list_display_mode=1
|
||||
dock_filesystem_selected_paths=PackedStringArray()
|
||||
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://scenes/seguir_la_linea/", "res://scenes/gimnasio/", "res://scenes/flecha_y_reacciona/", "res://scenes/emparejar_las_sombras/", "res://scenes/bingo_auditivo/", "res://images/")
|
||||
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scenes/seguir_la_linea/", "res://scenes/gimnasio/", "res://scenes/flecha_y_reacciona/", "res://scenes/emparejar_las_sombras/", "res://scenes/bingo_auditivo/", "res://images/")
|
||||
dock_node_current_tab=0
|
||||
dock_history_include_scene=true
|
||||
dock_history_include_global=true
|
||||
|
|
@ -30,9 +30,10 @@ dock_5="Inspector,Node,History"
|
|||
|
||||
open_scenes=PackedStringArray("res://scenes/Home.tscn")
|
||||
current_scene="res://scenes/Home.tscn"
|
||||
center_split_offset=-700
|
||||
center_split_offset=-257
|
||||
selected_default_debugger_tab_idx=0
|
||||
selected_main_editor_idx=0
|
||||
selected_main_editor_idx=2
|
||||
selected_bottom_panel_item=0
|
||||
|
||||
[EditorWindow]
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ position=Vector2i(0, 23)
|
|||
[ScriptEditor]
|
||||
|
||||
open_scripts=["res://scripts/emparejar_las_sombras/animal_tile.gd", "res://scripts/app_constants.gd", "res://scripts/bingo_auditivo/configuration_bingo.gd", "res://scripts/emparejar_las_sombras/configuration_emparejar_las_sombras.gd", "res://scripts/flecha_y_reacciona/configuration_f_y_r.gd", "res://scripts/gimnasio/configuration_gym.gd", "res://scripts/seguir_la_linea/configuration_seguir_la_linea.gd", "res://scripts/game_data.gd", "res://scripts/flecha_y_reacciona/game_flecha_y_reacciona.gd", "res://scripts/gimnasio/game_gym.gd", "res://scripts/home.gd"]
|
||||
selected_script="res://scripts/flecha_y_reacciona/configuration_f_y_r.gd"
|
||||
selected_script="res://scripts/app_constants.gd"
|
||||
open_help=[]
|
||||
script_split_offset=250
|
||||
list_split_offset=0
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
ea4bc82a6ad023ab7ee23ee620429895
|
||||
::res://::1747852948
|
||||
export_presets.cfg::TextFile::-1::1747852948::0::1::::<><><>0<>0<><>::
|
||||
fc8a56933c4b1c8d796fdb8f7a9f9475
|
||||
::res://::1748128390
|
||||
export_presets.cfg::TextFile/TextFile::-1::1748128390::0::1::::<><><>0<>0<><>::
|
||||
icon.svg::CompressedTexture2D/CompressedTexture2D::7703363691602546975::1747402263::1747402278::1::::<><><>0<>0<>dc50f06f4ec4156b8404fc76e68035b2<>res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex::
|
||||
menu.tres::Theme::8317934371248321320::1747852682::0::1::::<><><>0<>0<><>::
|
||||
menu.tres::Theme/Theme::8317934371248321320::1747852682::0::1::::<><><>0<>0<><>::
|
||||
::res://assets/::1747852892
|
||||
back_button.png::CompressedTexture2D/CompressedTexture2D::2132119402147635853::1747694589::1747694590::1::::<><><>0<>0<>306f7421656b646a3d66454298c8e40f<>res://.godot/imported/back_button.png-ba49f75b53a9c1f509214b23d27cc2b4.ctex::
|
||||
window3.png::CompressedTexture2D/CompressedTexture2D::6631485050052427251::1747675596::1747675598::1::::<><><>0<>0<>19d84c5119cf1d34038a6db3f27eaa30<>res://.godot/imported/window3.png-b1234ac1e7263dd18bb1843f6abab1e4.ctex::
|
||||
|
|
@ -26,12 +26,12 @@ oveja.mp3::AudioStreamMP3/AudioStreamMP3::6892221899961415453::1745431841::17475
|
|||
perro.mp3::AudioStreamMP3/AudioStreamMP3::2363096142831056952::1745431668::1747575855::1::::<><><>0<>0<>56043aba6662a9ec6db96cfe27541cf4<>res://.godot/imported/perro.mp3-245f05c17c1670247e9d65e55d81ddd0.mp3str::
|
||||
vaca.mp3::AudioStreamMP3/AudioStreamMP3::2596745121890943594::1745431616::1747575855::1::::<><><>0<>0<>0135307959b6352ae4f4c702bed8362c<>res://.godot/imported/vaca.mp3-d751249d5f15334a95ae6c005701fcb3.mp3str::
|
||||
wolf.mp3::AudioStreamMP3/AudioStreamMP3::4476753813126878356::1745431572::1747575855::1::::<><><>0<>0<>659cb7dd6fb08b576a36cf838b80ed79<>res://.godot/imported/wolf.mp3-3c99ed1860a7a0005da49c65f92ca4c5.mp3str::
|
||||
::res://images/::1747853371
|
||||
::res://images/::1748128650
|
||||
charecter.png::CompressedTexture2D/CompressedTexture2D::1398867791648070462::1747746845::1747746846::1::::<><><>0<>0<>68d609f4cf72b7cee974b0d118c90955<>res://.godot/imported/charecter.png-58be5b09fc337b559f9bb40d47841b54.ctex::
|
||||
cuadro de texto.png::CompressedTexture2D/CompressedTexture2D::7929815230707051517::1747752203::1747752203::1::::<><><>0<>0<>209748225dd912f7cf3dd54c7ea35877<>res://.godot/imported/cuadro de texto.png-069ecfbae193344546bd74f085248bd4.ctex::
|
||||
game_logo.png::CompressedTexture2D::4914694277155003891::1748128650::1748128651::1::::<><><>0<>0<>3c4dfc4b74143bebfc2150de503c2955<>res://.godot/imported/game_logo.png-51208890158e5ed3dd849f86a05616d7.ctex::
|
||||
menu_logo.png::CompressedTexture2D/CompressedTexture2D::5689433748730304837::1745260946::1747403586::1::::<><><>0<>0<>aa8e65da18c85d772f423418a1d50520<>res://.godot/imported/menu_logo.png-326be22817043ae765a9aaa1fb96c9c5.ctex::
|
||||
play-button.png::CompressedTexture2D/CompressedTexture2D::6478104816802874001::1744907721::1747419449::1::::<><><>0<>0<>1fc1f7403ff3525f1bfeec642567e90c<>res://.godot/imported/play-button.png-feb8b3a20dceb7f0a6bd641376526d2d.ctex::
|
||||
tittle.png::CompressedTexture2D::7281232392210464910::1747853371::1747853372::1::::<><><>0<>0<>b25366be38b493b9ca0f623a78af003d<>res://.godot/imported/tittle.png-20d017a7b604c711d171b300c8800643.ctex::
|
||||
::res://images/bingo_auditivo/::1747575856
|
||||
background_bingo.png::CompressedTexture2D/CompressedTexture2D::6822232804109568982::1745428752::1747575856::1::::<><><>0<>0<>b2503becd5991f9f6d711f0313648db1<>res://.godot/imported/background_bingo.png-793e30681283587b028d8c8bc957ab07.ctex::
|
||||
::res://images/emparejar_las_sombras/::1747403008
|
||||
|
|
@ -89,46 +89,46 @@ vaca_color.png::CompressedTexture2D/CompressedTexture2D::1639453517109408540::17
|
|||
vaca_sombra.png::CompressedTexture2D/CompressedTexture2D::4137840386567035395::1744226338::1747403007::1::::<><><>0<>0<>7913a329232bef854d87a6ddec8c81e3<>res://.godot/imported/vaca_sombra.png-769fea26da6c81f0eea64130655d8a07.ctex::
|
||||
zorro_color.png::CompressedTexture2D/CompressedTexture2D::1666546973926131984::1745322164::1747403007::1::::<><><>0<>0<>8856013afa6584f215b35bcfba373916<>res://.godot/imported/zorro_color.png-5a852bc51419751d7d287253d6ea7c3b.ctex::
|
||||
zorro_sombra.png::CompressedTexture2D/CompressedTexture2D::6252548807644359177::1744226356::1747403007::1::::<><><>0<>0<>9c2cf80619a760076607a150050b8ce8<>res://.godot/imported/zorro_sombra.png-f45f9573d10a222e8a5fc95e53c57fa0.ctex::
|
||||
::res://images/logos/::1747700426
|
||||
::res://images/logos/::1748128298
|
||||
logo_bingo_auditivo.jpg::CompressedTexture2D/CompressedTexture2D::2684211223156084402::1747700426::1747700426::1::::<><><>0<>0<>539a5dff78bee0e4cf4a4103cf9afa8b<>res://.godot/imported/logo_bingo_auditivo.jpg-03bdf8ad732b66a85cf2c9b04f150e8f.ctex::
|
||||
logo_emparejar_las_sombras.jpg::CompressedTexture2D/CompressedTexture2D::1304789213788847404::1747700426::1747700426::1::::<><><>0<>0<>af932ef37111d1fb1189b2e9efdfcf9c<>res://.godot/imported/logo_emparejar_las_sombras.jpg-76d99c8ef0c28ec4cd7c7c5c902c6c62.ctex::
|
||||
logo_flecha_y_reacciona.jpg::CompressedTexture2D/CompressedTexture2D::1741424296729248422::1747700426::1747700426::1::::<><><>0<>0<>e5132acc60bb8942ddb5d53f390494bd<>res://.godot/imported/logo_flecha_y_reacciona.jpg-3b637c92f0fd164adec036d673be209a.ctex::
|
||||
logo_gimnasio.jpg::CompressedTexture2D/CompressedTexture2D::7269953945927652778::1747700426::1747700426::1::::<><><>0<>0<>b865210b4a91a83995039388a12db30b<>res://.godot/imported/logo_gimnasio.jpg-32d1be7a1c501ae50b3f9b8e51f9b26f.ctex::
|
||||
logo_seguir_la_linea.jpg::CompressedTexture2D/CompressedTexture2D::3712652532896905776::1747700426::1747700426::1::::<><><>0<>0<>e37728575d6c225b9ce3598d1e909817<>res://.godot/imported/logo_seguir_la_linea.jpg-b143778eeffde4affe6ad2bc4b8d2213.ctex::
|
||||
::res://scenes/::1747852850
|
||||
Home.tscn::PackedScene::436761610444962465::1747852850::0::1::::<><><>0<>0<><>::uid://cmbsedaebmtix::::res://scripts/home.gd<>uid://c1qlub6rv4e3t::::res://assets/window3.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dpxdt6wxr63gn::::res://scripts/flecha_y_reacciona/configuration_f_y_r.gd<>uid://e41ws6j00o5::::res://scripts/bingo_auditivo/configuration_bingo.gd<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://dim5arrthe0t4::::res://scripts/gimnasio/configuration_gym.gd<>uid://rcrqfnlhe4bb::::res://scripts/seguir_la_linea/configuration_seguir_la_linea.gd<>uid://ctge47k34s7yi::::res://scripts/emparejar_las_sombras/configuration_emparejar_las_sombras.gd
|
||||
::res://scenes/::1748128312
|
||||
Home.tscn::PackedScene::436761610444962465::1748128312::0::1::::<><><>0<>0<><>::uid://cmbsedaebmtix::::res://scripts/home.gd<>uid://c1qlub6rv4e3t::::res://assets/window3.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dpxdt6wxr63gn::::res://scripts/flecha_y_reacciona/configuration_f_y_r.gd<>uid://e41ws6j00o5::::res://scripts/bingo_auditivo/configuration_bingo.gd<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://dim5arrthe0t4::::res://scripts/gimnasio/configuration_gym.gd<>uid://rcrqfnlhe4bb::::res://scripts/seguir_la_linea/configuration_seguir_la_linea.gd<>uid://ctge47k34s7yi::::res://scripts/emparejar_las_sombras/configuration_emparejar_las_sombras.gd
|
||||
::res://scenes/bingo_auditivo/::1747852435
|
||||
GameBingo.tscn::PackedScene::8967965762231623292::1747852435::0::1::::<><><>0<>0<><>::uid://dhqnf0xm2mwwm::::res://scripts/bingo_auditivo/game_bingo.gd<>uid://c4g0gbifdm5fe::::res://images/bingo_auditivo/background_bingo.png<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png<>uid://cpeiuq7umndvk::::res://audios/instrucciones_bingo_auditivo.mp3
|
||||
GameBingo.tscn::PackedScene/PackedScene::8967965762231623292::1747852435::0::1::::<><><>0<>0<><>::uid://dhqnf0xm2mwwm::::res://scripts/bingo_auditivo/game_bingo.gd<>uid://c4g0gbifdm5fe::::res://images/bingo_auditivo/background_bingo.png<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png<>uid://cpeiuq7umndvk::::res://audios/instrucciones_bingo_auditivo.mp3
|
||||
::res://scenes/emparejar_las_sombras/::1747852370
|
||||
GameEmparejarLasSombras.tscn::PackedScene::7300647384769136354::1747852370::0::1::::<><><>0<>0<><>::uid://vsc3anuvlso6::::res://scripts/emparejar_las_sombras/game_emparejar_las_sombras.gd<>uid://c8kq84p5btav8::::res://audios/instrucciones_emparejar_las_sombras.mp3<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
GameEmparejarLasSombras.tscn::PackedScene/PackedScene::7300647384769136354::1747852370::0::1::::<><><>0<>0<><>::uid://vsc3anuvlso6::::res://scripts/emparejar_las_sombras/game_emparejar_las_sombras.gd<>uid://c8kq84p5btav8::::res://audios/instrucciones_emparejar_las_sombras.mp3<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
::res://scenes/flecha_y_reacciona/::1747852368
|
||||
GameFlechaYReacciona.tscn::PackedScene::2239309432930539111::1747852368::0::1::::<><><>0<>0<><>::uid://dlc5nmf2nugla::::res://scripts/flecha_y_reacciona/game_flecha_y_reacciona.gd<>uid://msfckci5lndd::::res://audios/instrucctions_flecha_y_reacciona.mp3<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
GameFlechaYReacciona.tscn::PackedScene/PackedScene::2239309432930539111::1747852368::0::1::::<><><>0<>0<><>::uid://dlc5nmf2nugla::::res://scripts/flecha_y_reacciona/game_flecha_y_reacciona.gd<>uid://msfckci5lndd::::res://audios/instrucctions_flecha_y_reacciona.mp3<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
::res://scenes/gimnasio/::1747852367
|
||||
GameGym.tscn::PackedScene::8761792870795266585::1747852366::0::1::::<><><>0<>0<><>::uid://c03j7kms107t6::::res://scripts/gimnasio/game_gym.gd<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://cykbo7qv3fy6l::::res://images/play-button.png<>uid://bf16kwp1ccwh4::::res://audios/instrucciones_gym.mp3<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
GameGym.tscn::PackedScene/PackedScene::8761792870795266585::1747852366::0::1::::<><><>0<>0<><>::uid://c03j7kms107t6::::res://scripts/gimnasio/game_gym.gd<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://cykbo7qv3fy6l::::res://images/play-button.png<>uid://bf16kwp1ccwh4::::res://audios/instrucciones_gym.mp3<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
::res://scenes/seguir_la_linea/::1747852365
|
||||
GameSeguirLaLinea.tscn::PackedScene::2653001513631914606::1747852365::0::1::::<><><>0<>0<><>::uid://cf24sqa5714px::::res://scripts/seguir_la_linea/game_seguir_la_linea.gd<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://cykbo7qv3fy6l::::res://images/play-button.png<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://cwudtop42vbi8::::res://audios/instrucciones_seguir_la_linea.mp3<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
::res://scripts/::1747849655
|
||||
app_constants.gd::GDScript::3537533678312647870::1747847221::0::1::::<>Node<><>0<>0<><>::
|
||||
game_data.gd::GDScript::4985019478966635616::1747849655::0::1::::<>Node<><>0<>0<><>::
|
||||
home.gd::GDScript::5618272075595688803::1747849655::0::1::::<>Control<><>0<>0<><>::
|
||||
GameSeguirLaLinea.tscn::PackedScene/PackedScene::2653001513631914606::1747852365::0::1::::<><><>0<>0<><>::uid://cf24sqa5714px::::res://scripts/seguir_la_linea/game_seguir_la_linea.gd<>uid://cncae337c0ws8::::res://images/menu_logo.png<>uid://dqrjftnev4ftw::::res://menu.tres<>uid://cykbo7qv3fy6l::::res://images/play-button.png<>uid://t6vfbi66g6fy::::res://images/charecter.png<>uid://cwudtop42vbi8::::res://audios/instrucciones_seguir_la_linea.mp3<>uid://354a75edxicg::::res://assets/sign in window/window.png<>uid://dk8i5somirvt2::::res://images/cuadro de texto.png
|
||||
::res://scripts/::1748117033
|
||||
app_constants.gd::GDScript/GDScript::3537533678312647870::1748117032::0::1::::<>Node<><>0<>0<><>::
|
||||
game_data.gd::GDScript/GDScript::4985019478966635616::1748117032::0::1::::<>Node<><>0<>0<><>::
|
||||
home.gd::GDScript/GDScript::5618272075595688803::1747849655::0::1::::<>Control<><>0<>0<><>::
|
||||
image_loader.gd::GDScript/GDScript::611758767551863186::1747403452::0::1::::<>Node<><>0<>0<><>::
|
||||
scene_manager.gd::GDScript/GDScript::2049891027188034232::1747403452::0::1::::<>Node<><>0<>0<><>::
|
||||
::res://scripts/bingo_auditivo/::1747837163
|
||||
configuration_bingo.gd::GDScript::10065919189713686::1747837163::0::1::::<>Window<><>0<>0<><>::
|
||||
game_bingo.gd::GDScript::7684413599682033952::1747835483::0::1::::<>Control<><>0<>0<><>::
|
||||
configuration_bingo.gd::GDScript/GDScript::10065919189713686::1747837163::0::1::::<>Window<><>0<>0<><>::
|
||||
game_bingo.gd::GDScript/GDScript::7684413599682033952::1747835483::0::1::::<>Control<><>0<>0<><>::
|
||||
::res://scripts/emparejar_las_sombras/::1747841901
|
||||
animal_tile.gd::GDScript::798197404215561372::1747841901::0::1::::AnimalTile<>Node2D<><>0<>0<><>::
|
||||
configuration_emparejar_las_sombras.gd::GDScript::6119112016534423576::1747787817::0::1::::<>Window<><>0<>0<><>::
|
||||
animal_tile.gd::GDScript/GDScript::798197404215561372::1747841901::0::1::::AnimalTile<>Node2D<><>0<>0<><>::
|
||||
configuration_emparejar_las_sombras.gd::GDScript/GDScript::6119112016534423576::1747787817::0::1::::<>Window<><>0<>0<><>::
|
||||
game_emparejar_las_sombras.gd::GDScript/GDScript::1511295973206308651::1747777885::0::1::::<>Control<><>0<>0<><>::
|
||||
::res://scripts/flecha_y_reacciona/::1747851840
|
||||
configuration_f_y_r.gd::GDScript::8259793138334191281::1747851840::0::1::::<>Window<><>0<>0<><>::
|
||||
game_flecha_y_reacciona.gd::GDScript::7937313450958682526::1747849655::0::1::::<>Control<><>0<>0<><>::
|
||||
configuration_f_y_r.gd::GDScript/GDScript::8259793138334191281::1747851840::0::1::::<>Window<><>0<>0<><>::
|
||||
game_flecha_y_reacciona.gd::GDScript/GDScript::7937313450958682526::1747849655::0::1::::<>Control<><>0<>0<><>::
|
||||
::res://scripts/gimnasio/::1747840227
|
||||
configuration_gym.gd::GDScript::7747367763046715191::1747838928::0::1::::<>Window<><>0<>0<><>::
|
||||
game_gym.gd::GDScript::6585969178415297357::1747840227::0::1::::<>Control<><>0<>0<><>::
|
||||
configuration_gym.gd::GDScript/GDScript::7747367763046715191::1747838928::0::1::::<>Window<><>0<>0<><>::
|
||||
game_gym.gd::GDScript/GDScript::6585969178415297357::1747840227::0::1::::<>Control<><>0<>0<><>::
|
||||
::res://scripts/seguir_la_linea/::1747842068
|
||||
configuration_seguir_la_linea.gd::GDScript::1198400142142721223::1747842068::0::1::::<>Window<><>0<>0<><>::
|
||||
game_seguir_la_linea.gd::GDScript::5181317563796977305::1747787421::0::1::::<>Control<><>0<>0<><>::
|
||||
configuration_seguir_la_linea.gd::GDScript/GDScript::1198400142142721223::1747842068::0::1::::<>Window<><>0<>0<><>::
|
||||
game_seguir_la_linea.gd::GDScript/GDScript::5181317563796977305::1747787421::0::1::::<>Control<><>0<>0<><>::
|
||||
::res://videos/::1747571283
|
||||
::res://videos/gimnasio/::1747571294
|
||||
1_marcha.ogv::VideoStreamTheora/VideoStreamTheora::8170332476493401942::1745338782::0::1::::<><><>0<>0<><>::
|
||||
|
|
|
|||
|
|
@ -1,18 +1 @@
|
|||
res://scenes/Home.tscn
|
||||
res://scripts/bingo_auditivo/configuration_bingo.gd
|
||||
res://scripts/home.gd
|
||||
res://scenes/bingo_auditivo/GameBingo.tscn
|
||||
res://scenes/flecha_y_reacciona/GameFlechaYReacciona.tscn
|
||||
res://scripts/bingo_auditivo/game_bingo.gd
|
||||
res://scripts/game_data.gd
|
||||
res://scripts/flecha_y_reacciona/game_flecha_y_reacciona.gd
|
||||
res://scripts/flecha_y_reacciona/configuration_f_y_r.gd
|
||||
res://scripts/gimnasio/configuration_gym.gd
|
||||
res://scripts/gimnasio/game_gym.gd
|
||||
res://scenes/gimnasio/GameGym.tscn
|
||||
res://scenes/seguir_la_linea/GameSeguirLaLinea.tscn
|
||||
res://scripts/emparejar_las_sombras/animal_tile.gd
|
||||
res://scripts/seguir_la_linea/configuration_seguir_la_linea.gd
|
||||
res://scripts/app_constants.gd
|
||||
res://menu.tres
|
||||
res://scenes/emparejar_las_sombras/GameEmparejarLasSombras.tscn
|
||||
|
|
|
|||
|
|
@ -26,5 +26,5 @@ color_mode=0
|
|||
|
||||
[export_options]
|
||||
|
||||
default_filename="Juegos"
|
||||
default_filename="ResiGames"
|
||||
export_debug=true
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
C:/Users/moran/Documents/2_DAM/Proyecto final/App-Residencia/juegos
|
||||
res://images
|
||||
res://
|
||||
res://scripts
|
||||
res://scripts/emparejar_las_sombras
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 48,
|
||||
"column": 5,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 43,
|
||||
"scroll_position": 36.0,
|
||||
"row": 160,
|
||||
"scroll_position": 285.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ state={
|
|||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 41,
|
||||
"scroll_position": 30.0,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
|
@ -209,9 +209,9 @@ state={
|
|||
"breakpoints": PackedInt32Array(),
|
||||
"column": 43,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"h_scroll_position": 327,
|
||||
"row": 12,
|
||||
"scroll_position": 0.0,
|
||||
"scroll_position": 12.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
||||
|
|
@ -221,10 +221,10 @@ state={
|
|||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 0,
|
||||
"column": 71,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 0,
|
||||
"row": 13,
|
||||
"row": 12,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -3,5 +3,5 @@ res://scenes/emparejar_las_sombras/GameEmparejarLasSombras.tscn::b6b60e3ce57c669
|
|||
res://scenes/flecha_y_reacciona/GameFlechaYReacciona.tscn::e8a7e7668ed24aa49832f6d9e82ecbd7::1747852368::res://.godot/exported/133200997/export-ea279ed6ebbc6a034308a5ae742fa619-GameFlechaYReacciona.scn
|
||||
res://scenes/gimnasio/GameGym.tscn::9b79ebd919907872e7e45e72de9304b7::1747852366::res://.godot/exported/133200997/export-902b29b7617aeec13be5947fbf71742d-GameGym.scn
|
||||
res://scenes/seguir_la_linea/GameSeguirLaLinea.tscn::2f20dd7d4b633999f20049a743c22928::1747852365::res://.godot/exported/133200997/export-d5b736042ffd164b0954669ca2ec5614-GameSeguirLaLinea.scn
|
||||
res://scenes/Home.tscn::27869131166ac9ed00213d398db47f80::1747852850::res://.godot/exported/133200997/export-20ec3a207690e015b9c115c7601d772c-Home.scn
|
||||
res://scenes/Home.tscn::42973a9671810b845f24b4c134ecf16e::1748128312::res://.godot/exported/133200997/export-20ec3a207690e015b9c115c7601d772c-Home.scn
|
||||
res://menu.tres::11872ed4c8d121a05178d0a945aa2a55::1747852682::res://.godot/exported/133200997/export-6190c6dd272fa5536bd37dcd1686cacd-menu.res
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,3 @@
|
|||
source_md5="5aea9bc31925e9f8cd361e354996ec36"
|
||||
dest_md5="d72fbb3cfe14b52d497cfac6bbd536d0"
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
source_md5="5aea9bc31925e9f8cd361e354996ec36"
|
||||
dest_md5="d72fbb3cfe14b52d497cfac6bbd536d0"
|
||||
|
||||
Binary file not shown.
|
|
@ -0,0 +1,3 @@
|
|||
source_md5="3d6f51daef010088656aa741949c9f6b"
|
||||
dest_md5="66e9a522b953d77a24e5dcd203efbb2e"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -9,7 +9,7 @@ custom_features=""
|
|||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="./Juegos.apk"
|
||||
export_path="./ResiGames.apk"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
|
|
@ -44,10 +44,10 @@ package/exclude_from_recents=false
|
|||
package/show_in_android_tv=false
|
||||
package/show_in_app_library=true
|
||||
package/show_as_launcher_app=false
|
||||
launcher_icons/main_192x192=""
|
||||
launcher_icons/adaptive_foreground_432x432=""
|
||||
launcher_icons/adaptive_background_432x432=""
|
||||
launcher_icons/adaptive_monochrome_432x432=""
|
||||
launcher_icons/main_192x192="uid://ccaykc8ppl8ah"
|
||||
launcher_icons/adaptive_foreground_432x432="uid://ccaykc8ppl8ah"
|
||||
launcher_icons/adaptive_background_432x432="uid://ccaykc8ppl8ah"
|
||||
launcher_icons/adaptive_monochrome_432x432="uid://ccaykc8ppl8ah"
|
||||
graphics/opengl_debug=false
|
||||
xr_features/xr_mode=0
|
||||
gesture/swipe_to_dismiss=false
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ccaykc8ppl8ah"
|
||||
path="res://.godot/imported/game_logo.png-51208890158e5ed3dd849f86a05616d7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://images/game_logo.png"
|
||||
dest_files=["res://.godot/imported/game_logo.png-51208890158e5ed3dd849f86a05616d7.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
|
|
@ -6,8 +6,8 @@ const NAME_JUEGO_GIMNASIO = "GIMNASIO"
|
|||
const NAME_JUEGO_BINGO_AUDITIVO = "BINGO AUDITIVO"
|
||||
const NAME_JUEGO_FLECHA_Y_REACCIONA = "FLECHA Y REACCIONA"
|
||||
|
||||
const GENERIC_PATH = "http://172.20.10.2:8080/"
|
||||
const GENERIC_PATH = "http://localhost:8080/"
|
||||
const ENDPOINT_LOG_IN = GENERIC_PATH + "auth/login"
|
||||
const ENDPOINT_GET_ALL_RESIDENTS = GENERIC_PATH + "resi/resident/getAll"
|
||||
const ENDPOINT_GET_ALL_GAMES = GENERIC_PATH + "resi/juego/getAll"
|
||||
const ENDPOINT_POST_GAME_STATS = GENERIC_PATH + "resi/juego/%d/registro/add"
|
||||
const ENDPOINT_POST_GAME_STATS = GENERIC_PATH + "resi/registro/juego/%d/add"
|
||||
|
|
|
|||
Loading…
Reference in New Issue