Skip to content

Commit 9a9f2b3

Browse files
Quentin Marcisetquentinmarciset
authored andcommitted
add gradient for more readable text on image
1 parent 71f1d1d commit 9a9f2b3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<gradient
5+
android:angle="90"
6+
android:centerColor="#00000000"
7+
android:endColor="#00000000"
8+
android:startColor="#48000000" />
9+
</shape>

android/app/src/main/res/layout/layout.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232
app:layout_constraintTop_toTopOf="parent"
3333
tools:background="@tools:sample/avatars" />
3434

35+
<View
36+
android:layout_width="0dp"
37+
android:layout_height="match_parent"
38+
android:background="@drawable/gradient_bottom_to_top"
39+
app:layout_constraintBottom_toBottomOf="@+id/__SPECIFIC_ID_1__"
40+
app:layout_constraintEnd_toEndOf="@+id/__SPECIFIC_ID_1__"
41+
app:layout_constraintStart_toStartOf="@+id/__SPECIFIC_ID_1__"
42+
app:layout_constraintTop_toTopOf="@+id/__SPECIFIC_ID_1__" />
43+
3544
<TextView
3645
android:id="@+id/__SPECIFIC_ID_2__"
3746
android:layout_width="0dp"

0 commit comments

Comments
 (0)