This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
/** | |
* input must be create by /bin/crunk | |
*/ | |
public static Drawable getNinePatchDrawable(Context context, InputStream input) { | |
Bitmap ninePathBmp = null; | |
ninePathBmp = BitmapFactory.decodeStream(input); | |
if (ninePathBmp == null) { | |
return null; | |
} | |
byte[] chunk = ninePathBmp.getNinePatchChunk(); |
private long getTableRowCount(String tableName) { | |
String sql = "select count(*) from " + tableName; | |
SQLiteStatement statement = db.compileStatement(sql); | |
return statement.simpleQueryForLong(); | |
} |
import com.google.gson.Gson; | |
import com.google.gson.JsonSyntaxException; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.Response.ErrorListener; | |
import com.android.volley.Response.Listener; |
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example:
You can use this class to realize a simple sectioned grid RecyclerView.Adapter
without changing your code.
The RecyclerView
has to use a GridLayoutManager
.
This is a porting of the class SimpleSectionedListAdapter
provided by Google
If you are looking for a sectioned list RecyclerView.Adapter
you can take a look here
signingConfigs { | |
debug { | |
// No debug config | |
} | |
release { | |
def filePrivateProperties = file("../releaseSigningConfig.properties") | |
if (filePrivateProperties.exists()) { | |
Properties propsPrivate = new Properties() | |
propsPrivate.load(new FileInputStream(filePrivateProperties)) |
# Theme itg.flat config | |
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - itg.flat/itg.dark.tmTheme", | |
"font_size": 16, | |
"ignored_packages": | |
[ | |
"Markdown", |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>锚链接平滑滚动</title> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<style type="text/css"> | |
* { |
package com.example.hellojni; | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.List; | |
/** | |
* ShellUtils |