Skip to content

Instantly share code, notes, and snippets.

View valokafor's full-sized avatar

Val Okafor valokafor

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="Martin Bean" />
<title>Twitter&rsquo;s Bootstrap with Ryan Fait&rsquo;s Sticky Footer</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<style>
html, body {
height: 100%;
@valokafor
valokafor / upcoming_bills_row
Created September 18, 2014 21:35
Example of Android Custom List Row
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<RelativeLayout android:id="@+id/rlyTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@valokafor
valokafor / DangerousAppManifest
Created October 24, 2014 19:55
DangerousAppManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="course.labs.dangerousapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="18" />
@valokafor
valokafor / PermissionsLab
Created October 24, 2014 20:14
Permission Lab Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="course.labs.permissionslab"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
@valokafor
valokafor / UpcomingBillAdapter
Created October 30, 2014 12:53
Customer Adapter
package com.valokafor.billduedateazure.Adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
@valokafor
valokafor / UpComingBillsFragment
Created November 8, 2014 07:15
An Android Fragment to display list of upcoming bills
package com.valokafor.billduedateazure.Fragments;
import android.app.AlertDialog;
import android.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
@valokafor
valokafor / TipCalculator.xml
Created February 9, 2015 06:48
Tip Calculator from Dietel How to Program
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/gridLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="2"
android:orientation="horizontal"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
@valokafor
valokafor / ServiceAdapter
Last active August 29, 2015 14:16
Custom Listview Adapter Android
package com.okason.serviceinvoice.Adapters;
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
@valokafor
valokafor / navdraweradapter.java
Created May 31, 2015 01:04
This is the RecycleViewerAdapter for my Material Design Navigation Drawer
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="theme_corner_radius">5dp</dimen>
<dimen name="list_horizontal_margin">0dp</dimen>
<!-- SP adjusts according the users setting, DP is static -->
<dimen name="textsize_xlarge">28dp</dimen>