Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

chore: Store the dimensions into dimens resource file #69

Merged
merged 2 commits into from
Jul 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="162dp"
android:layout_height="@dimen/height_162"
android:layout_gravity="top"
android:layout_marginTop="0dp"
android:layout_marginBottom="15dp"
android:layout_marginTop="@dimen/margin_0"
android:layout_marginBottom="@dimen/margin_15"
android:background="#E7CDDA"
android:padding="0dp"
android:padding="@dimen/padding_0"
android:scaleType="fitXY"
android:tint="#6F000000"
app:srcCompat="@drawable/temple_default_cover" />
Expand All @@ -26,23 +26,23 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
android:layout_marginLeft="@dimen/margin_5"
android:layout_marginRight="@dimen/margin_5">

<Button
android:id="@+id/insert_btn"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_height="@dimen/height_120"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_weight="1.0"
android:layout_margin="@dimen/margin_5"
android:layout_weight="@dimen/weight_1"
android:background="@color/orange"
android:drawableTop="@android:drawable/ic_menu_add"
android:drawablePadding="0dp"
android:drawablePadding="@dimen/padding_0"
android:drawableTint="#fff"
android:padding="20dp"
android:padding="@dimen/padding_20"
android:text="Add Pooja/Dontation"
android:textAllCaps="false"
android:textColor="#fff" />
Expand All @@ -53,41 +53,41 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
android:layout_marginLeft="@dimen/margin_5"
android:layout_marginRight="@dimen/margin_5">

<Button
android:id="@+id/read_btn"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_height="@dimen/height_120"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_weight="1.0"
android:layout_margin="@dimen/margin_5"
android:layout_weight="@dimen/weight_1"
android:background="@color/orange"
android:drawableTop="@android:drawable/ic_menu_search"
android:drawablePadding="0dp"
android:drawablePadding="@dimen/padding_0"
android:drawableTint="#fff"
android:padding="20dp"
android:padding="@dimen/padding_20"
android:text="Search Pooja/Donation"
android:textAllCaps="false"
android:textColor="#fff" />

<Button
android:id="@+id/read_all_btn"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_height="@dimen/height_120"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_weight="1.0"
android:layout_margin="@dimen/margin_5"
android:layout_weight="@dimen/weight_1"
android:background="@color/orange"
android:drawableTop="@android:drawable/ic_menu_view"
android:drawablePadding="0dp"
android:drawablePadding="@dimen/padding_0"
android:drawableTint="#fff"
android:padding="20dp"
android:padding="@dimen/padding_20"
android:text="View All Pooja/Donation"
android:textAllCaps="false"
android:textColor="#fff" />
Expand All @@ -98,42 +98,42 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
android:layout_marginLeft="@dimen/margin_5"
android:layout_marginRight="@dimen/margin_5">


<Button
android:id="@+id/update_btn"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_height="@dimen/height_120"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_weight="1.0"
android:layout_margin="@dimen/margin_5"
android:layout_weight="@dimen/weight_1"
android:background="@color/orange"
android:drawableTop="@android:drawable/ic_menu_edit"
android:drawablePadding="0dp"
android:drawablePadding="@dimen/padding_0"
android:drawableTint="#fff"
android:padding="20dp"
android:padding="@dimen/padding_20"
android:text="Edit Pooja/Donation"
android:textAllCaps="false"
android:textColor="#fff" />

<Button
android:id="@+id/delete_btn"
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_height="@dimen/height_120"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_margin="5dp"
android:layout_weight="1.0"
android:layout_margin="@dimen/margin_5"
android:layout_weight="@dimen/weight_1"
android:background="@color/orange"
android:drawableTop="@android:drawable/ic_menu_delete"
android:drawablePadding="0dp"
android:drawablePadding="@dimen/padding_0"
android:drawableTint="#fff"
android:padding="20dp"
android:padding="@dimen/padding_20"
android:text="Delete Pooja/Donation"
android:textAllCaps="false"
android:textColor="#fff" />
Expand Down
21 changes: 11 additions & 10 deletions app/src/main/res/layout/delete_data.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
Expand All @@ -13,22 +14,22 @@
android:id="@+id/radiogroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_margin="@dimen/margin_20"
android:orientation="vertical">

<RadioButton
android:id="@+id/radio_pooja"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_margin="@dimen/margin_15"
android:text="@string/people_who_registered_for_pooja"
android:theme="@style/radioButton" />

<RadioButton
android:id="@+id/radio_donate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_margin="@dimen/margin_15"
android:text="@string/people_who_donated_money_for_temple"
android:theme="@style/radioButton" />
</RadioGroup>
Expand All @@ -43,26 +44,26 @@
<EditText
android:id="@+id/uid"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="@dimen/height_40"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="45dp"
android:layout_margin="@dimen/margin_45"
android:hint="@string/user_id" />


<Button
android:id="@+id/delete_btn"
android:layout_width="175dp"
android:layout_width="@dimen/width_175"
android:layout_height="wrap_content"
android:layout_below="@+id/uid"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_marginBottom="24dp"
android:layout_marginTop="@dimen/margin_20"
android:layout_marginBottom="@dimen/margin_24"
android:background="@drawable/button_animated"
android:text="@string/delete"
android:textColor="#ffffff"
android:textSize="18dp" />
android:textSize="@dimen/text_18" />


</RelativeLayout>
Expand Down
48 changes: 24 additions & 24 deletions app/src/main/res/layout/insert_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
android:id="@+id/radiogroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_margin="@dimen/margin_20"
android:orientation="vertical">

<RadioButton
android:id="@+id/radio_pooja"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_margin="@dimen/margin_15"
android:text="@string/register_for_new_pooja"
android:theme="@style/radioButton" />

<RadioButton
android:id="@+id/radio_donate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_margin="@dimen/margin_15"
android:text="@string/donate_money_to_temple"
android:theme="@style/radioButton" />
</RadioGroup>
Expand All @@ -52,33 +52,33 @@
<EditText
android:id="@+id/uid"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="45dp"
android:layout_height="@dimen/height_50"
android:layout_margin="@dimen/margin_45"
android:hint="@string/user_id" />

<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="45dp"
android:layout_marginLeft="45dp"
android:layout_marginBottom="10dp"
android:layout_marginStart="@dimen/margin_45"
android:layout_marginLeft="@dimen/margin_45"
android:layout_marginBottom="@dimen/margin_10"
android:text="@string/select_pooja_type"
android:textSize="15sp" />
android:textSize="@dimen/text_15" />

<EditText
android:id="@+id/money_donated"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="45dp"
android:layout_height="@dimen/height_50"
android:layout_margin="@dimen/margin_45"
android:hint="@string/enter_money_donated" />

<Spinner
android:id="@+id/spinner1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="45dp"
android:layout_marginRight="45dp"
android:layout_marginBottom="45dp"
android:layout_height="@dimen/height_50"
android:layout_marginLeft="@dimen/margin_45"
android:layout_marginRight="@dimen/margin_45"
android:layout_marginBottom="@dimen/margin_45"
android:entries="@array/pooja_types"
android:prompt="@style/Base.Widget.AppCompat.Light.PopupMenu.Overflow" />

Expand All @@ -92,8 +92,8 @@
<EditText
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_margin="45dp"
android:layout_height="@dimen/height_50"
android:layout_margin="@dimen/margin_45"
android:hint="@string/name" />

<EditText
Expand All @@ -106,22 +106,22 @@
<android.support.v7.widget.AppCompatCheckBox
android:id="@+id/paid_check"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_margin="45dp"
android:layout_height="@dimen/height_40"
android:layout_margin="@dimen/margin_45"
android:text="@string/PAID" />


<Button
android:id="@+id/insert_btn"
android:layout_width="175dp"
android:layout_height="50dp"
android:layout_width="@dimen/width_175"
android:layout_height="@dimen/height_50"
android:layout_gravity="center"
android:layout_marginTop="45dp"
android:layout_marginBottom="24dp"
android:layout_marginTop="@dimen/margin_45"
android:layout_marginBottom="@dimen/margin_24"
android:background="@drawable/button_animated"
android:text="@string/insert_"
android:textColor="#ffffff"
android:textSize="18dp" />
android:textSize="@dimen/text_18" />
</LinearLayout>


Expand Down
Loading