Skip to content

Instantly share code, notes, and snippets.

View longkai's full-sized avatar
🎯
Focusing

kennylong longkai

🎯
Focusing
View GitHub Profile
@longkai
longkai / SQLUtils.java
Created July 30, 2013 17:11
dynamically generate select sql like android does.
/*
* The MIT License (MIT)
* Copyright (c) 2013 longkai(龙凯)
*/
package cn.newgxu.lab.core.util;
import java.util.Calendar;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@longkai
longkai / LineThroughTextView.java
Created March 28, 2015 09:53
A simple line through text view. ie. ----------------- Hello, World --------------
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package android.support.widget;
@longkai
longkai / LogoView.java
Created March 28, 2015 09:50
A logo view with an isosceles triangle. To use it, provide you distinct angle and the largest edge.
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package android.support.widget;
@longkai
longkai / FloatingLabelLayout.java
Created March 27, 2015 10:26
A floating label view which shows some labels on top of the first child.
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package com.example.app.layout;
@longkai
longkai / ToolbarActivity.java
Created February 10, 2015 15:03
Base activity you might likely use when you set your theme to ``**NoActionBar**`` but with a content view.
/*
* The MIT License (MIT)
* Copyright (c) 2015 longkai
* The software shall be used for good, not evil.
*/
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
package com.imaygou.android.helper.drawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
/**
* Created by longkai on 20/1/15.
*/
public class DrawableBuilder {
private int radius;
package com.imaygou.android.helper.drawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.util.StateSet;
/**
* Created by longkai on 20/1/15.
*/
public class StateListDrawableBuilder {