Flip an image
(╯°□°)╯︵ ┻━┻
Take 6 lines of Java and make it a library
ImageFlipper
lets you flip images horizontally or vertically.
Why would you use this though !?!?!
In your app's build.gradle
dependencies {
compile 'com.github.flipzeus:flipzeus:0.0.1'
}
Hahaha
To flip vertically
ImageView mImageView = (ImageView) findViewById(R.id.imageView);
ImageFlipper.flip(mImageView, FlipDirection.VERTICAL);
To flip horizontally
ImageView mImageView = (ImageView) findViewById(R.id.imageView);
ImageFlipper.flip(mImageView, FlipDirection.HORIZONTAL);
You can also pass Drawable
s or even Bitmap
s directly.