Skip to content

Instantly share code, notes, and snippets.

@cbeyls
cbeyls / SimpleCursorLoader.java
Last active Jan 26, 2018
A CursorLoader to implement simple monitorable database queries without a ContentProvider.
View SimpleCursorLoader.java
package be.digitalia.fosdem.loaders;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;
/**
* A CursorLoader that doesn't need a ContentProvider.
*
* @author Christophe Beyls
@cbeyls
cbeyls / PreferenceFragment.java
Last active May 4, 2020
A PreferenceFragment for the Android support library. Based on the platform's code with some removed features and a basic ListView layout.It uses reflection but works with every device I've tested so far.
View PreferenceFragment.java
package android.support.v4.preference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
@ffub
ffub / gist:1084424
Created Jul 15, 2011
Balsamiq HTML export
View gist:1084424
#!/usr/bin/php
<?php
error_reporting(E_ALL);
if (count($argv) <= 1) {
print("usage createMockup src_dir dst_dir images_dir\n");
print("\tsrc_dir : dir where all bmml file are\n");
print("\tdst_dir : dir where write all html files\n");
print("\timages_dir : dir where all export mockup png are (will be copied to the \$dst_dir/images directory)\n");
exit(1);
}
You can’t perform that action at this time.