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:
package com.atami.mgodroid.util; | |
import java.util.LinkedList; | |
import android.app.IntentService; | |
import android.content.Intent; | |
/** | |
* An extension of the IntentService class that will block |
import android.view.View; | |
import android.view.ViewGroup.MarginLayoutParams; | |
/** | |
* Allows an ObjectAnimator to set/get margins of a view | |
*/ | |
class MarginProxy { | |
private View mView; | |
public MarginProxy(View view) { |
# -*- coding: utf-8 -*- | |
""" | |
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html | |
Author: Ola Sitarska <ola@sitarska.com> | |
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html) | |
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/ | |
""" |
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.graphics.Shader; | |
// enables hardware accelerated rounded corners | |
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/ |
public int getDisplayContentHeight() { | |
final WindowManager windowManager = getWindowManager(); | |
final Point size = new Point(); | |
int screenHeight = 0, actionBarHeight = 0; | |
if (getActionBar() != null) { | |
actionBarHeight = getActionBar().getHeight(); | |
} | |
int contentTop = ((ViewGroup) findViewById(android.R.id.content)).getTop(); | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { | |
windowManager.getDefaultDisplay().getSize(size); |
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
extension Array { | |
func first() -> Element? { | |
if isEmpty { | |
return nil | |
} | |
return self[0] | |
} | |
func last() -> Element? { |