Source: StackOverflow, TechBlogon
Question: How to rotate screen orientation on button click?
Answer:
In VideoActivity:
mFullscreen.setOnClickListener(new View.OnClickListener() {
Source: StackOverflow, TechBlogon
Question: How to rotate screen orientation on button click?
Answer:
In VideoActivity:
mFullscreen.setOnClickListener(new View.OnClickListener() {
Source: StackOverflow
Question: How to fade in and out an ImageView
on touch event?
Answer:
yourImgView.setOnTouchListener(new MyOnTouchListener());
Source: StackOverflow, StackOverflow
Question: How to draw a transparent cirlcle in xml?
Answer:
Create a cirlce.xml in drawable folder with this:
Question: How to import cwac-cam2 as external library into Android Studio?
Answer: example using cwac-cam2-0.5.11
Download cwac-cam2-0.5.11 from GitHub release.
In Android Studio New -> Import Module -> Source Directory
.
Choose cam2 folder in cwac-cam2-0.5.11.
General Info Useful Commands FFmpeg Docs
1. -y
: Overwrite output files without asking.
Source: StackOverflow, StackOverflow
Answer:
Uri
to Bitmap
:Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), imageUri);
Uri
:Source: Android Native Development Kit Cookbook, Blog, Roman10, Ph0b
Question: How to FUCKING build and use FFmpeg with Android Studio!!!
Answer: For FFMPEG v3.0.2 and NDK r11
Install Linux Mint in VirtualBox (building on Windows is a NIGHTMARE, don't even try)
Download and Install Android NDK (v11) <- Add link to setup NDK gist
Source: ph0b, froger, gitHub, sitePoint, []
Question: How to add NDK support to current project without upgrading current very complexed build.gradle
?
Answer: Mixing both stable and experimental gradle plugin
app -> F4 -> SDK Location -> Android NDK location
Soure: GitHub
Question: How to fucking build FFmpeg using VPlayer?
Answer: For FFMPEG v3.0.2 and NDK r11c
Install Ubuntu (16.04) in VirtualBox (building on Windows is a NIGHTMARE, don't even try)
Download and uncompress Android NDK (v11c) to a folder in your home directory (/home/viet/Android
in my case or ~/
)
Since the ffmpeg (v2.6) coming with VPlayer has an annoying text relocation issue, we will build ffmpeg from scratch (FFMPEG v3.0.2 and NDK r11c).