Diario: pantalla con frases ya salidas (cards con fecha), búsqueda y filtro por autor, pestaña nueva en la bottom nav (patrón FrasesDeAnime)
This commit is contained in:
1 parent
b4437d839b
commit
aa4b22c6c5
16 files changed
+622
-6
No files matched your search
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Tarjeta de botones de navegación: borde marcado borderStrong, esquinas 8dp -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/bgCard" />
|
||||
<stroke android:width="1dp" android:color="@color/borderStrong" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp" android:height="24dp"
|
||||
android:viewportWidth="24" android:viewportHeight="24">
|
||||
<!-- Diario: libro -->
|
||||
<path android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zM20,2H8C6.9,2 6,2.9 6,4v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4C22,2.9 21.1,2 20,2zM20,16H8V4h12v12z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="#FFFFFFFF"
|
||||
android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="#FFFFFFFF"
|
||||
android:pathData="M10,18h4v-2h-4v2zM3,6v2h18V6H3zM6,14h12v-2H6v2z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Diario (patrón FrasesDeAnime): header + búsqueda + filtro autor + cards con
|
||||
la fecha en que salió cada frase. Long-press en card: copiar/compartir. -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/main_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bgMain"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:background="@color/bgCard"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nav_diario"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/borderColor" />
|
||||
|
||||
<!-- Contenido -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingEnd="20dp">
|
||||
|
||||
<!-- Búsqueda -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/bg_pill"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_search"
|
||||
app:tint="@color/colorTextMuted" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/search_input"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="@string/buscar_diario"
|
||||
android:imeOptions="actionSearch"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textColorHint="@color/colorTextMuted"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Filtro desplegable por autor -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/bg_card_strong"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="14dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_filter"
|
||||
app:tint="@color/colorTextSecondary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/filtrar_por_autor"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/spinner_autor"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_chevron_down"
|
||||
app:tint="@color/colorTextSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Lista de cards -->
|
||||
<ListView
|
||||
android:id="@+id/view_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_weight="1"
|
||||
android:divider="@null"
|
||||
android:dividerHeight="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:scrollbars="none" />
|
||||
|
||||
<!-- Estado vacío -->
|
||||
<TextView
|
||||
android:id="@+id/empty_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="40dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/lista_vacia"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Banner AdMob (AdView por código en loadBannerAd) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/adContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<!-- Barra de navegación inferior -->
|
||||
<include
|
||||
android:id="@+id/bottom_nav"
|
||||
layout="@layout/view_bottom_nav" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Card de frase para Favoritos (mockup SVG): autor en accent + estrella -->
|
||||
<!-- Card de frase para Favoritos y Diario (mockup SVG):
|
||||
autor en accent, fecha (solo Diario) y estrella (solo Favoritos) -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
@@ -26,6 +27,16 @@
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/card_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="17 oct"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="11sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/card_star"
|
||||
android:layout_width="22dp"
|
||||
@@ -33,6 +44,7 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:contentDescription="@string/delfav"
|
||||
android:src="@drawable/ic_nav_star"
|
||||
android:visibility="gone"
|
||||
app:tint="@color/star" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Vista cerrada del Spinner del filtro de autor (dentro de la card con chevron) -->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Barra de navegación inferior compartida (Inicio/Favoritos/Opciones).
|
||||
La pestaña activa se marca desde código (MainActivity.setupBottomNav)
|
||||
<!-- Barra de navegación inferior compartida (Inicio/Favoritos/Diario/Opciones).
|
||||
La pestaña activa se marca desde código (UiUtils.setupBottomNav)
|
||||
tintando icono+texto en accent. -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
@@ -64,6 +64,33 @@
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/nav_diario"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_book"
|
||||
app:tint="@color/colorTextMuted" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="@string/nav_diario"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/nav_opciones"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Menú contextual de una frase del Diario (como Favoritos sin "borrar fav") -->
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/copy"
|
||||
android:title="@string/copiar" />
|
||||
|
||||
<item
|
||||
android:id="@+id/share"
|
||||
android:title="@string/compartir" />
|
||||
</menu>
|
||||
@@ -23,6 +23,7 @@
|
||||
<!-- Bottom nav -->
|
||||
<string name="nav_inicio">Inicio</string>
|
||||
<string name="nav_favoritos">Favoritos</string>
|
||||
<string name="nav_diario">Diario</string>
|
||||
<string name="nav_opciones">Opciones</string>
|
||||
<!-- Favoritos -->
|
||||
<string name="buscar_favoritos">Buscar en favoritos…</string>
|
||||
@@ -30,6 +31,10 @@
|
||||
<string name="copiar">Copiar</string>
|
||||
<string name="delfav">Borrar de los favoritos</string>
|
||||
<string name="compartir">Compartir</string>
|
||||
<!-- Diario -->
|
||||
<string name="buscar_diario">Buscar en el diario…</string>
|
||||
<string name="filtrar_por_autor">Filtrar por autor</string>
|
||||
<string name="diario_todos">Todos los autores</string>
|
||||
<!-- Opciones -->
|
||||
<string name="opts_notif_title">Notificación diaria</string>
|
||||
<string name="opts_notif_desc">Recibir cada día la frase como notificación</string>
|
||||
|
||||
Reference in new issue
Block a user