Optimizacion de los xml y implemetacion de nuevas clases y optimizacion igualmente de classes antiguas
|
|
@ -0,0 +1,49 @@
|
|||
package com.santiparra.yomitrack.model;
|
||||
|
||||
public class AnimeItem {
|
||||
private String title;
|
||||
private String imageUrl;
|
||||
private int watchedEpisodes;
|
||||
private int totalEpisodes;
|
||||
private double score;
|
||||
private String type;
|
||||
private String status; // Nuevo atributo
|
||||
|
||||
public AnimeItem(String title, String imageUrl, int watchedEpisodes, int totalEpisodes, double score, String type, String status) {
|
||||
this.title = title;
|
||||
this.imageUrl = imageUrl;
|
||||
this.watchedEpisodes = watchedEpisodes;
|
||||
this.totalEpisodes = totalEpisodes;
|
||||
this.score = score;
|
||||
this.type = type;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public int getWatchedEpisodes() {
|
||||
return watchedEpisodes;
|
||||
}
|
||||
|
||||
public int getTotalEpisodes() {
|
||||
return totalEpisodes;
|
||||
}
|
||||
|
||||
public double getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.santiparra.yomitrack.model; // Ajusta el paquete si necesitas
|
||||
|
||||
public class ItemModel {
|
||||
|
||||
private String title;
|
||||
private String progress;
|
||||
private String imageUrl;
|
||||
private ContentType contentType; // Anime o Manga
|
||||
|
||||
public enum ContentType {
|
||||
ANIME,
|
||||
MANGA
|
||||
}
|
||||
|
||||
// Constructor completo
|
||||
public ItemModel(String title, String progress, String imageUrl, ContentType contentType) {
|
||||
this.title = title;
|
||||
this.progress = progress;
|
||||
this.imageUrl = imageUrl;
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
// Getters
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getProgress() {
|
||||
return progress;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public ContentType getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
|
||||
// Setters (opcional si quieres mutar los datos después)
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public void setProgress(String progress) {
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public void setContentType(ContentType contentType) {
|
||||
this.contentType = contentType;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.santiparra.yomitrack.model;
|
||||
|
||||
public class RecentActivityModel {
|
||||
public String user, action, title, time, imageUrl;
|
||||
|
||||
public RecentActivityModel(String user, String action, String title, String time, String imageUrl) {
|
||||
this.user = user;
|
||||
this.action = action;
|
||||
this.title = title;
|
||||
this.time = time;
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.santiparra.yomitrack.model;
|
||||
|
||||
public class UserStats {
|
||||
private String category;
|
||||
private int count;
|
||||
private int percentage;
|
||||
|
||||
public UserStats(String category, int count, int percentage) {
|
||||
this.category = category;
|
||||
this.count = count;
|
||||
this.percentage = percentage;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public int getPercentage() {
|
||||
return percentage;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.santiparra.yomitrack.model.adapters.airing;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.santiparra.yomitrack.R;
|
||||
import com.santiparra.yomitrack.model.ItemModel;
|
||||
|
||||
public class AiringViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public ImageView imageView;
|
||||
public TextView titleTextView;
|
||||
public TextView progressTextView;
|
||||
|
||||
public AiringViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
imageView = itemView.findViewById(R.id.mediaImage);
|
||||
titleTextView = itemView.findViewById(R.id.titleTextView);
|
||||
progressTextView = itemView.findViewById(R.id.progressTextView);
|
||||
}
|
||||
|
||||
public void bind(ItemModel item) {
|
||||
titleTextView.setText(item.getTitle());
|
||||
progressTextView.setText("Progress: " + item.getProgress());
|
||||
|
||||
if (item.getImageUrl() != null && !item.getImageUrl().isEmpty()) {
|
||||
Glide.with(itemView.getContext())
|
||||
.load(item.getImageUrl())
|
||||
.placeholder(R.drawable.placeholder_image)
|
||||
.error(R.drawable.error_image)
|
||||
.into(imageView);
|
||||
} else {
|
||||
imageView.setImageResource(R.drawable.placeholder_image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.santiparra.yomitrack.model.adapters.airing;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.santiparra.yomitrack.R;
|
||||
import com.santiparra.yomitrack.model.ItemModel;
|
||||
|
||||
public class AnimeViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public ImageView imageView;
|
||||
public TextView titleTextView;
|
||||
public TextView progressTextView;
|
||||
|
||||
public AnimeViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
imageView = itemView.findViewById(R.id.mediaImage);
|
||||
titleTextView = itemView.findViewById(R.id.titleTextView);
|
||||
progressTextView = itemView.findViewById(R.id.progressTextView);
|
||||
}
|
||||
|
||||
public void bind(ItemModel item) {
|
||||
titleTextView.setText(item.getTitle());
|
||||
progressTextView.setText("Progress: " + item.getProgress());
|
||||
|
||||
if (item.getImageUrl() != null && !item.getImageUrl().isEmpty()) {
|
||||
Glide.with(itemView.getContext())
|
||||
.load(item.getImageUrl())
|
||||
.placeholder(R.drawable.placeholder_image)
|
||||
.error(R.drawable.error_image)
|
||||
.into(imageView);
|
||||
} else {
|
||||
imageView.setImageResource(R.drawable.placeholder_image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
package com.santiparra.yomitrack.model.adapters.anime_adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.santiparra.yomitrack.R;
|
||||
import com.santiparra.yomitrack.model.AnimeItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AnimeAdapter extends RecyclerView.Adapter<AnimeAdapter.AnimeViewHolder> {
|
||||
|
||||
private final List<AnimeItem> animeList;
|
||||
private final Context context;
|
||||
private int viewMode = 0;
|
||||
|
||||
public interface OnAnimeRemoveListener {
|
||||
void onAnimeRemoved(AnimeItem anime);
|
||||
}
|
||||
|
||||
private OnAnimeRemoveListener removeListener;
|
||||
|
||||
public void setOnAnimeRemoveListener(OnAnimeRemoveListener listener) {
|
||||
this.removeListener = listener;
|
||||
}
|
||||
|
||||
public void setViewMode(int mode) {
|
||||
this.viewMode = mode;
|
||||
}
|
||||
|
||||
public AnimeAdapter(Context context, List<AnimeItem> animeList) {
|
||||
this.context = context;
|
||||
this.animeList = animeList;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public AnimeViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
int layoutId;
|
||||
switch (viewMode) {
|
||||
case 1:
|
||||
layoutId = R.layout.item_anime_large; // solo imagen con score y episodios
|
||||
break;
|
||||
case 2:
|
||||
layoutId = R.layout.item_anime_compact; // solo texto
|
||||
break;
|
||||
default:
|
||||
layoutId = R.layout.item_anime; // imagen + texto
|
||||
break;
|
||||
}
|
||||
View view = LayoutInflater.from(context).inflate(layoutId, parent, false);
|
||||
return new AnimeViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull AnimeViewHolder holder, int position) {
|
||||
AnimeItem anime = animeList.get(position);
|
||||
|
||||
if (holder.title != null)
|
||||
holder.title.setText(anime.getTitle());
|
||||
|
||||
if (holder.progress != null)
|
||||
holder.progress.setText("Progress: " + anime.getWatchedEpisodes() + "/" + anime.getTotalEpisodes());
|
||||
|
||||
if (holder.score != null)
|
||||
holder.score.setText(String.valueOf(anime.getScore()));
|
||||
|
||||
if (holder.type != null)
|
||||
holder.type.setText(anime.getType());
|
||||
|
||||
if (holder.cover != null) {
|
||||
Glide.with(context)
|
||||
.load(anime.getImageUrl())
|
||||
.placeholder(R.drawable.sample_anime_cover)
|
||||
.into(holder.cover);
|
||||
}
|
||||
|
||||
if (holder.buttonOptions != null) {
|
||||
holder.buttonOptions.setOnClickListener(v -> {
|
||||
PopupMenu popup = new PopupMenu(context, holder.buttonOptions);
|
||||
popup.inflate(R.menu.anime_item_menu);
|
||||
popup.setOnMenuItemClickListener(item -> {
|
||||
int id = item.getItemId();
|
||||
if (id == R.id.action_edit) {
|
||||
Toast.makeText(context, "Edit: " + anime.getTitle(), Toast.LENGTH_SHORT).show();
|
||||
return true;
|
||||
} else if (id == R.id.action_remove) {
|
||||
int pos = holder.getAdapterPosition();
|
||||
if (pos != RecyclerView.NO_POSITION) {
|
||||
AnimeItem removed = animeList.remove(pos);
|
||||
notifyItemRemoved(pos);
|
||||
if (removeListener != null) {
|
||||
removeListener.onAnimeRemoved(removed);
|
||||
}
|
||||
Toast.makeText(context, "Removed: " + removed.getTitle(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
popup.show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return animeList.size();
|
||||
}
|
||||
|
||||
static class AnimeViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView title, progress, score, type;
|
||||
ImageView cover, buttonOptions;
|
||||
|
||||
AnimeViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
title = itemView.findViewById(R.id.textViewTitle);
|
||||
progress = itemView.findViewById(R.id.textViewProgress);
|
||||
score = itemView.findViewById(R.id.textViewScore);
|
||||
type = itemView.findViewById(R.id.textViewType);
|
||||
cover = itemView.findViewById(R.id.imageViewCover);
|
||||
buttonOptions = itemView.findViewById(R.id.buttonOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.santiparra.yomitrack.model.adapters.recentactivity_adapter;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.santiparra.yomitrack.R;
|
||||
import com.santiparra.yomitrack.model.RecentActivityModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RecentActivityAdapter extends RecyclerView.Adapter<RecentActivityAdapter.ActivityViewHolder> {
|
||||
private final List<RecentActivityModel> activityList;
|
||||
|
||||
public RecentActivityAdapter(List<RecentActivityModel> activityList) {
|
||||
this.activityList = activityList;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ActivityViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_activity_card, parent, false);
|
||||
return new ActivityViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ActivityViewHolder holder, int position) {
|
||||
RecentActivityModel activity = activityList.get(position);
|
||||
holder.user.setText(activity.user);
|
||||
holder.action.setText(activity.action);
|
||||
holder.title.setText(activity.title);
|
||||
holder.time.setText(activity.time);
|
||||
|
||||
Glide.with(holder.image.getContext())
|
||||
.load(activity.imageUrl)
|
||||
.placeholder(R.drawable.placeholder_image)
|
||||
.into(holder.image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return activityList.size();
|
||||
}
|
||||
|
||||
static class ActivityViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView user, action, title, time;
|
||||
ImageView image;
|
||||
|
||||
public ActivityViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
user = itemView.findViewById(R.id.activityUser);
|
||||
action = itemView.findViewById(R.id.activityAction);
|
||||
title = itemView.findViewById(R.id.activityTitle);
|
||||
time = itemView.findViewById(R.id.activityTime);
|
||||
image = itemView.findViewById(R.id.activityCover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.santiparra.yomitrack.utils;
|
||||
|
||||
import com.santiparra.yomitrack.model.UserStats;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class StatsHelper {
|
||||
|
||||
public static List<UserStats> getAnimeStats() {
|
||||
List<UserStats> stats = new ArrayList<>();
|
||||
stats.add(new UserStats("Watching", 42, 8));
|
||||
stats.add(new UserStats("Completed", 265, 51));
|
||||
stats.add(new UserStats("On Hold", 10, 2));
|
||||
stats.add(new UserStats("Dropped", 5, 1));
|
||||
stats.add(new UserStats("Plan to Watch", 198, 38));
|
||||
return stats;
|
||||
}
|
||||
|
||||
public static List<UserStats> getMangaStats() {
|
||||
List<UserStats> stats = new ArrayList<>();
|
||||
stats.add(new UserStats("Reading", 31, 10));
|
||||
stats.add(new UserStats("Completed", 121, 55));
|
||||
stats.add(new UserStats("On Hold", 5, 3));
|
||||
stats.add(new UserStats("Dropped", 4, 2));
|
||||
stats.add(new UserStats("Plan to Read", 28, 30));
|
||||
return stats;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/primary" /> <!-- Fondo oscuro -->
|
||||
|
||||
<corners android:radius="12dp" /> <!-- Bordes redondeados -->
|
||||
|
||||
<padding
|
||||
android:left="12dp"
|
||||
android:top="8dp"
|
||||
android:right="12dp"
|
||||
android:bottom="8dp" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#333C55" /> <!-- Borde sutil -->
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/white" />
|
||||
<corners android:radius="8dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#CCCCCC" />
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 212 B |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,14c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,20c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
||||
|
After Width: | Height: | Size: 448 B |
|
After Width: | Height: | Size: 169 B |
|
After Width: | Height: | Size: 164 B |
|
|
@ -0,0 +1,21 @@
|
|||
<!-- progress_bar.xml -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Fondo gris oscuro de la barra -->
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="50dp" />
|
||||
<solid android:color="@color/gray" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- Progreso de la barra -->
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="50dp" />
|
||||
<solid android:color="@color/primary" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<corners android:radius="8dp"/>
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#CCCCCC"/>
|
||||
<size android:width="60dp" android:height="85dp"/>
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 3.0 MiB |
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:backgroundTint="@color/background">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/primary">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/activityThumbnail"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/sample_cover"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/circle_mask"
|
||||
android:clipToOutline="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activityText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Watched episode 5 of XYZ"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="15sp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activityTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="16 hours ago"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="4dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/activityCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
android:backgroundTint="@color/primary">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp">
|
||||
|
||||
<!-- Imagen de portada -->
|
||||
<ImageView
|
||||
android:id="@+id/activityCover"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="110dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/sample_cover"
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<!-- Layout de contenido -->
|
||||
<LinearLayout
|
||||
android:id="@+id/contentLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toEndOf="@id/activityCover"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignTop="@id/activityCover"
|
||||
android:layout_alignBottom="@id/activityCover"
|
||||
android:layout_marginEnd="36dp">
|
||||
|
||||
<!-- Usuario y hora -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activityUser"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Usuario"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textStyle="bold"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activityTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="5 minutes ago"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Acción -->
|
||||
<TextView
|
||||
android:id="@+id/activityAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Scored 9/10 on"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- Título -->
|
||||
<TextView
|
||||
android:id="@+id/activityTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Chainsaw Man"
|
||||
android:textColor="@color/activeTint"
|
||||
android:textStyle="bold"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<!-- Mini foto de perfil -->
|
||||
<ImageView
|
||||
android:id="@+id/activityMiniThumb"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_profile"
|
||||
android:background="@drawable/circle_mask"
|
||||
android:clipToOutline="true" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Iconos de comentario y like -->
|
||||
<LinearLayout
|
||||
android:id="@+id/activityActions"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_alignBottom="@+id/activityCover"
|
||||
android:layout_alignParentEnd="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_comment"
|
||||
app:tint="@color/textPrimary" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_heart"
|
||||
app:tint="@color/textPrimary" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewCover"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/sample_anime_cover"
|
||||
android:background="@drawable/rounded_mask"
|
||||
android:clipToOutline="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Anime Title"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="2"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="5 / 12"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewScore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:text="8.5"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewType"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:text="TV"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:gravity="center"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/buttonOptions"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/ic_more_vert"
|
||||
android:contentDescription="Options"
|
||||
app:tint="@color/textPrimary" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Anime Title"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="2"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Progress: 5 / 12"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?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="wrap_content"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewCover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@drawable/rounded_mask"
|
||||
android:clipToOutline="true"
|
||||
android:src="@drawable/sample_anime_cover" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:padding="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="1"
|
||||
android:background="#AA000000">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewProgress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="5 / 12"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewScore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="8.5"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="end" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewCover"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/sample_anime_cover"
|
||||
android:background="@drawable/rounded_mask"
|
||||
android:clipToOutline="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Manga Title"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="2"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="45 / 100"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewScore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:text="8.5"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewType"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:text="Manga"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:gravity="center"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/buttonOptions"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/ic_more_vert"
|
||||
android:contentDescription="Options"
|
||||
app:tint="@color/textPrimary" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Manga Title"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="2"
|
||||
android:textSize="14sp"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewProgress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Progress: 45 / 100"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?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="wrap_content"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageViewCover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@drawable/rounded_mask"
|
||||
android:clipToOutline="true"
|
||||
android:src="@drawable/sample_anime_cover" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:padding="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:weightSum="1"
|
||||
android:background="#AA000000">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewProgress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="45 / 100"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewScore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="8.5"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:gravity="end" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardElevation="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
android:backgroundTint="@color/primary">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="18dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/mediaImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="150dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@string/media_image_desc" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Media Title"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progressTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Progress info"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:layout_marginTop="6dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<!-- Título encima de la barra -->
|
||||
<TextView
|
||||
android:id="@+id/statLabelFull"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Completed • 265"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:layout_marginBottom="4dp" />
|
||||
|
||||
<!-- Barra -->
|
||||
<ProgressBar
|
||||
android:id="@+id/statProgressBar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_bar" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/action_edit" android:title="Edit"/>
|
||||
<item android:id="@+id/action_remove" android:title="Remove"/>
|
||||
</menu>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/filter_all" android:title="All" />
|
||||
<item android:id="@+id/filter_watching" android:title="Watching" />
|
||||
<item android:id="@+id/filter_planning" android:title="Planning" />
|
||||
<item android:id="@+id/filter_paused" android:title="Paused" />
|
||||
<item android:id="@+id/filter_dropped" android:title="Dropped" />
|
||||
<item android:id="@+id/filter_completed" android:title="Completed" />
|
||||
</menu>
|
||||