トリック
アプリ
■特徴
・このアプリを使って6秒動画を撮影できる
・撮影画面をタップしている間だけ撮影可能
・6秒以内なら何度も撮影可能
・前回タップして撮影下部分がうっすら見えた状態で次のシーンを撮影できる
・保存してある動画を組み込み可能
・撮影した部分をカット可能
・撮影した動画はVineに投稿可能
サイト
■Vine
興味があればこちらもご利用ください。
public class GifImageView extends ImageView
{
private Movie mMovie;
private long mMoviestart;
public GifImageView(Context context, InputStream stream) {
super(context);
mMovie = Movie.decodeStream(stream);
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawColor(Color.TRANSPARENT);
super.onDraw(canvas);
final long now = SystemClock.uptimeMillis();
if (mMoviestart == 0) {
mMoviestart = now;
}
final int relTime = (int)((now - mMoviestart) % mMovie.duration());
mMovie.setTime(relTime);
mMovie.draw(canvas, 10, 10);
this.invalidate();
}
}
abs__ic_menu_moreoverflow_normal_holo_light → abc_ic_menu_moreoverflow_normal_holo_light
/*******************************************
* パスを描画
*
* @param [OUT] Canvas Canvasクラス
* @param [IN.] Path ペンの軌道
* @param [IN.] Color ペンの色
* @param [IN.] int ペンの太さ
* @return none
*******************************************/
private void DrawPath(Canvas csCanvas, Path DrawPath, Color DrawColor, int nDrawStrokeWidth)
{
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(DrawColor);
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(nDrawStrokeWidth);
paint.setStrokeCap(Paint.Cap.ROUND);
paint.setStrokeJoin(Paint.Join.ROUND);
// 描画中のパスを描画
if(null != m_csDrawPath){
csCanvas.drawPath(DrawPath, paint);
}
}
| プラットフォーム | APIレベル | コードネーム | 公開日 |
|---|---|---|---|
| Android 1.0 | 1 | Base | 2008/09/23 |
| Android 1.1 | 2 | Base 1_1 | 2009/02/09 |
| Android 1.5 | 3 | Cupcake | 2009/04/30 |
| Android 1.6 | 4 | Donut | 2009/09/15 |
| Android 2.0 | 5 | Eclair | 2009/10/26 |
| Android 2.0.1 | 6 | Eclair 0_1 | 2009/12/03 |
| Android 2.1.x | 7 | Eclair MR1 | 2010/01/12 |
| Android 2.2.x | 8 | Froyo | 2010/05/20 |
| Android 2.3 | 9 | Gingerbread | 2010/12/06 |
| Android 2.3.1 | |||
| Android 2.3.2 | |||
| Android 2.3.3 | 10 | Gingerbread MR1 | 2011/02/09 |
| Android 2.3.4 | |||
| Android 3.0.x | 11 | Honeycomb | 2011/02/22 |
| Android 3.1.x | 12 | Honeycomb MR1 | 2011/05/10 |
| Android 3.2 | 13 | Honeycomb MR2 | 2011/07/15 |
| Android 4.0 | 14 | Ice Cream Sandwich | 2011/10/19 |
| Android 4.0.1 | |||
| Android 4.0.2 | |||
| Android 4.0.3 | 15 | Ice Cream Sandwich MR1 | 2011/12/16 |
| Android 4.1 | 16 | Jelly Bean | 2012/07/09 |
| Android 4.1.1 | |||
| Android 4.2 | 17 | Jelly Bean MR1 | 2012/12/13 |
| Android 4.2.2 | |||
| Android 4.3 | 18 | Jelly Bean MR2 | 2013/07/24 |
| Android 4.4 | 19 | Kitkat | 2013/11/03 |
| Android 5.0 | 21 | Kitkat | 2014/11/12 |
public void DrawBackground001(Canvas csCanvas)
{
Paint csPaint = new Paint();
RectF sOval = new RectF();
for(int x=0; x<=320; x+=10)
{
for(int y=0; y<=320; y+=10)
{
csPaint.setAntiAlias(true);
csPaint.setARGB(255,x*255/320,y*255/320,(int)Math.log(x*y));
sOval.set(x, y, x+10, y+10);
csCanvas.drawOval(sOval, csPaint);
}
}
}
■Android開発環境の構築 Eclipse編
⇒ http://izeef.web.fc2.com/develop/android/env_eclipse.html