package com.example.georgekaraolanis.project9_habittracker;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

@@ -73,291 +73,1623 @@
 oid.
-support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle;%0A%0Apublic class MainActivity extends AppCompatActivity %7B%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main);%0A    %7D
+content.ContentValues;%0Aimport android.database.sqlite.SQLiteDatabase;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle;%0Aimport android.util.Log;%0A%0Aimport com.example.georgekaraolanis.project9_habittracker.data.HabitContract;%0Aimport com.example.georgekaraolanis.project9_habittracker.data.HabitDbHelper;%0A%0Apublic class MainActivity extends AppCompatActivity %7B%0A%0A    /*Tag for logging*/%0A    private static final String LOG_TAG = MainActivity.class.getSimpleName();%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_main);%0A    %7D%0A%0A    /*Insert a habit into the database*/%0A    private void insertHabit(String name,String time, int category)%7B%0A%0A        /*Create helper*/%0A        HabitDbHelper helper = new HabitDbHelper(this);%0A%0A        /*Get database in write mode*/%0A        SQLiteDatabase db = helper.getWritableDatabase();%0A%0A        /*Get ContentValues item*/%0A        ContentValues values = new ContentValues();%0A%0A        /*Put in values*/%0A        values.put(HabitContract.HabitEntry.COLUMN_HABIT_NAME,name);%0A        values.put(HabitContract.HabitEntry.COLUMN_HABIT_TIME,time);%0A        values.put(HabitContract.HabitEntry.COLUMN_HABIT_CATEGORY,category);%0A%0A        /*Insert into database*/%0A        long newRowId = db.insert(HabitContract.HabitEntry.TABLE_NAME,null,values);%0A%0A        /*Check result*/%0A        if (newRowId == -1 )%7B%0A            Log.d(LOG_TAG,%22Error inserting value into database%22);%0A        %7D%0A        else%7B%0A            Log.d(LOG_TAG,%22Value inserted successfully%22);%0A        %7D%0A%0A    %7D%0A
 %0A%7D%0A

Add method to insert data into database