Skip to content

Instantly share code, notes, and snippets.

@jt535
jt535 / StickyHeaderItemDecorator.java
Last active April 16, 2017 04:49
A Recycler View Item Decorator that adds sticky headers.
import android.graphics.Canvas;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public abstract class StickHeaderItemDecorator extends RecyclerView.ItemDecoration {
/* Make your view holder implement this interface */
public interface HeaderRelationship {
/* Return true if this object is located directly after a header */
@jt535
jt535 / HideableToolbarItem.cs
Last active July 18, 2017 09:00
a hideable toolbar item for xamarin forms apps
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace MyXamarinForms.CustomControls
{
/// <summary>
/// This is a hideable toolbar item for xaml views. It operates by setting the
/// text for the toolbar item to "" when it is invisible and removing the
/// command so that it can't be clicked on.
@jt535
jt535 / mergegenstrings.py
Created June 27, 2018 05:08 — forked from yoichitgy/mergegenstrings.py
A script to generate .strings file for .swift, .m, .storyboard and .xib files by genstrings and ibtool commands, and merge them with existing translations.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Localize.py - Incremental localization on XCode projects
# João Moreno 2009
# http://joaomoreno.com/
# Modified by Steve Streeting 2010 http://www.stevestreeting.com
# Changes
# - Use .strings files encoded as UTF-8