ProyectoFinal/app/src/main/res/layout/fragment_mlist.xml

112 lines
4.4 KiB
XML

<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:fitsSystemWindows="true"
tools:context=".ui.fragments.manga_list.FragmentManga">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Banner superior reducido -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="120dp"
android:background="@drawable/sample_cover"
android:padding="12dp">
<ImageView
android:id="@+id/imageViewBanner"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/sample_cover"
android:contentDescription="Banner" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="bottom|start"
android:paddingBottom="12dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:layout_alignParentBottom="true">
<!-- Avatar -->
<ImageView
android:id="@+id/imageViewAvatar"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_profile"
android:background="@drawable/circle_mask"
android:scaleType="centerCrop"
android:clipToOutline="true"
android:contentDescription="Avatar"
android:layout_marginEnd="12dp" />
<!-- Nombre -->
<TextView
android:id="@+id/textViewUsername"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Usuario"
android:textColor="@android:color/white"
android:textStyle="bold"
android:textSize="18sp"
android:gravity="center_vertical" />
<!-- Botón de cambiar vista -->
<ImageButton
android:id="@+id/btnViewCompact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_view_compact" />
<ImageButton
android:id="@+id/btnViewNormal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_view_normal" />
<ImageButton
android:id="@+id/btnViewLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_view_large" />
</LinearLayout>
</RelativeLayout>
<!-- Lista scrollable -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewManga"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="100dp"
android:clipToPadding="false"
android:scrollbars="vertical" />
</LinearLayout>
<!-- FAB flotante -->
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fabAddManga"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="24dp"
android:contentDescription="Agregar manga"
android:src="@drawable/ic_add"
android:tint="@android:color/white"
app:backgroundTint="@color/primary" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>