<repo_name>jamesanderson9182/StudyBuddy<file_sep>/README.md
# StudyBuddy
>This is an Android App which provides useful tools to students studying. 
>>If you are here to look at code its under app/src/main/java/com/example/janderson/studybuddy/
>>>At the time this was last updated the Timer was the only thing that was started.

 
<file_sep>/app/src/main/java/com/example/janderson/studybuddy/HomeScreenActivity.java
package com.example.janderson.studybuddy;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

/**
 * @author <NAME>
 */
public class HomeScreenActivity extends Activity {
    static Button studyTimerButton;
    static Button fillInBlanksButton;
    static Button examTrackerButton;
    static Button moduleTrackerButton;
    static Button flashCardsButton;
    static LinearLayout linearLayout;

    /**
     * Everything that happens when the activity is created
     * @param savedInstanceState
     * @see Activity
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //set up layout for activity
        this.linearLayout = new LinearLayout(this);
        linearLayout.setOrientation(LinearLayout.VERTICAL);
        setContentView(linearLayout);

        //set up study timer button
        this.studyTimerButton = new Button(this);
        studyTimerButton.setText("Study Timer");
        studyTimerButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //Open the study timer button
                Intent intent = new Intent(getApplicationContext(), StudyTimerActivity.class);
                startActivity(intent);
            }
        });

        //set up fill in the blanks button
        this.fillInBlanksButton = new Button(this);
        fillInBlanksButton.setText("Fill in the Blanks");

        //set up the exam tracker button
        this.examTrackerButton = new Button(this);
        examTrackerButton.setText("Exam Tracker");

        //set up the module tracker button
        this.moduleTrackerButton = new Button(this);
        moduleTrackerButton.setText("Module Tracker");

        //set up the flash cards button
        this.flashCardsButton = new Button(this);
        flashCardsButton.setText("Flash Cards");

        //add everything to the screen
        linearLayout.addView(studyTimerButton);
        linearLayout.addView(fillInBlanksButton);
        linearLayout.addView(examTrackerButton);
        linearLayout.addView(moduleTrackerButton);
        linearLayout.addView(flashCardsButton);
    }
}
