Skip to content
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
Binary file modified res/drawable-hdpi/ic_action_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-mdpi/ic_action_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xhdpi/ic_action_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/ic_action_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
188 changes: 60 additions & 128 deletions res/layout/fragment_dashboard.xml
Original file line number Diff line number Diff line change
@@ -1,158 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lightgray"
android:background="@color/white"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/llLiquidAsset"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:paddingBottom="10dp" >
<RelativeLayout
android:id="@+id/rlLiquidAsset"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@color/liquid_asset_background" >

<TextView
android:id="@+id/tvLiquidAssetTitle"
style="@style/DashboardBoxTitle"
android:background="@color/darkgray"
android:includeFontPadding="false"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:text="@string/title_liquid_asset" />
android:id="@+id/tvLiquidAsset"
style="@style/DashboardLiquidAssetBalance"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/sample_remaining_amount"
android:textAppearance="?android:attr/textAppearanceLarge" />

<RelativeLayout
android:id="@+id/rlLiquidAssetData"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/tvLiquidAssetLabel"
style="@style/DashboardLiquidAssetLabel"
android:layout_below="@+id/tvLiquidAsset"
android:layout_centerHorizontal="true"
android:text="@string/label_total_liquid_assets" />
</RelativeLayout>

<LinearLayout
android:id="@+id/llMetrics"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:divider="?android:dividerHorizontal"
android:gravity="center"
android:padding="10dp"
android:showDividers="middle" >

<LinearLayout
android:id="@+id/llMonthlyGoals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical" >

<TextView
android:id="@+id/tvRemainingLabel"
android:id="@+id/tvMonthlyGoalsLabel"
style="@style/DashboardSmallText"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="@string/label_remaining"
android:textAppearance="?android:attr/textAppearanceSmall" />
android:text="@string/label_monthly_goals" />

<TextView
android:id="@+id/tvRemaining"
style="@style/LargeAmount"
android:layout_alignLeft="@+id/tvRemainingLabel"
android:layout_below="@+id/tvRemainingLabel"
android:text="@string/sample_remaining_amount"
android:textAppearance="?android:attr/textAppearanceLarge" />
android:id="@+id/tvMonthlyGoals"
style="@style/MediumAmount"
android:text="@string/sample_spent_today" />
</LinearLayout>

<LinearLayout
android:id="@+id/llSpentToday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical" >

<TextView
android:id="@+id/tvSpentTodayLabel"
style="@style/DashboardSmallText"
android:layout_alignBaseline="@+id/tvRemainingLabel"
android:layout_alignBottom="@+id/tvRemainingLabel"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:text="@string/label_spent_today"
android:textAppearance="?android:attr/textAppearanceSmall" />

<TextView
android:id="@+id/tvSpentToday"
style="@style/MediumAmount"
android:layout_alignRight="@+id/tvSpentTodayLabel"
android:layout_alignTop="@+id/tvRemaining"
android:text="@string/sample_spent_today"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/tvAvgPerDay"
style="@style/DashboardSmallText"
android:layout_alignRight="@+id/tvSpentToday"
android:layout_below="@+id/tvSpentToday"
android:text="@string/sample_avg_per_day"
android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>

<LinearLayout
android:id="@+id/llGoal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/bg_card"
android:clickable="true"
android:orientation="vertical"
android:paddingBottom="10dp" >

<TextView
android:id="@+id/tvGoalTitle"
style="@style/DashboardBoxTitle"
android:background="@color/darkgray"
android:includeFontPadding="false"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingTop="5dp"
android:text="@string/sample_goal_title" />

<RelativeLayout
android:id="@+id/rlGoalData"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
android:id="@+id/tvTotalPaymentLabel"
style="@style/DashboardSmallText"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="@string/label_payment"
android:textAppearance="?android:attr/textAppearanceSmall" />

<TextView
android:id="@+id/tvPaymentDue"
style="@style/LargeAmount"
android:layout_alignLeft="@+id/tvTotalPaymentLabel"
android:layout_below="@+id/tvTotalPaymentLabel"
android:text="@string/sample_total_payment"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/tvDueDateLabel"
style="@style/DashboardSmallText"
android:layout_alignBaseline="@+id/tvTotalPaymentLabel"
android:layout_alignBottom="@+id/tvTotalPaymentLabel"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:text="@string/label_due_date"
android:textAppearance="?android:attr/textAppearanceSmall" />

<TextView
android:id="@+id/tvDueDate"
style="@style/MediumAmount"
android:layout_alignRight="@+id/tvDueDateLabel"
android:layout_alignTop="@+id/tvPaymentDue"
android:text="@string/sample_due_date"
android:textAppearance="?android:attr/textAppearanceMedium" />

<TextView
android:id="@+id/tvDueDateHuman"
style="@style/DashboardSmallText"
android:layout_alignRight="@+id/tvDueDate"
android:layout_below="@+id/tvDueDate"
android:text="@string/sample_due_date_human"
android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>

<ProgressBar
android:id="@+id/pbGoalProgress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:progress="50" />
</LinearLayout>
<fragment
android:id="@+id/goalListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="org.missionassetfund.apps.android.fragments.GoalsListFragment"
tools:layout="@layout/fragment_goals_list" >
</fragment>

</LinearLayout>
14 changes: 14 additions & 0 deletions res/layout/fragment_goals_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<ListView
android:id="@+id/lvGoals"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@color/white"
android:dividerHeight="2dp" />

</LinearLayout>
33 changes: 33 additions & 0 deletions res/layout/item_goal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lightgray"
android:orientation="vertical" >

<TextView
android:id="@+id/tvName"
style="@style/DashboardMediumText"
android:layout_marginLeft="10dp"
android:layout_marginTop="20dp"
android:text="@string/sample_goal_name" />

<TextView
android:id="@+id/tvDueDate"
style="@style/DashboardSmallText"
android:layout_alignLeft="@+id/tvName"
android:layout_below="@+id/tvName"
android:layout_marginBottom="20dp"
android:layout_marginTop="5dp"
android:text="@string/sample_due_date_human" />

<TextView
android:id="@+id/tvPaymentDue"
style="@style/MediumAmount"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/tvName"
android:layout_marginRight="29dp"
android:text="@string/sample_total_payment"
android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>
1 change: 1 addition & 0 deletions res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<color name="gray">#CCCCCC</color>
<color name="light_blue">#c1dbee</color>
<color name="navy_blue">#165b8c</color>
<color name="liquid_asset_background">#23c7a1</color>

</resources>
7 changes: 5 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
<string name="title_liquid_asset">Liquid Assets</string>
<string name="title_goal_details">Goals</string>
<string name="label_remaining">Remaining</string>
<string name="label_spent_today">Spent Today</string>
<string name="label_spent_today">SPENT TODAY</string>
<string name="label_spent_this_week">Spent this week</string>
<string name="sample_avg_per_day">AVG $5.62 PER DAY</string>
<string name="sample_remaining_amount">$234.64</string>
<string name="sample_spent_today">$42.00</string>
<string name="sample_goal_title">Lending Circle Bill</string>
<string name="sample_goal_name">Lending Circle</string>
<string name="label_payment">Total Payment of</string>
<string name="sample_total_payment">$35.00</string>
<string name="label_due_date">Due On</string>
<string name="sample_due_date">JUL 25</string>
<string name="sample_due_date_human">2 DAYS FROM NOW</string>
<string name="sample_due_date_human">DUE IN 2 DAYS</string>
<string name="label_receive">You will receive</string>
<string name="sample_payment_number">payment 5 of 10</string>
<string name="nothing"></string>
Expand Down Expand Up @@ -46,6 +47,8 @@
<string name="parse_success_transaction_save">Transaction saved!</string>
<string name="toast_done_saving_goal">Done saving goal.</string>
<string name="error_parse_date">date parsing issue</string>
<string name="label_total_liquid_assets">TOTAL LIQUID ASSETS</string>
<string name="label_monthly_goals">MONTHLY GOALS</string>
<string name="label_dashboard_title">Dashboard</string>
<string name="title_edit_profile">Edit Profile</string>
<string name="title_activity_edit_profile">Profile</string>
Expand Down
22 changes: 18 additions & 4 deletions res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="LargeAmount" parent="@android:style/TextAppearance">
<item name="android:textStyle">bold</item>
<item name="android:textSize">30sp</item>
<item name="android:typeface">normal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="MediumAmount" parent="@android:style/TextAppearance">
<item name="android:textStyle">bold</item>
<item name="android:textSize">20sp</item>
Expand All @@ -50,7 +50,21 @@
<item name="android:layout_height">wrap_content</item>
</style>

<style name="NewGoalDialog" parent="@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar">
<style name="DashboardMediumText" parent="@android:style/TextAppearance">
<item name="android:textSize">16sp</item>
<item name="android:typeface">normal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>

<style name="NewGoalDialog" parent="@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar"></style>

<style name="DashboardLiquidAssetBalance" parent="@style/LargeAmount">
<item name="android:textColor">@color/white</item>
</style>

<style name="DashboardLiquidAssetLabel" parent="@style/DashboardSmallText">
<item name="android:textColor">@color/white</item>
</style>

</resources>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ protected void onCreate(Bundle savedInstanceState) {
tvTargetDateHuman = (TextView) findViewById(R.id.tvTargetDateHuman);
lvPastPayments = (ListView) findViewById(R.id.lvPastPayments);

// TODO(amit) consume goal being set from the intent
// Goal will come from Dashboard. For now let's get one from parse
ParseQuery<Goal> query = ParseQuery.getQuery(Goal.class);
query.whereEqualTo("user", (User) ParseUser.getCurrentUser());
Expand Down
Loading