Skip to content

Instantly share code, notes, and snippets.

@aszlig
aszlig / gist:2234137
Created March 29, 2012 06:27
More compact base builder strings
// all buildings with weights,
// be sure to use your own datatypes.
var BUILDINGS = [
[40, 'No Building'],
[ 6, 'Harvester Tiberium'],
[ 6, 'Harvester Crystal'],
[ 6, 'Power Plant'],
[ 1, 'Tiberium'],
[ 1, 'Crystal'],
[ 3, 'Silo'],
@cbeyls
cbeyls / MultiChoiceHelper.java
Last active October 28, 2024 18:23
Helper class to reproduce ListView's modal MultiChoice mode with a RecyclerView. Compatible with API 7+.
package be.digitalia.common.widgets;
import android.content.Context;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.v4.util.LongSparseArray;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.view.ActionMode;