As an Android developer, I got involved in time management, and what came of it

    Hi, Habr. I want to confess to you. I'm lazy. This dark secret is carefully hidden from others. Therefore, chur not a word to anyone.
    So that none of those around you would guess about it, you have to constantly work. But often during work, distracted by all sorts of extraneous things. Read news, view mail, message history. As a result, distracting activities take too much time, and the image suffers. Sometimes, I'm close to being exposed.
    But once I found a method of managing my work time, called “Pomodoro”. And he wrote the application "Timer of the Labor Man." Because I'm an Android Developer!

    So, below under the cut, I will talk about creative throwing, puzzles, and other charms associated with the creative process.

    Part One (brooding)

    Briefly about the Pomodoro system. We will divide all our working time into certain segments of work and rest called “Tomato” (the name comes from the form of the kitchen timer, which was used by the inventor of the method, Francesco Cirillo). The generally accepted ratio of 25 minutes to work and 5 to rest.
    The main idea is that working time (25 minutes) you work / study for real, without being distracted by anything (that's really, really nothing). Then you do what you want for 5 minutes (within the framework of the Criminal Code and public morality).
    Before you begin, you make a list of how many “tomatoes” you want to spend on each task. For example: preparing for the exam - 3 pieces, studying new material - 4, etc.
    From my own experience, I can say that this technique is very effective (naturally, that I would not have advised without having experienced it myself).
    The inventor of the technique used a kitchen timer in the form of a tomato, from where the name actually came from. But to use it in the office, and to frighten colleagues with a strange tick and unexpected calls is not comme il faut. Therefore, before I used a stopwatch on the phone, and notepad. But it was also not convenient.

    In the Android Market, there are a lot of timers working on the tomato technique. I wanted something of my own, warm, and lamp, without additional functions (in the words of my former boss - "Whistles, fakes and candy wrappers"), without advertising and other dubious charms. Plus, I myself wanted to adjust my own time intervals.

    And even there, I wanted to write my own application, as in adults.

    Part two (experimental)

    The first version looked simple and primitive. Timer, button, settings menu. Initial state:

    In progress:

    In the settings menu, you can select the colors of the scale, and the duration of the stages of work / rest.

    The timer was drawn on Canvas.
    But getting rid of the timer, I did not get away from the schedule. Therefore, I decided to make a complete overhaul.

    Part Three (Perestroika)

    So, in the original Pomodoro time management system, the main idea is that you plan ahead how much time you will have to spend on a particular task. Therefore, I decided to add a list of tasks. But people already liked the ability to work in non-stop mode. Therefore, the old functionality had to survive. This is how the main menu now looks now:

    For those who want to work with a regular timer, without troubles with the schedule - I left the classic version, accessible by the button "Work without a list of tasks" (on the initial screen). Immediately choose the time of work / rest and work, as in the first version.

    Also, under the knife went the opportunity to choose colors for the timeline. Instead, several harmonious color schemes were created, and the ability to choose one of them. With the schemes, I had a wild dance with tambourines, successfully resolved (see below for more on this).

    So, if you want to create a new task schedule for the day, then by clicking on the "Create / Download Task List" button , you can plan your work day.
    Button “Add a work cycle” - adds a task divided into several stages. Moreover, each stage includes time for work, and a short break.

    Every four "tomatoes", it is recommended to arrange a long break for half an hour or an hour. Therefore, the “Add Break” button was added .

    Having created your task list, you can correct it and save it.

    So you can create yourself several schedules, for a week at once.

    A long press on the list item allows you to either edit the list of tasks or start working with it. The working screen looks like this:

    Starting to work with the list, at the top you see the name of the current stage, its number and the number of stages for this task. Below is a list of all cycles (in parentheses are the hours of work and rest). The main place is taken by the main timer, as from the first version of the program. If you have completed the task ahead of schedule, you can click on the button “End task ahead of schedule” , and thereby remove it from the list. In case you didn’t meet the schedule, the “Add cycle” button will add another cycle to the task.

    Part Four (near-technical)

    One of the puzzling moments for me was to create single color schemes for the application. I wanted to do everything in the style of Material. But when testing on different devices, jambs climbed. What looked decent on Android 5.x, on the 4.x version looked awful.

    In the end, I came to that decision. Created sets of Material colors:

    Colors.xml file

    And the stylesheet:

    Styles.xml file

    And for each scheme I had to create my own form for the button. For example, for the “Indigo” scheme:

    File button_shape_indigo.xml

    The name of the scheme was set in the settings fragment, and at the start of any activity (in onCreate), I worked out the following code:

    Theme Select Function
     public static void  setNewTheme(Context mContext){
            SharedPreferences sp;
            sp = PreferenceManager.getDefaultSharedPreferences(mContext);
            String colorScheme = sp.getString("colorScheme", "blue");
            else if (colorScheme.equals("green"))
            else if (colorScheme.equals("teal"))
            else if (colorScheme.equals("amber"))
            else if (colorScheme.equals("black"))
            else if (colorScheme.equals("indigo"))
            else if (colorScheme.equals("autumn"))
            else if (colorScheme.equals("orange"))
            else if (colorScheme.equals("red"))

    Part Five (low-profile and a bit scandalous)

    The application was originally written for myself. And therefore, to make any investments in the advertising campaign did not see the point. Just in case, I translated the application into English. And after sitting in a vector editor, for about 15 minutes he pile up the icon and the main picture (the one at the top of the post). I posted the application on There in total about 150 downloads came out.

    Also, I write stories from my life on Picaba. People like it, there are subscribers. Therefore, I posted two posts (about the first and second versions, respectively, sequentially as the versions are released). But unfortunately, a couple of trolls decided to "joke", and set the moderator against the complaint that "they say the application is advertised and is prohibited by the rules." The moderator did not understand the topic of the first version, deleted it, and slammed the ban for two weeks. But, a letter of support solved this problem, and admins unblocked the article. True, the troll did not calm down, and demanded “Ban him for illiterate Russian language and punctuation! ", But grabbing the minuses safely merged. The second post, about the new version, did not try to troll. In general, the audience accepted the application favorably, pointed out several errors (fixed).

    That's actually my whole story of writing an application. Naturally, the application is available for free and without ads. The author does not receive any material benefit, except moral satisfaction (and not much, to satisfy megalomania), and the desire to share a useful tool with the community.
    Then let me take my leave. I hope someone will find this useful. If anyone has any comments or hints, I will listen to them with great pleasure.

    Also popular now: