Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

小龙同学 longkai

🎯
Focusing
View GitHub Profile
@longkai
longkai / SQLUtils.java
Created Jul 30, 2013
dynamically generate select sql like android does.
View SQLUtils.java
/*
* 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 / upload.html
Created Aug 16, 2013
fine uploader with jquery and bootstrap.
View upload.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fine Uploader - jQuery Wrapper Minimal Demo</title>
<link href="http://cdn.staticfile.org/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet"
media="" />
<link href="/resources/libs/fineuploader/3.7.1/fineuploader-3.7.1.min.css" rel="stylesheet">
<style type="text/css">
.span12 {
View StateListDrawableBuilder.java
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 {
View DrawableBuilder.java
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;
@longkai
longkai / ToolbarActivity.java
Created Feb 10, 2015
Base activity you might likely use when you set your theme to ``**NoActionBar**`` but with a content view.
View ToolbarActivity.java
/*
* 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;
@longkai
longkai / EmptyRecyclerView.java
Created Mar 4, 2015
A wrapped {@link android.support.v7.widget.RecyclerView} view with an empty view functionality like {@link android.widget.ListView}
View EmptyRecyclerView.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package com.example.widget;
@longkai
longkai / FloatingLabelLayout.java
Created Mar 27, 2015
A floating label view which shows some labels on top of the first child.
View FloatingLabelLayout.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package com.example.app.layout;
@longkai
longkai / LogoView.java
Created Mar 28, 2015
A logo view with an isosceles triangle. To use it, provide you distinct angle and the largest edge.
View LogoView.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package android.support.widget;
@longkai
longkai / LineThroughTextView.java
Created Mar 28, 2015
A simple line through text view. ie. ----------------- Hello, World --------------
View LineThroughTextView.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package android.support.widget;
@longkai
longkai / QuickReturnRecyclerOnScrollListener.java
Created Apr 23, 2015
A simple RecyclerView scrolling tricks.
View QuickReturnRecyclerOnScrollListener.java
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 longkai
*
* The software shall be used for good, not evil.
*/
package android.support.animation;