summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorJanak Amarasena <janakamarasena@gmail.com>2018-07-08 16:33:46 +0530
committerJanak Amarasena <janakamarasena@gmail.com>2018-07-08 16:33:46 +0530
commite4eceb400d73dd9060868e055a72ed25b290e9ec (patch)
treecff73372686fcab9090506602f957bcfc1f86a8e /app/src/main/res
parentb86acf45a0f3f673fdf9f4be9161dda3dcab307a (diff)
Added custom layout for donation popup
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/cust_button_primary.xml24
-rw-r--r--app/src/main/res/drawable/cust_button_secondary.xml27
-rw-r--r--app/src/main/res/drawable/donation_img.xml8
-rw-r--r--app/src/main/res/layout/donation_reminder_dialog.xml62
4 files changed, 121 insertions, 0 deletions
diff --git a/app/src/main/res/drawable/cust_button_primary.xml b/app/src/main/res/drawable/cust_button_primary.xml
new file mode 100644
index 00000000..3b0f7e26
--- /dev/null
+++ b/app/src/main/res/drawable/cust_button_primary.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <item android:state_pressed="true" >
+ <shape android:shape="rectangle" >
+ <corners android:radius="50dp" />
+ <padding android:left="8dp" android:right="8dp"/>
+ <solid android:color="@color/colorPrimaryDark"/>
+ </shape>
+ </item>
+ <item android:state_focused="true">
+ <shape android:shape="rectangle" >
+ <corners android:radius="50dp" />
+ <padding android:left="8dp" android:right="8dp"/>
+ <solid android:color="@color/colorPrimaryDark"/>
+ </shape>
+ </item>
+ <item >
+ <shape android:shape="rectangle" >
+ <corners android:radius="50dp" />
+ <padding android:left="8dp" android:right="8dp"/>
+ <solid android:color="@color/colorPrimary"/>
+ </shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/app/src/main/res/drawable/cust_button_secondary.xml b/app/src/main/res/drawable/cust_button_secondary.xml
new file mode 100644
index 00000000..553adca8
--- /dev/null
+++ b/app/src/main/res/drawable/cust_button_secondary.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <item android:state_pressed="true" >
+ <shape android:shape="rectangle" >
+ <corners android:radius="50dp" />
+ <padding android:left="8dp" android:right="8dp"/>
+ <solid android:color="@android:color/transparent"/>
+ <stroke android:width="2dp" android:color="@color/colorPrimary"/>
+ </shape>
+ </item>
+ <item android:state_focused="true">
+ <shape android:shape="rectangle" >
+ <corners android:radius="50dp" />
+ <padding android:left="8dp" android:right="8dp"/>
+ <solid android:color="@android:color/transparent"/>
+ <stroke android:width="2dp" android:color="@color/colorPrimary"/>
+ </shape>
+ </item>
+ <item >
+ <shape android:shape="rectangle" >
+ <corners android:radius="50dp" />
+ <padding android:left="8dp" android:right="8dp"/>
+ <solid android:color="@android:color/transparent"/>
+ <stroke android:width="2dp" android:color="@color/colorPrimary"/>
+ </shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/app/src/main/res/drawable/donation_img.xml b/app/src/main/res/drawable/donation_img.xml
new file mode 100644
index 00000000..1e0b405e
--- /dev/null
+++ b/app/src/main/res/drawable/donation_img.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/background_main"
+ android:gravity="fill_horizontal|fill_vertical"/>
+ <item android:drawable="@drawable/logo"
+ android:gravity="center"
+ />
+</layer-list>
diff --git a/app/src/main/res/layout/donation_reminder_dialog.xml b/app/src/main/res/layout/donation_reminder_dialog.xml
new file mode 100644
index 00000000..6b523053
--- /dev/null
+++ b/app/src/main/res/layout/donation_reminder_dialog.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/tvTitle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/standard_margin"
+ android:layout_marginTop="@dimen/add_button_margin"
+ android:gravity="center"
+ android:text="@string/donate_title"
+ android:textAllCaps="true"
+ android:textColor="@color/colorPrimary"
+ android:textSize="28sp"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/tvMessage"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/standard_margin"
+ android:gravity="center"
+ android:text="@string/donate_message" />
+
+ <ImageView
+ android:id="@+id/ivImg"
+ android:layout_width="120dp"
+ android:layout_height="120dp"
+ android:layout_marginBottom="@dimen/add_button_margin"
+ android:layout_marginTop="@dimen/add_button_margin"
+ android:src="@drawable/donation_img" />
+
+ <Button
+ android:id="@+id/btnDonate"
+ android:layout_width="200dp"
+ android:layout_height="38dp"
+ android:layout_marginLeft="@dimen/add_button_margin"
+ android:layout_marginRight="@dimen/add_button_margin"
+ android:layout_marginTop="@dimen/standard_margin"
+ android:background="@drawable/cust_button_primary"
+ android:text="@string/donate_button_donate"
+ android:textColor="@color/white"
+ android:textStyle="bold" />
+
+ <Button
+ android:id="@+id/btnLater"
+ android:layout_width="200dp"
+ android:layout_height="38dp"
+ android:layout_marginBottom="@dimen/mainbutton_padding"
+ android:layout_marginLeft="@dimen/add_button_margin"
+ android:layout_marginRight="@dimen/add_button_margin"
+ android:layout_marginTop="@dimen/standard_margin"
+ android:background="@drawable/cust_button_secondary"
+ android:text="@string/donate_button_remind_later"
+ android:textColor="@android:color/tab_indicator_text"
+ android:textStyle="bold" />
+
+</LinearLayout> \ No newline at end of file