Added very slight shadow effect at top of main lists

This commit is contained in:
Sylvain Berfini 2024-09-16 09:50:39 +02:00
parent 8fc3185278
commit 7b8b92706b
8 changed files with 42 additions and 12 deletions

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:topLeftRadius="18dp" android:topRightRadius="18dp" />
<gradient
android:endColor="@color/shadow"
android:startColor="?attr/color_main2_000"
android:angle="90"/>
</shape>

View file

@ -32,12 +32,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="no_meeting_image, no_meeting_label"
android:visibility="@{viewModel.meetings.empty ? View.VISIBLE : View.GONE}" />
<include
android:id="@+id/bottom_nav_bar"
android:layout_width="@dimen/landscape_nav_bar_width"

View file

@ -46,6 +46,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<View
android:id="@+id/shadow_effect"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="@dimen/top_bar_shadow_height"
android:background="@drawable/shape_squircle_white_r20_top_shadow"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/conversations_list"
android:background="@drawable/shape_squircle_white_r20_top_background"

View file

@ -50,6 +50,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<View
android:id="@+id/shadow_effect"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="@dimen/top_bar_shadow_height"
android:background="@drawable/shape_squircle_white_r20_top_shadow"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/lists"
android:layout_width="match_parent"

View file

@ -56,6 +56,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<View
android:id="@+id/shadow_effect"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="@dimen/top_bar_shadow_height"
android:background="@drawable/shape_squircle_white_r20_top_shadow"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/history_list"
android:background="@drawable/shape_squircle_white_r20_top_background"

View file

@ -33,12 +33,6 @@
android:layout_height="match_parent"
android:background="?attr/color_main1_500">
<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="no_meeting_image, no_meeting_label"
android:visibility="@{viewModel.meetings.empty ? View.VISIBLE : View.GONE}" />
<include
android:id="@+id/top_bar"
layout="@layout/main_activity_top_bar"
@ -53,6 +47,14 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<View
android:id="@+id/shadow_effect"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="@dimen/top_bar_shadow_height"
android:background="@drawable/shape_squircle_white_r20_top_shadow"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/meetings_list"
android:layout_width="match_parent"

View file

@ -4,6 +4,7 @@
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>
<color name="dialog_background">#99000000</color><!-- 60% opacity -->
<color name="shadow">#30000000</color>
<color name="orange_main_100">#FFEACB</color>
<color name="orange_main_100_alpha_50">#80FFEACB</color>

View file

@ -42,6 +42,7 @@
<dimen name="primary_secondary_buttons_label_padding">11dp</dimen>
<dimen name="dialog_top_bottom_margin">20dp</dimen>
<dimen name="top_bar_shadow_height">54dp</dimen>
<dimen name="top_bar_height">55dp</dimen>
<dimen name="toast_top_margin">70dp</dimen> <!-- 15dp + top_bar_height -->
<dimen name="toast_max_width">400dp</dimen>