Skip to content

Instantly share code, notes, and snippets.

View valokafor's full-sized avatar

Val Okafor valokafor

View GitHub Profile
package okason.com.attendanceapp.Activities;
import android.content.Intent;
import android.support.v4.app.Fragment;
import android.support.v4.widget.DrawerLayout;
import android.os.Bundle;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
@valokafor
valokafor / DummyData.java
Created June 9, 2015 04:10
Attendance App Demo List
private void addTestEvents(){
Event event1 = new Event();
Calendar cal1 = Calendar.getInstance();
cal1.add(Calendar.MONTH, 1);
event1.setName("Home Coming Party");
event1.setEventDate(cal1.getTimeInMillis());
event1.setVenue("500 West Broadway");
event1.setCity("San Diego");
event1.setEventPicturePath("http://upload.wikimedia.org/wikipedia/commons/e/ea/San_Diego_bay_2.jpg");
import java.util.Calendar;
/**
* Created by Valentine on 8/22/2015.
*/
public class Product {
private long id;
private String productName;
private String description;
private double price;
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@valokafor
valokafor / SampleDataBlog.java
Created September 29, 2015 22:38
Sample data for blog post tutorial
package com.okason.simplenotepad.utilities;
import com.okason.simplenotepad.models.Note;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.List;
/**
@valokafor
valokafor / SampleData.java
Last active October 19, 2015 06:09
This is a sample data generator for my Recycler View Drag and Drop tutorial on my blog ValOkafor.com
package com.okason.draganddrop.utilities;
import com.okason.draganddrop.Customer;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Valentine on 10/18/2015.
*/
In this blog post, I will show you how to create Android drawing app. This blog post is part one of a two part tutorial series where I will show you how to create simple but delightful Android drawing app. As the name indicates this drawing app will enable users to draw or sketch on their Android devices using their fingers. You can get the source code for this tutorial from here. The core features of this app will include:
Draw - Users will be able to draw on a blank canvas (whiteboard) .
Erase - Users will be able to erase what has been drawn.
Undo - Users will be able to undo and redo drawing paths.
Color - Users will be able to draw using a color of their choice from at least these colors: black, dark gray, light gray, blue, red, and green, orange, yellow .
Share - Users will be able to capture a screen shot and email it to a friend.
[thrive_headline_focus title="Create New Project" orientation="left"
Step 1: Create New Project - create a brand new Android Studio project, select the default minimum AP
@valokafor
valokafor / Pronto_Note_Privacy.html
Last active March 15, 2017 20:40 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>Okason Software built the Pronto Note app as a free, freemium and ad-supported commercial app. This APP is provided by Okason Software and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding our policies with the collection, use, and
disclosure of Personal Information if anyone decided to use our app.</p>
<p>If you choose to use our app, then you agree to the collection and use of information in
relation with this policy. The Personal Information that we collect are used for providing and
improving the app. We will not use or share your information with anyone except as described
<html>
<body>
<h2>Privacy Policy</h2>
<p>Okason Software built the Pronto Invoice app as a free, freemium and ad-supported commercial app. This App is provided by Okason Software and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding our policies with the collection, use, and
disclosure of Personal Information if anyone decided to use our app.</p>
<p>If you choose to use our app, then you agree to the collection and use of information in
relation with this policy. The Personal Information that we collect are used for providing and
improving the app. We will not use or share your information with anyone except as described
<script>
function show() {
if(document.getElementById('benefits').style.display=='none') {
document.getElementById('benefits').style.display='block';
}
return false;
}
function hide() {
if(document.getElementById('benefits').style.display=='block') {
document.getElementById('benefits').style.display='none';