Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

1. Feb 12th ● First post

Anna Wróbel edited this page Apr 12, 2017 · 6 revisions

It's been a while since I posted the first app I've ever made ("Need a hug?") and I wanted to share something new with you.

Here's my first attempt in making a self-help score keeper.

Why is it called "Take care xx"? I wanted it to be more like a message to myself than just a catchy app name (as you may know, X is commonly used at the end of a message to represent kisses).

Also today starts the Random Acts of Kindness Week, so it's a perfect day for asking you to **be kind for yourself **;). (If you have no idea what to do, here's a nice article with ideas).

I decided to stay consistent in my layout choices and use similar colors and minimalistic designs. I also divided all activities into three categories: body, mind and soul. Dots below every activity represent number of points you get for doing it and were chosen completely subjective.

Instead of using "normal" buttons and implementing an undo/decrease button, I chose ToggleButtons and made them look different following this tutorial. After reading this post on StackOverflow I also created a toggle_color.xml file to change text color when the button is checked.

When you click the button, the points are added, but when you click the same button again, the button is unchecked and you lose these points, for example:

public void changeThreePoints(View v) {
    boolean isChecked = ((ToggleButton) v).isChecked();
    if (isChecked) {
        howMany += 3;
    } else {
        howMany -= 3;
    }
    changeCare(howMany);
}

I found out how to do this here.

When you launch the app, all categories are collapsed, but when you click on the name of category it expands. I followed this tutorial.

My main xml layout file is quite short. Of course I used styles, dimens, strings (and separate xml files for string in every category to make it easier to find and change - here you can see "body" strings), colors etc, but I also found out about re-using Layouts with and chose to put every category in a separate xml file (it was MUCH easier to work this way!), for example:

<TextView
    android:id="@+id/body_title"
    style="@style/category"
    android:onClick="toggle_body"
    android:text="@string/body_category"
/>
<include layout="@layout/body"></include>

and then in body.xml I have all "body" toggle buttons. Oh, and I chose Grid Layout with two columns, but on wider screens it will be 3 columns (it's on my to-do list).

Speaking of TO-DO's:

  • alternate layouts
  • (DONE!) - I chose only one main counter and dots representing every category. There will be no counting down (I want to keep the design minimalistic). another counter(s?) where you can choose how many tasks you want to do (counting down) for yourself. Maybe one counter for each category? What do you think?
  • you'll be able to write your own name, as I've already implemented this in "Need a hug?"
  • (DONE!) I am thinking about changing the layout and using ViewPager. I really like how @ivan.gretic used it in his 4quotes and C5 Industries apps and I think that it could be a better solution than collapsing/expanding categories.
  • (DONE!) implementing a database and allowing user to save and see how many points she/he got every day
  • (DONE!) the red dot next to + button will delete the last entry from the archive (you usually can't change the past, but you CAN do something else in the present 😉
  • (DONE!) I'll think about displaying points for every category (maybe after clicking on the sum?)
  • (DONE!) radom message after adding new entry
  • (maybe) reminders to enter data every day
  • (maybe) graphs - visualising changes over time

Anyway, I hope you like it! And please don't forget to be kind this week, especially for yourself