From 6a35edd6aa2abc7cf51285b8c13b30b2f3b23662 Mon Sep 17 00:00:00 2001 From: Jose Montes de Oca Date: Sat, 12 Jul 2014 14:49:24 -0700 Subject: [PATCH 1/5] Add simple goal item --- res/layout/item_goal.xml | 32 ++++++++++++++++++++++++++++++++ res/values/strings.xml | 3 ++- res/values/styles.xml | 7 +++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 res/layout/item_goal.xml diff --git a/res/layout/item_goal.xml b/res/layout/item_goal.xml new file mode 100644 index 0000000..d948f36 --- /dev/null +++ b/res/layout/item_goal.xml @@ -0,0 +1,32 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 127f81e..e17c465 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -12,11 +12,12 @@ $234.64 $42.00 Lending Circle Bill + Lending Circle Total Payment of $35.00 Due On JUL 25 - 2 DAYS FROM NOW + DUE IN 2 DAYS You will receive payment 5 of 10 diff --git a/res/values/styles.xml b/res/values/styles.xml index 93d3ffe..d753400 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -49,6 +49,13 @@ wrap_content wrap_content + + From 534c52078c1bc6a79cf371809cb8d1ab9430e710 Mon Sep 17 00:00:00 2001 From: Jose Montes de Oca Date: Sat, 12 Jul 2014 17:59:38 -0700 Subject: [PATCH 2/5] Update dashboard to show user's current goals - Set up Goal list view with a custom GoalAdpater extending parse - Set up a goal list fragment to contain the list of goal for the user - Updated the dashboard to show this new fragment. --- res/layout/fragment_dashboard.xml | 87 ++----------------- res/layout/fragment_goals_list.xml | 14 +++ res/layout/item_goal.xml | 17 ++-- .../activities/GoalDetailsActivity.java | 1 + .../apps/android/adapters/GoalAdapter.java | 52 +++++++++++ .../android/fragments/DashboardFragment.java | 14 --- .../android/fragments/GoalsListFragment.java | 57 ++++++++++++ .../apps/android/models/Goal.java | 1 + 8 files changed, 141 insertions(+), 102 deletions(-) create mode 100644 res/layout/fragment_goals_list.xml create mode 100644 src/org/missionassetfund/apps/android/adapters/GoalAdapter.java create mode 100644 src/org/missionassetfund/apps/android/fragments/GoalsListFragment.java diff --git a/res/layout/fragment_dashboard.xml b/res/layout/fragment_dashboard.xml index 2465440..b3458a1 100644 --- a/res/layout/fragment_dashboard.xml +++ b/res/layout/fragment_dashboard.xml @@ -2,7 +2,7 @@ - - - - - - - - - - - - - - - - - - - + + \ No newline at end of file diff --git a/res/layout/fragment_goals_list.xml b/res/layout/fragment_goals_list.xml new file mode 100644 index 0000000..5d7b4a3 --- /dev/null +++ b/res/layout/fragment_goals_list.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/res/layout/item_goal.xml b/res/layout/item_goal.xml index d948f36..e3750f5 100644 --- a/res/layout/item_goal.xml +++ b/res/layout/item_goal.xml @@ -2,21 +2,22 @@ @@ -24,8 +25,8 @@ android:id="@+id/tvPaymentDue" style="@style/MediumAmount" android:layout_alignParentRight="true" - android:layout_alignParentTop="true" - android:layout_marginRight="20dp" + android:layout_alignTop="@+id/tvName" + android:layout_marginRight="29dp" android:text="@string/sample_total_payment" android:textAppearance="?android:attr/textAppearanceLarge" /> diff --git a/src/org/missionassetfund/apps/android/activities/GoalDetailsActivity.java b/src/org/missionassetfund/apps/android/activities/GoalDetailsActivity.java index e49c385..12414d8 100644 --- a/src/org/missionassetfund/apps/android/activities/GoalDetailsActivity.java +++ b/src/org/missionassetfund/apps/android/activities/GoalDetailsActivity.java @@ -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 query = ParseQuery.getQuery(Goal.class); query.whereEqualTo("user", (User) ParseUser.getCurrentUser()); diff --git a/src/org/missionassetfund/apps/android/adapters/GoalAdapter.java b/src/org/missionassetfund/apps/android/adapters/GoalAdapter.java new file mode 100644 index 0000000..1f8d0b7 --- /dev/null +++ b/src/org/missionassetfund/apps/android/adapters/GoalAdapter.java @@ -0,0 +1,52 @@ + +package org.missionassetfund.apps.android.adapters; + +import org.missionassetfund.apps.android.R; +import org.missionassetfund.apps.android.models.Goal; +import org.missionassetfund.apps.android.models.User; +import org.missionassetfund.apps.android.utils.FormatterUtils; + +import android.content.Context; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import com.parse.ParseQuery; +import com.parse.ParseQueryAdapter; + +public class GoalAdapter extends ParseQueryAdapter { + + public GoalAdapter(Context context) { + super(context, new ParseQueryAdapter.QueryFactory() { + @Override + public ParseQuery create() { + ParseQuery query = ParseQuery.getQuery(Goal.class); + query.whereEqualTo("user", (User) User.getCurrentUser()); + return query; + } + }); + } + + @Override + public View getItemView(Goal goal, View v, ViewGroup parent) { + if (v == null) { + v = View.inflate(getContext(), R.layout.item_goal, null); + } + + super.getItemView(goal, v, parent); + + // Look up view elements + TextView tvName = (TextView) v.findViewById(R.id.tvName); + TextView tvDueDate = (TextView) v.findViewById(R.id.tvDueDate); + TextView tvPaymentDue = (TextView) v.findViewById(R.id.tvPaymentDue); + + // Populate Goal Item + tvName.setText(goal.getName()); + // TODO(jose): Use goal due date buitl by amit. ATM just showing the Goal Date. + tvDueDate.setText(FormatterUtils.formatMonthDate(goal.getGoalDate())); + // TODO(jose): use CurrencyUtils.getCurrencyValueFormatted from felipe's PR + tvPaymentDue.setText(FormatterUtils.formatAmount(goal.getPaymentAmount())); + + return v; + } +} diff --git a/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java b/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java index c3ddb97..12f5619 100644 --- a/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java +++ b/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java @@ -2,7 +2,6 @@ package org.missionassetfund.apps.android.fragments; import org.missionassetfund.apps.android.R; -import org.missionassetfund.apps.android.activities.GoalDetailsActivity; import org.missionassetfund.apps.android.activities.LiquidAssetsActivity; import android.app.Activity; @@ -18,7 +17,6 @@ import android.widget.LinearLayout; public class DashboardFragment extends Fragment { - private LinearLayout llGoal; private LinearLayout llLiquidAsset; public interface SwitchMainFragmentListener { @@ -34,9 +32,6 @@ public void onAttach(Activity activity) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_dashboard, container, false); - llGoal = (LinearLayout) view.findViewById(R.id.llGoal); - llGoal.setOnClickListener(goalDetailsClickListener); - llLiquidAsset = (LinearLayout) view.findViewById(R.id.llLiquidAsset); llLiquidAsset.setOnClickListener(liquidAssetClickListener); @@ -59,13 +54,4 @@ public void onClick(View v) { } }; - private OnClickListener goalDetailsClickListener = new OnClickListener() { - - @Override - public void onClick(View v) { - Intent intent = new Intent(getActivity(), GoalDetailsActivity.class); - getActivity().startActivity(intent); - } - }; - } diff --git a/src/org/missionassetfund/apps/android/fragments/GoalsListFragment.java b/src/org/missionassetfund/apps/android/fragments/GoalsListFragment.java new file mode 100644 index 0000000..3e51d52 --- /dev/null +++ b/src/org/missionassetfund/apps/android/fragments/GoalsListFragment.java @@ -0,0 +1,57 @@ + +package org.missionassetfund.apps.android.fragments; + +import org.missionassetfund.apps.android.R; +import org.missionassetfund.apps.android.activities.GoalDetailsActivity; +import org.missionassetfund.apps.android.adapters.GoalAdapter; +import org.missionassetfund.apps.android.models.Goal; + +import android.content.Intent; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.AdapterView.OnItemClickListener; +import android.widget.ListView; + +public class GoalsListFragment extends Fragment { + + private ListView lvGoals; + private GoalAdapter goalAdapter; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + goalAdapter = new GoalAdapter(getActivity()); + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View v = inflater.inflate(R.layout.fragment_goals_list, container, false); + + lvGoals = (ListView) v.findViewById(R.id.lvGoals); + lvGoals.setAdapter(goalAdapter); + goalAdapter.loadObjects(); + + setupListeners(); + + return v; + } + + private void setupListeners() { + lvGoals.setOnItemClickListener(new OnItemClickListener() { + + @Override + public void onItemClick(AdapterView adapter, View parent, int position, long rowId) { + Goal goal = (Goal) adapter.getItemAtPosition(position); + + Intent intent = new Intent(getActivity(), GoalDetailsActivity.class); + intent.putExtra(Goal.GOAL_KEY, goal); + getActivity().startActivity(intent); + } + }); + } +} diff --git a/src/org/missionassetfund/apps/android/models/Goal.java b/src/org/missionassetfund/apps/android/models/Goal.java index 2969db5..de85a05 100644 --- a/src/org/missionassetfund/apps/android/models/Goal.java +++ b/src/org/missionassetfund/apps/android/models/Goal.java @@ -10,6 +10,7 @@ @ParseClassName("Goal") public class Goal extends ParseObject implements Serializable { private static final long serialVersionUID = 6160272793326362343L; + public static final String GOAL_KEY = "goal"; public static final String USER_KEY = "user"; public static final String NAME_KEY = "name"; From b07575bfef1e044f9440fea42f994eacbff8070a Mon Sep 17 00:00:00 2001 From: Jose Montes de Oca Date: Sat, 12 Jul 2014 19:11:06 -0700 Subject: [PATCH 3/5] Update dashboard UI to new wireframe --- res/layout/fragment_dashboard.xml | 103 +++++++++--------- res/values/colors.xml | 1 + res/values/strings.xml | 4 +- res/values/styles.xml | 17 ++- .../android/fragments/DashboardFragment.java | 8 +- 5 files changed, 74 insertions(+), 59 deletions(-) diff --git a/res/layout/fragment_dashboard.xml b/res/layout/fragment_dashboard.xml index b3458a1..8181dfc 100644 --- a/res/layout/fragment_dashboard.xml +++ b/res/layout/fragment_dashboard.xml @@ -1,85 +1,90 @@ - + + + + android:id="@+id/tvLiquidAssetLabel" + style="@style/DashboardLiquidAssetLabel" + android:layout_below="@+id/tvLiquidAsset" + android:layout_centerHorizontal="true" + android:text="@string/label_total_liquid_assets" /> + + + - + + android:text="@string/label_monthly_goals" /> + android:id="@+id/tvMonthlyGoals" + style="@style/MediumAmount" + android:text="@string/sample_spent_today" /> + + + - - - + + class="org.missionassetfund.apps.android.fragments.GoalsListFragment" + tools:layout="@layout/fragment_goals_list" > \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index d9d16b6..2090f9d 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -7,5 +7,6 @@ #CCCCCC #C3E4ED #000080 + #23c7a1 \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index e17c465..2cb6e7c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -6,7 +6,7 @@ Liquid Assets Goals Remaining - Spent Today + SPENT TODAY Spent this week AVG $5.62 PER DAY $234.64 @@ -47,5 +47,7 @@ Transaction saved! Done saving goal. date parsing issue + TOTAL LIQUID ASSETS + MONTHLY GOALS \ No newline at end of file diff --git a/res/values/styles.xml b/res/values/styles.xml index d753400..9e33c59 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -25,7 +25,7 @@ fill_parent wrap_content - + - + - + - + + + + - + \ No newline at end of file diff --git a/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java b/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java index 12f5619..f7c8f80 100644 --- a/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java +++ b/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java @@ -14,10 +14,10 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; -import android.widget.LinearLayout; +import android.widget.RelativeLayout; public class DashboardFragment extends Fragment { - private LinearLayout llLiquidAsset; + private RelativeLayout rlLiquidAsset; public interface SwitchMainFragmentListener { void SwitchToFragment(Class klass); @@ -32,8 +32,8 @@ public void onAttach(Activity activity) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_dashboard, container, false); - llLiquidAsset = (LinearLayout) view.findViewById(R.id.llLiquidAsset); - llLiquidAsset.setOnClickListener(liquidAssetClickListener); + rlLiquidAsset = (RelativeLayout) view.findViewById(R.id.rlLiquidAsset); + rlLiquidAsset.setOnClickListener(liquidAssetClickListener); setHasOptionsMenu(true); return view; From 063126b70591734b47a873f084c4216bd6b9e29c Mon Sep 17 00:00:00 2001 From: Jose Montes de Oca Date: Sat, 12 Jul 2014 19:16:36 -0700 Subject: [PATCH 4/5] Update add icon --- res/drawable-hdpi/ic_action_add.png | Bin 405 -> 177 bytes res/drawable-mdpi/ic_action_add.png | Bin 297 -> 146 bytes res/drawable-xhdpi/ic_action_add.png | Bin 518 -> 198 bytes res/drawable-xxhdpi/ic_action_add.png | Bin 821 -> 266 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/res/drawable-hdpi/ic_action_add.png b/res/drawable-hdpi/ic_action_add.png index 6771494b67bc942793b3fe061389fc5dd68fff98..affeaae000027b3e682e011d4eb3e123f7ed34ab 100644 GIT binary patch delta 150 zcmbQrypeH&ay>(Zr;B4q#jUqDH}W~`*p*g{F|kw zyH5JD)JrpPx>dI%!_K_-I?N0ZaE2*EKkfB{ZNdl29#?&2nc$cAY^^E-LxVi?qPee? vcU!r+uNR+p1ge0fhds0hI%gBYy#0Nkl0}{VraohNU){1pv3q`iQ~AlnV6WEnAk5`-}f1?Lb4bF-T-@`0a~B~ zG}7U34UXCTQs6t_0;oa2?@%~r7c%f1s3!()6JmVizJo7tOMhr4jIY91@Fj3#4E}-f zS^8Lc7r_rj6fXDt*llwKj!&E?Y^U6XfO^78R+jn82?xG*kt&r(0g5%nV$Rkc1sE=z zH>?UEK(XA|c=hW50t|Z&0Zl*w4TpgCMXIa_N}@VF5aUl&O64etJHq*qF-fe6|LDFd z#j%#x0Rm&zjbnmN2F0jaIpAU;EGanoTbs|FS58x ziRg>DB+BXNA2c64DNmT&hipd*Xq~lLqJGpT(N;;Kv6Vz?F^T4GGVS$bK5&SMiHZHE Z-2pB8tE+dj3#9-6002ovPDHLkV1nhftG56E diff --git a/res/drawable-mdpi/ic_action_add.png b/res/drawable-mdpi/ic_action_add.png index 89d49350952ea65e81256dae983b8ef9981b141b..0146a82c385c9e57563876a2420e9ce461a1f2d1 100644 GIT binary patch delta 117 zcmV-*0E+*q0+IocByL$rL_t(|+U=IH2>>7rzLpQ~p$)MHEq#LIN4Z47HdN zKt$YKn${^V1GHH>l>h<=xc$y`VjcwK#TnTNu)zhV8UdjK{th8~fB*s_1pNJ!0^Fnm Xn#nxo4?jkl00000NkvXXu0mjf%qJ~` delta 270 zcmV+p0rCEl0jUCzB!BQpL_t(|+U=IX4TT^KhJDf7Tj3p?z(u@yWC=zvoE$)7;s$RP zaVK6)dLRwrLoi4}lkXyh7W)?{ifq|ZGo@4wFhBqkBJf*%XW#}{010ddNc3q!1}*^( ztd_u(73Y*8f)5UXDT7xMxQnC3zrcvh7C-J&bK7rkHQ%>I8-MF1O`w>z0150YS6WR5 zOh7udDE9OgFo7NBl7KJ>t|fdl|H?4llQo1(0uz}$UeHiS)|iq?fRiZM delta 493 zcmVB4tz@N4R7qxKIcCC^DcsaH6eBR%%2bXo*tKmh~r2;e2?WEwp3 zT>g%QrpU51;NoH$G)aVR2Ivx@#-I)RiBR;ZFcw2t4rZeuf|3}Dq9}|1$;OC;0d_Y= zMsAH=IhF0=63o_E^qZsD9{+tO#CbrX^-hTMh)l;68Q&qPj$|p$V{$zUsJISFYKkgx j9hHS32!bF8f;`m|mo#|9=YHv300000NkvXXu0mjfYbW0Y diff --git a/res/drawable-xxhdpi/ic_action_add.png b/res/drawable-xxhdpi/ic_action_add.png index 3db423e6e874db522583b7a9c3d6d50cb59e14a3..d63c3a8735d0936cf191fd12527e26d672e78b75 100644 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGo7d>4ZLn>~)y?cRIN`t(G2h@2YuNjyQ+-l#(Aior(*wfX|Wt~$(698P!Mi2l1 delta 799 zcmV+)1K|9M0<{K^BYy(?Nkl~t0o!$H6r7G@ilr8)a|@PX#Cx8LNDfkyNuZQyD^~?oAEQv zD2j$~8dZv_IrX-NG|}x`FAw1Dk;iw>x{t~4*Rjdk2rnuG{%sALwVrk3w{&Y?G*Ey- z*VeKuz)g+2Tnhqxx`jrN0FGk|0!$JXU}8al zxo0lDsmMPS1;{(1oG6}zs z;gzHf0eC4NSOAWt7!V<)gIP}&H!&Pd3@iYLbAJtp!146J0&qdYNJhjJrNAQ8aY-+v z0P$SX+X=|i8vO5_mW+Sm_{ajpbxl=8;G(vXctERyz#`DB!-xp9t1;k?XxL;RFw?Tk zK#EG!J|ixPwv`5IM>K9V;+9U;y7-CK#Xq|yns*x!gZA|XMd2Sf000000000000000 d02lz(@Bu$Z**=74Yfk_G002ovPDHLkV1n9%ct`*M From e8095c06f002809bc7a58378e426db443ee17937 Mon Sep 17 00:00:00 2001 From: Jose Montes de Oca Date: Sat, 12 Jul 2014 20:03:14 -0700 Subject: [PATCH 5/5] wire up dashboard view - Setup reading liquid assets balance from user table - Mock all the other aggregate data points. --- .../android/fragments/DashboardFragment.java | 43 ++++++++++++++++++- .../apps/android/models/User.java | 12 +++++- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java b/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java index f7c8f80..44e9e90 100644 --- a/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java +++ b/src/org/missionassetfund/apps/android/fragments/DashboardFragment.java @@ -1,8 +1,11 @@ package org.missionassetfund.apps.android.fragments; +import java.text.NumberFormat; + import org.missionassetfund.apps.android.R; import org.missionassetfund.apps.android.activities.LiquidAssetsActivity; +import org.missionassetfund.apps.android.models.User; import android.app.Activity; import android.content.Intent; @@ -15,9 +18,15 @@ import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.RelativeLayout; +import android.widget.TextView; public class DashboardFragment extends Fragment { private RelativeLayout rlLiquidAsset; + private TextView tvLiquidAsset; + private TextView tvMonthlyGoals; + private TextView tvSpentToday; + + private User currentUser; public interface SwitchMainFragmentListener { void SwitchToFragment(Class klass); @@ -28,14 +37,24 @@ public void onAttach(Activity activity) { super.onAttach(activity); } + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setHasOptionsMenu(true); + + currentUser = (User) User.getCurrentUser(); + } + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_dashboard, container, false); - rlLiquidAsset = (RelativeLayout) view.findViewById(R.id.rlLiquidAsset); + setupViews(view); + rlLiquidAsset.setOnClickListener(liquidAssetClickListener); - setHasOptionsMenu(true); + setupUserData(); + return view; } @@ -45,6 +64,21 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.dashboard, menu); } + private void setupViews(View v) { + rlLiquidAsset = (RelativeLayout) v.findViewById(R.id.rlLiquidAsset); + tvLiquidAsset = (TextView) v.findViewById(R.id.tvLiquidAsset); + tvMonthlyGoals = (TextView) v.findViewById(R.id.tvMonthlyGoals); + tvSpentToday = (TextView) v.findViewById(R.id.tvSpentToday); + } + + private void setupUserData() { + // TODO(jose): investigate and potentially set up Parse Cloud Code to + // create custom functions that would do aggregate queries. + tvLiquidAsset.setText(getCurrencyValueFormatted(currentUser.getLiquidAssets())); + tvMonthlyGoals.setText(getCurrencyValueFormatted(60.5d)); + tvSpentToday.setText(getCurrencyValueFormatted(-123.45d)); + } + private OnClickListener liquidAssetClickListener = new OnClickListener() { @Override @@ -54,4 +88,9 @@ public void onClick(View v) { } }; + private String getCurrencyValueFormatted(Double value) { + NumberFormat baseFormat = NumberFormat.getCurrencyInstance(); + return baseFormat.format(value); + } + } diff --git a/src/org/missionassetfund/apps/android/models/User.java b/src/org/missionassetfund/apps/android/models/User.java index 7a8d771..e3d80b3 100644 --- a/src/org/missionassetfund/apps/android/models/User.java +++ b/src/org/missionassetfund/apps/android/models/User.java @@ -8,13 +8,12 @@ public class User extends ParseUser { public static final String NAME_KEY = "name"; public static final String PHONE_NUMBER_KEY = "phoneNumber"; + public static final String LIQUID_ASSETS_KEY = "liquidAssets"; public User() { super(); } - // TODO: determine where to store liquid asset data. - public String getName() { return getString(NAME_KEY); } @@ -30,4 +29,13 @@ public String getPhoneNumber() { public void setPhoneNumber(String phoneNumber) { put(PHONE_NUMBER_KEY, phoneNumber); } + + // For now, lets store liquid assets within the user Obj + public Double getLiquidAssets() { + return getDouble(LIQUID_ASSETS_KEY); + } + + public void setLiquidAssets(Double liquidAsset) { + put(LIQUID_ASSETS_KEY, liquidAsset); + } }