Skip to content

Instantly share code, notes, and snippets.

View grantland's full-sized avatar

Grantland Chew grantland

View GitHub Profile
import android.annotation.TargetApi;
import android.os.Build;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* Created by Grantland Chew on 11/14/13.
@grantland
grantland / gist:5464067
Last active September 26, 2017 15:49
Enabling Auto-Rotate Quick Settings Toggle on Phones
@grantland
grantland / gist:1096474
Created July 21, 2011 04:09
Android Activity Lifecycle
[...] = starting state
States:
not running (dead)
onResume (running)
onStop (minimized)
onPause (screen off)
Launch Application:
@grantland
grantland / sleephack.cpp
Created October 2, 2015 07:07 — forked from Jakz/sleephack.cpp
GBA Sleep Hack
#include <cstdio>
#include <cassert>
#include <stdint.h>
#include <vector>
#include <string>
#include <iostream>
#include <iomanip>
using namespace std;
@grantland
grantland / AGB-001_Light_Mod.md
Last active January 25, 2023 15:12
AGB-001 Front/Backlight Mod Instructions

AGB-001 Front/Backlight Mod Instructions

AGB-001 Backlight Mod

Requirements

  • AGB-001
  • ASS101 screen
@grantland
grantland / post.md
Last active February 9, 2023 05:09
RecyclerView item onClick

RecyclerView item onClick

RecyclerView does not have an OnItemClickListener like it's predecessor, ListView. However, detecting item clicks is pretty simple.

Set an OnClickListener in your ViewHolder creation:

private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder>  {

    public static class ViewHolder extends RecyclerView.ViewHolder
@grantland
grantland / README.md
Last active January 25, 2024 23:09
NextBus API