Skip to content

Instantly share code, notes, and snippets.

View zjbpku's full-sized avatar
🚩

Jabin zjbpku

🚩
View GitHub Profile
final class Preconditions {
private Preconditions() {}
/*
* Ensures the truth of an expression involving one or more parameters to the calling method.
*
* @param expression a boolean expression
* @throws IllegalArgumentException if {@code expression} is false
*/
static void checkArgument(boolean expression) {
@zjbpku
zjbpku / gist:5c1c0e9b3a379e41bafc
Created February 20, 2016 12:33
Add goods to shopping cart with animations
public class AddToCartHelper {
@Inject
Context mContext;
/**
* @param v 移动对象
* @param fromXDelta 开始位置X轴偏移
* @param fromYDelta 开始位置Y轴偏移
* @param fx 开始移动时 v 的x坐标
@zjbpku
zjbpku / build.gradle
Created December 17, 2015 16:36
build.gradle configuration
import com.google.gson.Gson
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
def verCode = 5
def verName = "2.0"
def getBuildTime() {