mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
add shadow on Pilldroid icon for custom dialog
This commit is contained in:
parent
85154e36e0
commit
4e54c38452
4 changed files with 53 additions and 23 deletions
17
app/src/main/res/drawable/shadow_bg.xml
Normal file
17
app/src/main/res/drawable/shadow_bg.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item >
|
||||||
|
<shape
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="#CCCBCB" />
|
||||||
|
<corners android:radius="50dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:right="5dp" android:bottom="2dp">
|
||||||
|
<shape
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="@android:color/white"/>
|
||||||
|
<corners android:radius="50dp"/>
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
|
@ -25,21 +25,12 @@
|
||||||
android:background="@drawable/background_dialog"
|
android:background="@drawable/background_dialog"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/head_icon"
|
|
||||||
android:layout_width="61dp"
|
|
||||||
android:layout_height="61dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:src="@drawable/tickmark"
|
|
||||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/msg"
|
android:id="@+id/msg"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="22dp"
|
android:layout_marginLeft="22dp"
|
||||||
android:layout_marginTop="18dp"
|
android:layout_marginTop="25dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
android:fontFamily="@font/opensans_semibold"
|
android:fontFamily="@font/opensans_semibold"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
|
@ -51,7 +42,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="22dp"
|
android:layout_marginLeft="22dp"
|
||||||
android:layout_marginTop="18dp"
|
android:layout_marginTop="25dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
android:fontFamily="@font/opensans_regular"
|
android:fontFamily="@font/opensans_regular"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
|
@ -61,7 +52,7 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -102,4 +93,18 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_begin="20dp" />
|
app:layout_constraintGuide_begin="20dp" />
|
||||||
</androidx.cardview.widget.CardView>
|
</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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/cardView"
|
android:id="@+id/cardView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="12dp"
|
android:layout_marginLeft="12dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
|
@ -25,26 +25,18 @@
|
||||||
android:background="@drawable/background_dialog"
|
android:background="@drawable/background_dialog"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/image"
|
|
||||||
android:layout_width="61dp"
|
|
||||||
android:layout_height="61dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:src="@drawable/tickmark"
|
|
||||||
tools:ignore="ContentDescription,ImageContrastCheck" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/msg"
|
android:id="@+id/msg"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="22dp"
|
android:layout_marginLeft="22dp"
|
||||||
android:layout_marginTop="18dp"
|
android:layout_marginTop="50dp"
|
||||||
android:layout_marginRight="12dp"
|
android:layout_marginRight="12dp"
|
||||||
android:fontFamily="@font/opensans_semibold"
|
android:fontFamily="@font/opensans_semibold"
|
||||||
android:text="@string/app_name"
|
android:text="@string/app_name"
|
||||||
android:textSize="16dp"
|
android:textSize="16dp"
|
||||||
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/cpl"
|
android:id="@+id/cpl"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -79,4 +71,19 @@
|
||||||
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -89,6 +89,7 @@
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:contentDescription="@string/app_name"
|
android:contentDescription="@string/app_name"
|
||||||
|
android:background="@drawable/shadow_bg"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
Loading…
Reference in a new issue