Skip to content

Instantly share code, notes, and snippets.

View valokafor's full-sized avatar

Val Okafor valokafor

View GitHub Profile
@valokafor
valokafor / TvInputApp.java
Created September 6, 2017 18:07
Log messages when launching live tv
09-06 11:04:54.074 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
09-06 11:04:54.075 20501-22423/com.example.android.sampletvinput E/gralloc: unregister FBM buffer
@valokafor
valokafor / AuthUiActivity.java
Created August 17, 2017 16:30
AuthUI Activity
package com.okason.diary.ui.auth;
public class AuthUiActivity extends AppCompatActivity {
private static final String GOOGLE_TOS_URL = "https://www.google.com/policies/terms/";
private static final int RC_SIGN_IN = 100;
private Activity mActivity;
private MaterialDialog progressDialog;
private boolean shouldShowDialog = false;
<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';
<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
@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
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 / 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.
*/
@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;
/**
<?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
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;