Skip to content

Instantly share code, notes, and snippets.

View thespianartist's full-sized avatar

Uriel Rodolfo Ramirez Moreno thespianartist

View GitHub Profile

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
@thespianartist
thespianartist / gist:f34ffad3caca97bdeadc
Created June 3, 2015 04:26
How to install developer preview in Nexus 9
./adb reboot bootloader
./fastboot oem unlock
./fastboot flash bootloader bootloader-flounder-3.47.0.0125.img
./fastboot reboot-bootloader
./fastboot flash recovery recovery.img
./fastboot flash boot boot.img
./fastboot flash system system.img
./fastboot flash vendor vendor.img
./fastboot flash cache cache.img
@thespianartist
thespianartist / gist:80d33fd3bda0ebe0a3e1
Created February 18, 2016 00:19
pressure_tutorial_1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PressureJS</title>
</head>
<body>