Mejora de xml para que se vea mucho mas formal!

This commit is contained in:
santi 2025-05-29 13:06:35 +02:00
parent 156a76a009
commit 5dfa4de7e3
9 changed files with 279 additions and 115 deletions

Binary file not shown.

View File

@ -11,6 +11,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
@ -83,6 +84,10 @@ public class FragmentAnime extends Fragment {
Toast.makeText(getContext(), "Error: sesión no iniciada", Toast.LENGTH_SHORT).show();
return;
}
// Mostrar el nombre del usuario
String username = prefs.getString("username", "Usuario");
TextView textViewUsername = view.findViewById(R.id.textViewUsername);
textViewUsername.setText(username);
loadMoreAnimes(currentPage);
}

View File

@ -11,6 +11,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
@ -78,6 +79,10 @@ public class FragmentManga extends Fragment {
Toast.makeText(getContext(), "Error: sesión no iniciada", Toast.LENGTH_SHORT).show();
return;
}
// Mostrar el nombre del usuario
String username = prefs.getString("username", "Usuario");
TextView textViewUsername = view.findViewById(R.id.textViewUsername);
textViewUsername.setText(username);
setViewType(currentViewType);
loadMoreMangas(currentPage);

Binary file not shown.

View File

@ -1,30 +1,71 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="24dp">
android:background="@color/background"
android:gravity="center">
<EditText
android:id="@+id/editEmail"
android:layout_width="match_parent"
<androidx.cardview.widget.CardView
android:layout_width="340dp"
android:layout_height="wrap_content"
android:background="@drawable/edit_text_background"
android:hint="Correo electrónico"
android:inputType="textEmailAddress"
android:textColor="@android:color/white"
android:textColorHint="@android:color/white" />
android:layout_gravity="center"
app:cardCornerRadius="20dp"
app:cardElevation="8dp"
android:layout_margin="24dp"
android:backgroundTint="#1B2333">
<Button
android:id="@+id/buttonSendRecovery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Enviar recuperación" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp"
android:gravity="center_horizontal">
<Button
android:id="@+id/buttonGoToReset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Ya tengo el código" />
</LinearLayout>
<ImageView
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginBottom="16dp"
android:src="@drawable/logo_yomitrack"
android:contentDescription="Logo YomiTrack" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Recuperar contraseña"
android:textColor="@android:color/white"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginBottom="20dp" />
<EditText
android:id="@+id/editEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/edit_text_background"
android:hint="Correo electrónico"
android:inputType="textEmailAddress"
android:textColor="@android:color/white"
android:textColorHint="@android:color/white"
android:padding="12dp"
android:layout_marginBottom="16dp" />
<Button
android:id="@+id/buttonSendRecovery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Enviar recuperación"
android:backgroundTint="#55C2E8"
android:textColor="@android:color/white"
android:layout_marginBottom="12dp" />
<Button
android:id="@+id/buttonGoToReset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Ya tengo el código"
android:backgroundTint="#2C2F38"
android:textColor="@android:color/white" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>

View File

@ -1,50 +1,81 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:orientation="vertical"
android:padding="24dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:padding="24dp">
<EditText
android:id="@+id/editTextUsername"
android:hint="Usuario"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp"
android:background="@drawable/bg_card"
android:elevation="4dp"
android:gravity="center_horizontal">
<EditText
android:id="@+id/editTextPassword"
android:hint="Contraseña"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/logoImage"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/logo_yomitrack"
android:layout_marginBottom="16dp" />
<Button
android:id="@+id/buttonLogin"
android:text="Iniciar Sesión"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/editTextUsername"
android:hint="Usuario"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp" />
<Button
android:id="@+id/buttonGuest"
android:text="Entrar como Invitado"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/editTextPassword"
android:hint="Contraseña"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp" />
<Button
android:id="@+id/buttonGoRegister"
android:text="Registrarse"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/buttonLogin"
android:text="Iniciar Sesión"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" />
<TextView
android:id="@+id/textForgotPassword"
android:text="¿Olvidaste tu contraseña?"
android:textColor="@android:color/holo_blue_dark"
android:layout_marginTop="16dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button
android:id="@+id/buttonGuest"
android:text="Entrar como Invitado"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp" />
<Button
android:id="@+id/buttonGoRegister"
android:text="Registrarse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp" />
<TextView
android:id="@+id/textForgotPassword"
android:text="¿Olvidaste tu contraseña?"
android:textColor="@android:color/holo_blue_dark"
android:textSize="14sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@ -81,7 +81,8 @@
android:inputType="text"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:textColor="@android:color/black"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:textSize="14sp" />
<ImageButton

View File

@ -1,37 +1,73 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/registerFragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="24dp">
android:background="@color/background"> <!-- Fondo oscuro tipo AniList -->
<!-- Usuario -->
<EditText
android:id="@+id/editTextUsernameRegister"
android:hint="Nuevo usuario"
android:layout_width="match_parent"
<LinearLayout
android:layout_width="320dp"
android:layout_height="wrap_content"
android:inputType="textPersonName" />
android:orientation="vertical"
android:padding="24dp"
android:layout_gravity="center"
android:background="@drawable/bg_register_card"
android:elevation="6dp"
android:gravity="center_horizontal">
<!-- Correo electrónico -->
<EditText
android:id="@+id/editEmail"
android:hint="Correo electrónico"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress" />
<!-- Logo en la parte superior -->
<ImageView
android:id="@+id/logoImageView"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginBottom="24dp"
android:src="@drawable/logo_yomitrack"
android:contentDescription="Logo YomiTrack" />
<!-- Contraseña -->
<EditText
android:id="@+id/editTextPasswordRegister"
android:hint="Contraseña"
android:inputType="textPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!-- Campo: Usuario -->
<EditText
android:id="@+id/editTextUsernameRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Nuevo usuario"
android:inputType="textPersonName"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:layout_marginBottom="16dp" />
<!-- Botón de registro -->
<Button
android:id="@+id/buttonRegister"
android:text="Registrarse"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<!-- Campo: Correo -->
<EditText
android:id="@+id/editEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Correo electrónico"
android:inputType="textEmailAddress"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:layout_marginBottom="16dp" />
<!-- Campo: Contraseña -->
<EditText
android:id="@+id/editTextPasswordRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Contraseña"
android:inputType="textPassword"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:layout_marginBottom="24dp" />
<!-- Botón de registro -->
<Button
android:id="@+id/buttonRegister"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="REGISTRARSE"
android:textAllCaps="true"
android:backgroundTint="#56C8F5"
android:textColor="#FFFFFF" />
</LinearLayout>
</FrameLayout>

View File

@ -1,33 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="24dp">
android:background="@color/background"
android:fillViewport="true">
<EditText
android:id="@+id/editEmail"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Correo electrónico" />
android:orientation="vertical"
android:gravity="center"
android:padding="24dp">
<EditText
android:id="@+id/editToken"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Código de recuperación" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_marginBottom="60dp"
android:orientation="vertical"
android:padding="24dp"
android:background="@drawable/bg_card"
android:elevation="8dp"
android:gravity="center_horizontal">
<EditText
android:id="@+id/editNewPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Nueva contraseña"
android:inputType="textPassword" />
<ImageView
android:id="@+id/logoImage"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/logo_yomitrack"
android:contentDescription="Logo"
android:layout_gravity="center"
android:layout_marginBottom="24dp" />
<Button
android:id="@+id/buttonResetPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Restablecer contraseña"
android:layout_marginTop="16dp" />
</LinearLayout>
<EditText
android:id="@+id/editEmail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Email"
android:inputType="text"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:layout_marginBottom="16dp" />
<EditText
android:id="@+id/editToken"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Código de recuperación"
android:inputType="text"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:layout_marginBottom="16dp" />
<EditText
android:id="@+id/editNewPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Nueva contraseña"
android:inputType="textPassword"
android:textColorHint="@color/textPrimary"
android:textColor="@color/textPrimary"
android:backgroundTint="@color/textPrimary"
android:layout_marginBottom="24dp" />
<Button
android:id="@+id/buttonResetPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Restablecer contraseña"
android:backgroundTint="#55C2E8"
android:textColor="@android:color/white" />
</LinearLayout>
</LinearLayout>
</ScrollView>