├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── drawable │ │ │ │ ├── ic_back_file_selector.xml │ │ │ │ ├── ic_txt_file_selector.xml │ │ │ │ ├── ic_movie_file_selector.xml │ │ │ │ ├── ic_photo_file_selector.xml │ │ │ │ ├── ic_folder_open_file_selector.xml │ │ │ │ ├── ic_compro_file_selector.xml │ │ │ │ ├── ic_music_file_selector.xml │ │ │ │ └── ic_other_file_selector.xml │ │ │ └── layout │ │ │ │ ├── file_selector_dialog_item.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── gson8 │ │ │ │ └── myscreenshot │ │ │ │ ├── fileselector │ │ │ │ ├── utils │ │ │ │ │ ├── FileSelectorConfig.java │ │ │ │ │ ├── FileCompare.java │ │ │ │ │ ├── FileType.java │ │ │ │ │ ├── FileFilter.java │ │ │ │ │ └── FileUtils.java │ │ │ │ ├── config │ │ │ │ │ └── FileConfig.java │ │ │ │ └── dialog │ │ │ │ │ └── FileDialog.java │ │ │ │ ├── video │ │ │ │ ├── DpiBean.java │ │ │ │ ├── SpinnerAdapter.java │ │ │ │ └── MyShoter.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── gson8 │ │ │ └── myscreenshot │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── gson8 │ │ └── myscreenshot │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── my ├── app.apk └── art.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── README.md ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /my/app.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/my/app.apk -------------------------------------------------------------------------------- /my/art.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/my/art.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MyScreenShot 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/syusuke/MyScreenShot/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .idea/ 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/gson8/myscreenshot/fileselector/utils/FileSelectorConfig.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot.fileselector.utils; 2 | 3 | 4 | public class FileSelectorConfig 5 | { 6 | public static final String NAME = "name"; 7 | public static final String ICON = "icon"; 8 | public static final String PATH = "path"; 9 | public static final String TYPE = "type"; 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/com/gson8/myscreenshot/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_back_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/gson8/myscreenshot/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_txt_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_movie_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_photo_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_folder_open_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_compro_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_music_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/gson8/myscreenshot/fileselector/utils/FileCompare.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot.fileselector.utils; 2 | 3 | import java.util.Comparator; 4 | import java.util.HashMap; 5 | 6 | /** 7 | * 文件比较的类 8 | */ 9 | public class FileCompare implements Comparator> 10 | { 11 | @Override 12 | public int compare(HashMap lhs, HashMap rhs) 13 | { 14 | String n1 = (String)lhs.get(FileSelectorConfig.NAME); 15 | String n2 = (String)rhs.get(FileSelectorConfig.NAME); 16 | return n1.toUpperCase().compareTo(n2.toUpperCase()); 17 | } 18 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_other_file_selector.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in F:\AndroidSDK/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.3" 6 | 7 | defaultConfig { 8 | applicationId "com.gson8.myscreenshot" 9 | minSdkVersion 19 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | testCompile 'junit:junit:4.12' 25 | compile 'com.android.support:appcompat-v7:23.4.0' 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/gson8/myscreenshot/fileselector/utils/FileType.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot.fileselector.utils; 2 | 3 | 4 | public class FileType { 5 | public static final int AUDIO = 1; 6 | public static final int VIDEO = 2; 7 | public static final int IMAGE = 3; 8 | public static final int TEX = 4; 9 | public static final int OTHER = 5; 10 | public static final int FOLDER = 10; 11 | public static final int COMPRESSION = 14; //压缩文件 12 | 13 | public static final int FILE = 20; 14 | 15 | public static final int All = 100; 16 | 17 | 18 | public static final int UPTO = 30; 19 | 20 | public static final int selected = 10086; 21 | public static final int unselect = 10010; 22 | public static final int forbid = 10000; 23 | } 24 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/gson8/myscreenshot/video/DpiBean.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot.video; 2 | 3 | /* 4 | * ScreenShot making by Syusuke/琴声悠扬 on 2016/5/31 5 | * E-Mail: Zyj7810@126.com 6 | * Package: gson8.com.vedioshot.bean.DpiBean 7 | * Description: null 8 | */ 9 | 10 | public class DpiBean { 11 | private int width; 12 | private int height; 13 | 14 | public DpiBean(int width, int height) { 15 | this.width = width; 16 | this.height = height; 17 | } 18 | 19 | public int getWidth() { 20 | return width; 21 | } 22 | 23 | public void setWidth(int width) { 24 | this.width = width; 25 | } 26 | 27 | public int getHeight() { 28 | return height; 29 | } 30 | 31 | public void setHeight(int height) { 32 | this.height = height; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return width + "x" + height; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/file_selector_dialog_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/gson8/myscreenshot/fileselector/config/FileConfig.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot.fileselector.config; 2 | 3 | 4 | import android.os.Environment; 5 | 6 | import com.gson8.myscreenshot.fileselector.utils.FileFilter; 7 | 8 | public class FileConfig { 9 | //public static final String FILE_CONFIG = "fileConfig"; 10 | 11 | public static boolean showHiddenFiles = false; 12 | public static int filterModel = FileFilter.FILTER_NONE; //过滤文件 13 | public static String[] filter; 14 | public static boolean positiveFiter = true; 15 | //文件选择可以访问的最高路径,默认为"/" 16 | public static String rootPath = "/"; 17 | //文件选择器的开始的路径,默认为"/" 18 | // public static String startPath = "/"; 19 | public static String startPath = Environment.getExternalStorageDirectory() + ""; 20 | 21 | //public static int selectType = FileType.All; //选择文件的种类:文件夹、文件、全部 22 | 23 | 24 | //public static final String SELECT = "select"; 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Android >= 5.0(4.4 root ) 2 | 3 | ## 屏幕录制视频 4 | 5 | ```java 6 | //in onCreate 7 | mMediaProjectionManager = 8 | (MediaProjectionManager) getSystemService(MEDIA_PROJECTION_SERVICE); 9 | 10 | 11 | //开始截图,这里系统会弹出权限确认窗口 12 | Intent captureIntent = mMediaProjectionManager.createScreenCaptureIntent(); 13 | startActivityForResult(captureIntent, REQUEST_CODE); 14 | 15 | // 16 | @Override 17 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 18 | if(requestCode == REQUEST_CODE) { 19 | startShotNow(resultCode, data); 20 | } 21 | } 22 | 23 | 24 | 25 | mMediaProjection = 26 | mMediaProjectionManager.getMediaProjection(resultCode, data); 27 | 28 | if(mMediaProjection == null) { 29 | Log.e(TAG, "MediaProjection is null"); 30 | return; 31 | } 32 | 33 | mFile = new File(getRandomFileName()); 34 | 35 | Log.e(TAG, "startShotNow: " + mDpiSizeBean.getHeight() + " " + mBitRate + " " + mFps); 36 | 37 | 38 | mShoter = new MyShoter(mDpiSizeBean.getWidth(), mDpiSizeBean.getHeight(), mBitRate, 1, 39 | mFps, mMediaProjection, mFile.getAbsolutePath()); 40 | 41 | new Thread(mShoter).start(); 42 | mBtnShotStart.setText("停止录制"); 43 | 44 | moveTaskToBack(true); 45 | 46 | ``` 47 | 48 | ## [APK DEMO](my/app.apk) 49 | 50 | ![](my/art.png) -------------------------------------------------------------------------------- /app/src/main/java/com/gson8/myscreenshot/video/SpinnerAdapter.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot.video; 2 | 3 | /* 4 | * ScreenShot making by Syusuke/琴声悠扬 on 2016/6/2 5 | * E-Mail: Zyj7810@126.com 6 | * Package: gson8.com.vedioshot.adapter.SpinnerAdapter 7 | * Description: null 8 | */ 9 | 10 | import android.content.Context; 11 | import android.view.LayoutInflater; 12 | import android.view.View; 13 | import android.view.ViewGroup; 14 | import android.widget.BaseAdapter; 15 | import android.widget.TextView; 16 | 17 | public class SpinnerAdapter extends BaseAdapter { 18 | 19 | private Object[] obj; 20 | private Context mContext; 21 | 22 | public SpinnerAdapter(Context contexts, Object[] objects) { 23 | this.mContext = contexts; 24 | this.obj = objects; 25 | } 26 | 27 | 28 | @Override 29 | public int getCount() { 30 | return obj.length; 31 | } 32 | 33 | @Override 34 | public Object getItem(int position) { 35 | return obj[position]; 36 | } 37 | 38 | @Override 39 | public long getItemId(int position) { 40 | return position; 41 | } 42 | 43 | @Override 44 | public View getView(int position, View convertView, ViewGroup parent) { 45 | 46 | ViewHolder holder; 47 | if(convertView == null) { 48 | convertView = LayoutInflater.from(mContext) 49 | .inflate(android.R.layout.simple_list_item_1, parent, false); 50 | holder = new ViewHolder(); 51 | holder.tv = (TextView) convertView.findViewById(android.R.id.text1); 52 | convertView.setTag(holder); 53 | } else { 54 | holder = (ViewHolder) convertView.getTag(); 55 | } 56 | 57 | holder.tv.setText(obj[position].toString()); 58 | 59 | return convertView; 60 | } 61 | 62 | 63 | class ViewHolder { 64 | TextView tv; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/gson8/myscreenshot/fileselector/utils/FileFilter.java: -------------------------------------------------------------------------------- 1 | package com.gson8.myscreenshot.fileselector.utils; 2 | 3 | 4 | import com.gson8.myscreenshot.fileselector.config.FileConfig; 5 | 6 | import java.io.Serializable; 7 | 8 | public class FileFilter implements Serializable { 9 | public static final int FILTER_IMAGE = 1; 10 | public static final int FILTER_TXT = 2; 11 | public static final int FILTER_AUDIO = 3; 12 | public static final int FILTER_VIDEO = 4; 13 | public static final int FILTER_CUSTOM = 10; 14 | public static final int FILTER_COMPROSSION = 16; 15 | public static final int FILTER_NONE = -1; 16 | 17 | public static final String[] IMAGE_FILTER = new String[]{"png", "jpg", "bmp", "gif"}; 18 | 19 | public static final String[] TXT_FILTER = new String[]{"txt", "c", "cpp", "java", "xml"}; 20 | 21 | public static final String[] AUDIO_FILTER = 22 | new String[]{"mp3", "m4a", "ogg", "flac", "ape", "aac"}; 23 | 24 | public static final String[] VIDEO_FILTER = new String[]{"mp4", "avi", "flv", "rmvb", "mkv"}; 25 | 26 | public static final String[] ZIP_FILTER = new String[]{"zip"}; 27 | 28 | public static final String[] RAR_FILTER = new String[]{"rar"}; 29 | 30 | /** 31 | * 过滤处理 32 | * 33 | * @param lastName 文件后缀名 34 | * @return 匹配成功:true 35 | */ 36 | public static boolean doFilter(String lastName) { 37 | if(lastName == null) 38 | return false; 39 | 40 | int model = FileConfig.filterModel; 41 | String[] filter = null; 42 | switch(model) { 43 | case FILTER_AUDIO: 44 | filter = AUDIO_FILTER; 45 | break; 46 | case FILTER_IMAGE: 47 | filter = IMAGE_FILTER; 48 | break; 49 | case FILTER_TXT: 50 | filter = TXT_FILTER; 51 | break; 52 | case FILTER_VIDEO: 53 | filter = VIDEO_FILTER; 54 | break; 55 | case FILTER_COMPROSSION: 56 | filter = ZIP_FILTER; 57 | break; 58 | default: 59 | filter = FileConfig.filter; 60 | break; 61 | } 62 | 63 | for(String f : filter) { 64 | if(f.equals(lastName)) 65 | return true; 66 | } 67 | 68 | return false; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 18 | 22 | 23 | 30 | 31 | 39 | 40 | 41 | 45 | 46 | 53 | 54 | 62 | 63 | 64 | 65 | 69 | 70 | 77 | 78 | 86 | 87 | 88 | 89 | 95 | 96 |