Skip to content

Instantly share code, notes, and snippets.

View andrewmarmion's full-sized avatar

Andrew Marmion andrewmarmion

  • Scotland, UK
  • 08:37 (UTC +01:00)
View GitHub Profile
@andrewmarmion
andrewmarmion / ItemClickSupport.java
Created February 5, 2017 21:19 — forked from nesquena/ItemClickSupport.java
Click handling for RecyclerView
/*
Source: http://www.littlerobots.nl/blog/Handle-Android-RecyclerView-Clicks/
USAGE:
ItemClickSupport.addTo(mRecyclerView).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
@Override
public void onItemClicked(RecyclerView recyclerView, int position, View v) {
// do it
}
});
@andrewmarmion
andrewmarmion / renameAndroid.py
Last active January 31, 2017 21:02
Sketch Export for Android
'''
A cheeky little python script that renames and correctly
puts exported image assets from Sketch into the correct
drawable folders for Android.
Images sizes supported 1x, 2x, 3x, 4x, 0.5x, 1.5x
The code is pretty simple so if you want to add support for
other sizes, it is easy to do.
To use: