(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| public Bitmap rotateBitmap(Bitmap original, float degrees) { | |
| int width = original.getWidth(); | |
| int height = original.getHeight(); | |
| Matrix matrix = new Matrix(); | |
| matrix.preRotate(degrees); | |
| Bitmap rotatedBitmap = Bitmap.createBitmap(original, 0, 0, width, height, matrix, true); | |
| Canvas canvas = new Canvas(rotatedBitmap); | |
| canvas.drawBitmap(original, 5.0f, 0.0f, null); |
| # Installation | |
| brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
| # Easy Peasy | |
| ffmpeg -i video.mp4 video.webm |
| import android.app.Activity; | |
| import android.app.Service; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.IntentFilter; | |
| import android.os.Bundle; | |
| import android.os.IBinder; | |
| import android.support.v4.content.LocalBroadcastManager; |
| // http://www.jayway.com/2012/10/04/how-to-make-the-height-of-a-gridview-wrap-its-content/ | |
| public class WrappingGridView extends GridView { | |
| public WrappingGridView(Context context) { | |
| super(context); | |
| } | |
| public WrappingGridView(Context context, AttributeSet attrs) { | |
| super(context, attrs); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| /* | |
| * Copyright (C) 2014 skyfish.jy@gmail.com | |
| * | |
| * 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 |
| /* | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2015 - Nathan Barraille | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| /** | |
| * Utils for I/O operations. | |
| * <p/> | |
| * Created by Tomek on 09/06/15. | |
| */ | |
| public class IoUtils { | |
| /** | |
| * Reads file and returns a String. | |
| * |