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
4e54c38452
commit
433f5a4f76
2 changed files with 101 additions and 116 deletions
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -7,13 +8,11 @@
|
||||||
tools:ignore="MissingDefaultResource">
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/cardView"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
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"
|
||||||
android:layout_marginBottom="120dp"
|
app:cardCornerRadius="11dp"
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
@ -21,32 +20,42 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/background_dialog"
|
|
||||||
android:orientation="vertical">
|
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
|
<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="25dp"
|
android:layout_marginTop="18dp"
|
||||||
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:textColor="@color/grey"
|
||||||
|
android:textSize="15dp"
|
||||||
|
android:labelFor="@+id/msg"
|
||||||
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"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="22dp"
|
android:layout_marginLeft="22dp"
|
||||||
android:layout_marginTop="25dp"
|
android:layout_marginTop="18dp"
|
||||||
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_version"
|
||||||
android:textSize="16dp"
|
android:textColor="@color/grey"
|
||||||
|
android:textSize="14dp"
|
||||||
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -85,26 +94,5 @@
|
||||||
android:textColor="#212121"
|
android:textColor="#212121"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
</LinearLayout>
|
</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>
|
</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>
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -7,13 +8,11 @@
|
||||||
tools:ignore="MissingDefaultResource">
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/cardView"
|
|
||||||
android:layout_width="match_parent"
|
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"
|
||||||
android:layout_marginBottom="120dp"
|
app:cardCornerRadius="11dp"
|
||||||
app:cardCornerRadius="12dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
@ -22,32 +21,43 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/background_dialog"
|
|
||||||
android:orientation="vertical">
|
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
|
<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="50dp"
|
android:layout_marginTop="18dp"
|
||||||
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:textColor="@color/grey"
|
||||||
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
android:textSize="15dp"
|
||||||
|
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"
|
||||||
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="18dp"
|
||||||
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_version"
|
||||||
android:textSize="16dp"
|
android:textColor="@color/grey"
|
||||||
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
android:textSize="14dp"
|
||||||
|
tools:ignore="HardcodedText,RtlHardcoded,SpUsage"/>
|
||||||
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/txtClose"
|
android:id="@+id/txtClose"
|
||||||
|
@ -71,19 +81,6 @@
|
||||||
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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue