add shadow on Pilldroid icon for custom dialog

This commit is contained in:
jacques 2023-08-17 17:51:07 +02:00
parent 4e54c38452
commit 433f5a4f76
2 changed files with 101 additions and 116 deletions

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
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,13 +8,11 @@
tools:ignore="MissingDefaultResource">
<androidx.cardview.widget.CardView
android:id="@+id/cardView"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="120dp"
app:cardCornerRadius="12dp"
app:cardCornerRadius="11dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
@ -21,32 +20,42 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/background_dialog"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="61dp"
android:layout_height="61dp"
android:layout_gravity="center"
android:layout_marginTop="12dp"
android:background="@drawable/shadow_bg"
android:src="@drawable/ic_launcher_foreground" />
<TextView
android:id="@+id/msg"
android:id="@id/msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginTop="25dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:fontFamily="@font/opensans_semibold"
android:text="@string/app_name"
android:textSize="16dp"
android:textColor="@color/grey"
android:textSize="15dp"
android:labelFor="@+id/msg"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
<TextView
android:id="@+id/cpl"
android:id="@id/cpl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginTop="25dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:fontFamily="@font/opensans_regular"
android:text="@string/app_name"
android:textSize="16dp"
android:text="@string/app_version"
android:textColor="@color/grey"
android:textSize="14dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
</LinearLayout>
@ -85,26 +94,5 @@
android:textColor="#212121"
android:textSize="16sp" />
</LinearLayout>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="20dp" />
</androidx.cardview.widget.CardView>
<ImageView
android:id="@+id/head_icon"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="82dp"
android:background="@drawable/shadow_bg"
android:elevation="@dimen/ten_dp"
android:src="@drawable/ic_launcher_foreground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,Pilldroid icon" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
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,13 +8,11 @@
tools:ignore="MissingDefaultResource">
<androidx.cardview.widget.CardView
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="120dp"
app:cardCornerRadius="12dp"
app:cardCornerRadius="11dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
@ -22,32 +21,43 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_dialog"
android:orientation="vertical">
<ImageView
android:layout_width="61dp"
android:layout_height="61dp"
android:layout_gravity="center"
android:layout_marginTop="12dp"
android:src="@drawable/ic_launcher_foreground"
android:background="@drawable/shadow_bg"
tools:ignore="ContentDescription"/>
<TextView
android:id="@+id/msg"
android:id="@id/msg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginTop="50dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:fontFamily="@font/opensans_semibold"
android:text="@string/app_name"
android:textSize="16dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
android:textColor="@color/grey"
android:textSize="15dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage"/>
<TextView
android:id="@+id/cpl"
android:id="@id/cpl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="22dp"
android:layout_marginTop="18dp"
android:layout_marginRight="12dp"
android:fontFamily="@font/opensans_regular"
android:text="@string/app_name"
android:textSize="16dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
android:text="@string/app_version"
android:textColor="@color/grey"
android:textSize="14dp"
tools:ignore="HardcodedText,RtlHardcoded,SpUsage"/>
<Button
android:id="@+id/txtClose"
@ -71,19 +81,6 @@
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<ImageView
android:id="@+id/image"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="92dp"
android:background="@drawable/shadow_bg"
android:elevation="@dimen/ten_dp"
android:src="@drawable/ic_launcher_foreground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription,ImageContrastCheck" />
</androidx.constraintlayout.widget.ConstraintLayout>