- Set compileSdkVersion 17
- Set minSdkVersion 8
- Add these lines in both build.gradle files of your imported modules:
android {
defaultConfig { ... }
sourceSets {
main {
jni.srcDirs = []
}
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| SpannableString styledString | |
| = new SpannableString("Large\n\n" // index 0 - 5 | |
| + "Bold\n\n" // index 7 - 11 | |
| + "Underlined\n\n" // index 13 - 23 | |
| + "Italic\n\n" // index 25 - 31 |
| package com.quangcv.myapplication; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.Matrix; | |
| import android.graphics.Paint; |
| package com.quangcv.myapplication; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.graphics.Canvas; | |
| import android.graphics.Color; | |
| import android.graphics.Paint; | |
| import android.os.Bundle; | |
| import android.util.TypedValue; | |
| import android.view.View; |
| tools: | |
| sudo apt-get install ffmpeg | |
| https://gif.ski/ | |
| commands: | |
| ffmpeg -i video.mp4 frame%04d.png | |
| gifski -o file.gif frame*.png |
| # Fix 2 bugs below | |
| # Bug 1: Could not connect to development server... | |
| # Bug 2: Unable to load script from assets 'index.android.bundle'... | |
| # Ref: https://stackoverflow.com/questions/22475849/node-js-error-enospc/32600959#32600959 | |
| # Open Terminal and run lines below | |
| echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
| react-native start |
| adb shell input keyevent KEYCODE_MENU |
| 1- Create new project: npm init | |
| 2- Install package: npm install package_name | |
| 3- Run app: node js_file_name |
| package catvinhquang.enablegps; | |
| import android.Manifest; | |
| import android.app.Activity; | |
| import android.content.Intent; | |
| import android.content.pm.PackageManager; | |
| import android.location.Location; | |
| import android.os.Bundle; | |
| import android.os.Looper; | |
| import android.support.annotation.NonNull; |
| Index: .gitignore | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- .gitignore (revision 75d782181e1b48b73223892c9b8b4b1cf4c10dfd) | |
| +++ .gitignore (date 1537440316000) | |
| @@ -3,8 +3,6 @@ | |
| build/ | |
| obj/ |
android {
defaultConfig { ... }
sourceSets {
main {
jni.srcDirs = []
}