mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-09 23:41:08 +01:00
Add custom layout
This commit is contained in:
parent
5ec704e890
commit
2b1dfa84cb
4 changed files with 91 additions and 0 deletions
9
app/src/main/res/drawable/background_dialog.xml
Normal file
9
app/src/main/res/drawable/background_dialog.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#eeffffff" />
|
||||
<corners android:bottomRightRadius="8dp"
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:topRightRadius="8dp"
|
||||
android:topLeftRadius="8dp"/>
|
||||
</shape>
|
9
app/src/main/res/drawable/rounded_btn.xml
Normal file
9
app/src/main/res/drawable/rounded_btn.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/bg_screen1" />
|
||||
<corners android:bottomRightRadius="24dp"
|
||||
android:bottomLeftRadius="24dp"
|
||||
android:topRightRadius="24dp"
|
||||
android:topLeftRadius="24dp"/>
|
||||
</shape>
|
60
app/src/main/res/layout/custodialoglayout.xml
Normal file
60
app/src/main/res/layout/custodialoglayout.xml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="340dp"
|
||||
android:layout_height="230dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="265dp"
|
||||
android:background="@drawable/background_dialog"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="22dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="14dp"
|
||||
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/txtClose"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="38dp"
|
||||
android:background="@drawable/rounded_btn"
|
||||
android:gravity="center"
|
||||
android:text="Close"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp"
|
||||
tools:ignore="HardcodedText,RtlHardcoded,SpUsage" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
13
app/src/main/res/layout/custom_btn.xml
Normal file
13
app/src/main/res/layout/custom_btn.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/custom_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ok"
|
||||
android:background="@drawable/rounded_btn"/>
|
||||
</LinearLayout>
|
Loading…
Reference in a new issue