Main: rediseño con header propio, tarjeta de frase, stats y sin fondo
Layout nuevo segun mockup SVG: header (titulo + menu popup de 3 puntos), piladora de fecha, tarjeta de frase con fav/compartir/anime, tarjetas de estadisticas EN ESTE ANIME y TOTAL VISTAS, controles prev/hoy/next y boton CAMBIAR FRASE accent. Sin ActionBar ni imagen de fondo; modo oscuro via values-night. applySystemBarsInsets parametrizado con color de navbar e iconos.
This commit is contained in:
1 parent
9b2a527cdb
commit
08070f203a
3 files changed
+280
-139
No files matched your search
@@ -1,168 +1,281 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:ads="http://schemas.android.com/apk/res-auto"
|
||||
<!-- Rediseño 2026-10 (mockup SVG): header propio con menú + píldora de fecha +
|
||||
tarjeta de frase + estadísticas + controles de navegación. Sin ActionBar
|
||||
(ocultada en código) y sin imagen de fondo. Banner al final, sin solape. -->
|
||||
<LinearLayout 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="@drawable/principal">
|
||||
|
||||
android:background="@color/bgMain"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- ============ HEADER (título + menú) ============ -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="60dp"
|
||||
android:background="@color/bgCard"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_menu"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/menu"
|
||||
app:srcCompat="@drawable/ic_more_vert"
|
||||
app:tint="@color/colorTextSecondary" />
|
||||
</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:paddingEnd="20dp"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<!-- Píldora de fecha -->
|
||||
<TextView
|
||||
android:id="@+id/txt_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:background="@drawable/bg_pill"
|
||||
android:gravity="center"
|
||||
android:text="Fecha"
|
||||
android:textColor="@color/colorTextSecondary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- Tarjeta principal: frase + divisor + favorito/compartir/anime -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/colorPrimaryLight"
|
||||
android:paddingTop="6dp"
|
||||
android:text="Fecha"
|
||||
android:textAlignment="center"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="22sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="#aaffffff"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Sep_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/black"
|
||||
android:scaleType="fitXY" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@drawable/bg_card"
|
||||
android:minHeight="230dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_sentence"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:fadeScrollbars="true"
|
||||
android:padding="2dp"
|
||||
android:gravity="center"
|
||||
android:minHeight="140dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:scrollbars="vertical"
|
||||
android:text="Aquí la frase, no?"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="20sp"
|
||||
android:text="Aquí la frase"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="16sp"
|
||||
tools:text="Si la frase es muy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, muy larga, muuuy larga, saldrá una scrollbar." />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/Sep_2"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/black"
|
||||
android:scaleType="fitXY" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@color/borderColor" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_fav"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/star_off"
|
||||
android:contentDescription="Favorito"
|
||||
android:scaleType="centerInside" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_share"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="Compartir"
|
||||
android:scaleType="centerInside"
|
||||
app:srcCompat="@android:drawable/ic_menu_share"
|
||||
app:tint="@color/colorTextSecondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_anime"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"
|
||||
android:paddingStart="12dp"
|
||||
android:text="Texto Anime"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Estadísticas: EN ESTE ANIME / TOTAL VISTAS -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginLeft="26dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_fav"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/star_on"
|
||||
android:scaleType="centerInside" />
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="14dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_share"
|
||||
android:layout_width="58dp"
|
||||
android:layout_height="58dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@null"
|
||||
android:paddingTop="2dp"
|
||||
app:srcCompat="@android:drawable/ic_menu_share" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/stat_this_anime"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txt_anime"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingRight="12dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="Texto Anime"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" />
|
||||
<TextView
|
||||
android:id="@+id/stat_anime_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="—"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_card"
|
||||
android:orientation="vertical"
|
||||
android:padding="14dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/stat_total"
|
||||
android:textColor="@color/colorTextMuted"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/stat_total_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="—"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Controles: anterior / hoy / siguiente -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_prev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@android:drawable/ic_media_previous" />
|
||||
android:background="@drawable/bg_card_strong"
|
||||
android:contentDescription="Día anterior"
|
||||
android:scaleType="centerInside"
|
||||
app:srcCompat="@drawable/ic_chevron_left" />
|
||||
|
||||
<ImageButton
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_today"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@android:drawable/ic_dialog_dialer" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1.2"
|
||||
android:background="@drawable/bg_card_strong"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_calendar"
|
||||
app:tint="@color/textPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:text="@string/btn_today"
|
||||
android:textColor="@color/textPrimary"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
app:srcCompat="@android:drawable/ic_media_next" />
|
||||
|
||||
android:background="@drawable/bg_card_strong"
|
||||
android:contentDescription="Día siguiente"
|
||||
android:scaleType="centerInside"
|
||||
app:srcCompat="@drawable/ic_chevron_right" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
<!-- Botón principal -->
|
||||
<TextView
|
||||
android:id="@+id/btn_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Cambiar Frase" />
|
||||
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_accent"
|
||||
android:gravity="center"
|
||||
android:text="@string/btn_change"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Contenedor del banner: el AdView se crea por código (loadBannerAd) con tamaño
|
||||
adaptativo; si fuera un <AdView> del XML sin ads:adSize, el SDK loguea
|
||||
"Required XML attribute adSize was missing" y fija el suyo propio. -->
|
||||
<!-- Banner (AdView por código en loadBannerAd) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/adContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
Reference in new issue
Block a user