Add max width and center_horizontal to Profiles fragment

This commit is contained in:
Diego Romar
2026-01-21 19:23:24 -03:00
parent ad6346382c
commit c8f35b4a48
+38 -30
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout 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"
@@ -7,34 +7,42 @@
android:background="@color/nb_bg"
tools:context=".ui.profile.ProfilesFragment">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_profiles"
android:layout_width="0dp"
android:layout_height="0dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="16dp"
android:paddingBottom="88dp"
android:clipToPadding="false"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:listitem="@layout/list_item_profile" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxWidth="500dp"
android:layout_gravity="center_horizontal">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/btn_add_profile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription="@string/profiles_add"
android:src="@drawable/add_24px"
app:backgroundTint="@color/nb_orange"
app:tint="@android:color/white"
app:elevation="0dp"
app:hoveredFocusedTranslationZ="0dp"
app:pressedTranslationZ="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_profiles"
android:layout_width="0dp"
android:layout_height="0dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="16dp"
android:paddingBottom="88dp"
android:clipToPadding="false"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:listitem="@layout/list_item_profile" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/btn_add_profile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription="@string/profiles_add"
android:src="@drawable/add_24px"
app:backgroundTint="@color/nb_orange"
app:tint="@android:color/white"
app:elevation="0dp"
app:hoveredFocusedTranslationZ="0dp"
app:pressedTranslationZ="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>