├── .gradle
├── 5.4.1
│ ├── executionHistory
│ │ ├── executionHistory.bin
│ │ └── executionHistory.lock
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileContent
│ │ └── fileContent.lock
│ ├── fileHashes
│ │ ├── fileHashes.bin
│ │ ├── fileHashes.lock
│ │ └── resourceHashesCache.bin
│ ├── gc.properties
│ └── javaCompile
│ │ ├── javaCompile.lock
│ │ └── taskHistory.bin
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ ├── cache.properties
│ └── outputFiles.bin
└── vcs-1
│ └── gc.properties
├── .idea
├── .name
├── caches
│ ├── build_file_checksums.ser
│ └── gradle_models.ser
├── codeStyles
│ └── Project.xml
├── gradle.xml
├── libraries
│ ├── Gradle__androidx_annotation_annotation_1_0_0_jar.xml
│ ├── Gradle__androidx_appcompat_appcompat_1_0_2_aar.xml
│ ├── Gradle__androidx_arch_core_core_common_2_0_0_jar.xml
│ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml
│ ├── Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml
│ ├── Gradle__androidx_collection_collection_1_0_0_jar.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml
│ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_core_core_1_0_1_aar.xml
│ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml
│ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml
│ ├── Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml
│ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_fragment_fragment_1_0_0_aar.xml
│ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml
│ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml
│ ├── Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml
│ ├── Gradle__androidx_print_print_1_0_0_aar.xml
│ ├── Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml
│ ├── Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_test_core_1_1_0_aar.xml
│ ├── Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml
│ ├── Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml
│ ├── Gradle__androidx_test_ext_junit_1_1_0_aar.xml
│ ├── Gradle__androidx_test_monitor_1_1_1_aar.xml
│ ├── Gradle__androidx_test_runner_1_1_1_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_1_0_1_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml
│ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml
│ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml
│ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
│ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml
│ ├── Gradle__javax_inject_javax_inject_1_jar.xml
│ ├── Gradle__junit_junit_4_12_jar.xml
│ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
│ └── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
├── vcs.xml
└── workspace.xml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── tracelinedemo
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── ReversingTrackLine
│ │ │ ├── MainActivity.java
│ │ │ └── Utils.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── tracelinedemo
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── settings.gradle
/.gradle/5.4.1/executionHistory/executionHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/executionHistory/executionHistory.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/gc.properties
--------------------------------------------------------------------------------
/.gradle/5.4.1/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/5.4.1/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Wed Dec 25 23:02:20 CST 2019
2 | gradle.version=5.4.1
3 |
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | TraceLineDemo
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/caches/gradle_models.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/.idea/caches/gradle_models.ser
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_annotation_annotation_1_0_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_0_2_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_common_2_0_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_collection_collection_1_0_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_core_core_1_0_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_fragment_fragment_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_0_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_core_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_1_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_1_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_monitor_1_1_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_runner_1_1_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_0_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__junit_junit_4_12_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 | 1577286135522
261 |
262 |
263 | 1577286135522
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 | 1.8
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ReversingTrackLine
2 | Android上层实现倒车轨迹线的一个小demo
3 |
4 | 结合我的博客一起看
5 | https://blog.csdn.net/weixin_38140931/article/details/89214903
6 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | generateDebugSources
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 28
5 | defaultConfig {
6 | applicationId "com.example.tracelinedemo"
7 | minSdkVersion 27
8 | targetSdkVersion 28
9 | versionCode 1
10 | versionName "1.0"
11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'androidx.appcompat:appcompat:1.0.2'
24 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
25 | testImplementation 'junit:junit:4.12'
26 | androidTestImplementation 'androidx.test.ext:junit:1.1.0'
27 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
28 | }
29 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/example/tracelinedemo/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.tracelinedemo;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.example.tracelinedemo", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/ReversingTrackLine/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.ReversingTrackLine;
2 |
3 | import android.app.Activity;
4 | import android.app.ActivityManager;
5 | import android.content.pm.ConfigurationInfo;
6 | import android.opengl.GLSurfaceView;
7 | import android.os.Bundle;
8 | import android.util.Log;
9 | import android.widget.LinearLayout;
10 | import android.widget.SeekBar;
11 | import android.widget.TextView;
12 |
13 | import com.example.tracelinedemo.R;
14 |
15 | import java.nio.FloatBuffer;
16 | import java.util.Arrays;
17 |
18 | import javax.microedition.khronos.egl.EGLConfig;
19 | import javax.microedition.khronos.opengles.GL10;
20 |
21 | public class MainActivity extends Activity {
22 |
23 | private static final String TAG = "dingww";
24 |
25 | private GLSurfaceView glSurfaceView;
26 |
27 | LinearLayout l1; // 新加的容器
28 | TextView show1; // 显示顺时针转动的角度
29 | TextView show2; // 显示逆时针转动的角度
30 | SeekBar seekBar1; // 顺时针转动的滑动条
31 | SeekBar seekBar2; // 逆时针转动的滑动条
32 | private float mAngle = 0f;
33 | private float mD = 0.5f; // 车尾到车后轮的距离
34 | private float mL = 2.8f; // 车前后轮的轴距
35 | private float mW = 1.2f; // 车的轴长
36 | private float mH = 1.5f; // camera的高度
37 | // 注意:实际x和y的取值有范围:
38 | // -mL * cot < x < -mL * cot
39 | // camera能看到的地面的Y的最小值 < y < mL * cot + mW / 2 - mD
40 | float mArrayX[] = new float[]{10f, 10f, 10f, 10f, 10f, 10f, 10f, 10f,
41 | 10f, 10f, 10f, 10f, 10f, 10f, 10f, 10f, 10f, 10f, 10f,
42 | 10f, 10f, 10f, 10f, 10f}; // 地面关键点位置的X坐标
43 |
44 | float mArrayYR[] = new float[]{0.6f, 0.55f, 0.5f, 0.45f, 0.4f, 0.35f,
45 | 0.3f, 0.25f, 0.2f, 0.15f, 0.1f, 0.05f, 0.05f, 0.1f, 0.15f,
46 | 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.5f, 0.55f, 0.6f}; // 保存屏幕上Y轴的坐标Yr
47 |
48 | // 地面关键点位置的Y坐标..要考虑到camera能看到的地面的Y的最小值(边界问题)
49 | float mArrayY[] = new float[]{4f, 3.75f, 3.5f, 3.25f, 3f, 2.75f, 2.5f,
50 | 2.25f, 2f, 1.75f, 1.5f, 1.25f, 1.25f, 1.5f, 1.75f, 2f, 2.25f,
51 | 2.5f, 2.75f, 3f, 3.25f, 3.5f, 3.75f, 4f};
52 |
53 | //顶点数组
54 | private float[] mArray = {
55 |
56 | mArrayX[0], mArrayYR[0] * 2 - 1, 0f,
57 | mArrayX[1], mArrayYR[1] * 2 - 1, 0f,
58 |
59 | mArrayX[1], mArrayYR[1] * 2 - 1, 0f,
60 | mArrayX[2], mArrayYR[2] * 2 - 1, 0f,
61 |
62 | mArrayX[2], mArrayYR[2] * 2 - 1, 0f,
63 | mArrayX[3], mArrayYR[3] * 2 - 1, 0f,
64 |
65 | mArrayX[3], mArrayYR[3] * 2 - 1, 0f,
66 | mArrayX[4], mArrayYR[4] * 2 - 1, 0f,
67 |
68 | mArrayX[4], mArrayYR[4] * 2 - 1, 0f,
69 | mArrayX[5], mArrayYR[5] * 2 - 1, 0f,
70 |
71 | mArrayX[5], mArrayYR[5] * 2 - 1, 0f,
72 | mArrayX[6], mArrayYR[6] * 2 - 1, 0f,
73 |
74 | mArrayX[6], mArrayYR[6] * 2 - 1, 0f,
75 | mArrayX[7], mArrayYR[7] * 2 - 1, 0f,
76 |
77 | mArrayX[7], mArrayYR[7] * 2 - 1, 0f,
78 | mArrayX[8], mArrayYR[8] * 2 - 1, 0f,
79 |
80 | mArrayX[8], mArrayYR[8] * 2 - 1, 0f,
81 | mArrayX[9], mArrayYR[9] * 2 - 1, 0f,
82 |
83 | mArrayX[9], mArrayYR[9] * 2 - 1, 0f,
84 | mArrayX[10], mArrayYR[10] * 2 - 1, 0f,
85 |
86 | mArrayX[10], mArrayYR[10] * 2 - 1, 0f,
87 | mArrayX[11], mArrayYR[11] * 2 - 1, 0f,
88 |
89 |
90 | mArrayX[12], mArrayYR[12] * 2 - 1, 0f,
91 | mArrayX[13], mArrayYR[13] * 2 - 1, 0f,
92 |
93 | mArrayX[13], mArrayYR[13] * 2 - 1, 0f,
94 | mArrayX[14], mArrayYR[14] * 2 - 1, 0f,
95 |
96 | mArrayX[14], mArrayYR[14] * 2 - 1, 0f,
97 | mArrayX[15], mArrayYR[15] * 2 - 1, 0f,
98 |
99 | mArrayX[15], mArrayYR[15] * 2 - 1, 0f,
100 | mArrayX[16], mArrayYR[16] * 2 - 1, 0f,
101 |
102 | mArrayX[16], mArrayYR[16] * 2 - 1, 0f,
103 | mArrayX[17], mArrayYR[17] * 2 - 1, 0f,
104 |
105 | mArrayX[17], mArrayYR[17] * 2 - 1, 0f,
106 | mArrayX[18], mArrayYR[18] * 2 - 1, 0f,
107 |
108 | mArrayX[18], mArrayYR[18] * 2 - 1, 0f,
109 | mArrayX[19], mArrayYR[19] * 2 - 1, 0f,
110 |
111 | mArrayX[19], mArrayYR[19] * 2 - 1, 0f,
112 | mArrayX[20], mArrayYR[20] * 2 - 1, 0f,
113 |
114 | mArrayX[20], mArrayYR[20] * 2 - 1, 0f,
115 | mArrayX[21], mArrayYR[21] * 2 - 1, 0f,
116 |
117 | mArrayX[21], mArrayYR[21] * 2 - 1, 0f,
118 | mArrayX[22], mArrayYR[22] * 2 - 1, 0f,
119 |
120 | mArrayX[22], mArrayYR[22] * 2 - 1, 0f,
121 | mArrayX[23], mArrayYR[23] * 2 - 1, 0f,
122 |
123 | // 静态区域 (手动配)
124 | -0.1f, 0.2f, 0f,
125 | -0.2f, -0.9f, 0f, // 左边
126 |
127 | -0.2f, -0.9f, 0f,
128 | 0.2f, -0.9f, 0f, // 底边
129 |
130 | 0.2f, -0.9f, 0f,
131 | 0.1f, 0.2f, 0f, // 右边
132 |
133 | 0.1f, 0.2f, 0f,
134 | -0.1f, 0.2f, 0f, // 上边
135 | };
136 |
137 | @Override
138 | protected void onCreate(Bundle savedInstanceState) {
139 | super.onCreate(savedInstanceState);
140 | // 进行一些初始化操作
141 | initRenderer();
142 | // 添加新的容器,含有文本框,滑动条
143 | addNewLayout();
144 | }
145 |
146 |
147 | public void addNewLayout() {
148 | // 添加新的容器,含有文本框,滑动条
149 | l1 = new LinearLayout(this);
150 | l1.setX(100);
151 | l1.setY(100);
152 | l1.setOrientation(LinearLayout.VERTICAL);
153 |
154 | seekBar1 = new SeekBar(this);
155 | seekBar1.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
156 | @Override
157 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
158 | mAngle = progress / 100f * 30f;
159 | int arrayIndex = 0;
160 | for (int index = 0; index < mArrayX.length; index++) {
161 | if (index < mArrayX.length / 2) {
162 | Log.d(TAG, "onProgressChanged: index = " + index);
163 | mArrayX[index] = ComputerXin(mAngle, mArrayY[index]);
164 | Log.d(TAG, "onProgressChanged:顺时针 mArrayX[" + index + "] =" + mArrayX[index]);
165 | // 更新mArray顶点数组
166 | if ((index == 0) || (index == mArrayX.length / 2 - 1)) {
167 | mArray[arrayIndex] = mArrayX[index];
168 | arrayIndex = arrayIndex + 3;
169 | Log.d(TAG, "onProgressChanged: mArray[" + arrayIndex + "] = " + mArray[arrayIndex]);
170 | } else {
171 | mArray[arrayIndex] = mArrayX[index];
172 | arrayIndex = arrayIndex + 3;
173 | mArray[arrayIndex] = mArrayX[index];
174 | arrayIndex = arrayIndex + 3;
175 | }
176 | } else {
177 | mArrayX[index] = ComputerXOut(mAngle, mArrayY[index]);
178 | Log.d(TAG, "onProgressChanged:顺时针 mArrayX" + index + "=" + mArrayX[index]);
179 | // 更新mArray顶点数组
180 | if ((index == mArrayX.length - 1) || (index == mArrayX.length / 2)) {
181 | mArray[arrayIndex] = mArrayX[index];
182 | arrayIndex = arrayIndex + 3;
183 | } else {
184 | mArray[arrayIndex] = mArrayX[index];
185 | arrayIndex = arrayIndex + 3;
186 | mArray[arrayIndex] = mArrayX[index];
187 | arrayIndex = arrayIndex + 3;
188 | }
189 | }
190 | }
191 | show1.setText("顺时针当前角度:" + mAngle);
192 | }
193 |
194 | @Override
195 | public void onStartTrackingTouch(SeekBar seekBar) {
196 | }
197 |
198 | @Override
199 | public void onStopTrackingTouch(SeekBar seekBar) {
200 | }
201 | });
202 | seekBar2 = new SeekBar(this);
203 | seekBar2.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
204 | @Override
205 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
206 | mAngle = progress / 100f * 30f;
207 | int arrayIndex = 0;
208 | for (int index = 0; index < mArrayX.length; index++) {
209 | if (index < mArrayX.length / 2) {
210 | mArrayX[index] = -ComputerXOut(mAngle, mArrayY[index]);
211 | // 更新mArray顶点数组
212 | if ((index == 0) || (index == mArrayX.length / 2 - 1)) {
213 | mArray[arrayIndex] = mArrayX[index];
214 | arrayIndex = arrayIndex + 3;
215 | } else {
216 | mArray[arrayIndex] = mArrayX[index];
217 | arrayIndex = arrayIndex + 3;
218 | mArray[arrayIndex] = mArrayX[index];
219 | arrayIndex = arrayIndex + 3;
220 | }
221 | Log.d(TAG, "onProgressChanged:逆时针 mArrayX" + index + "=" + mArrayX[index]);
222 | } else {
223 | mArrayX[index] = -ComputerXin(mAngle, mArrayY[index]);
224 | Log.d(TAG, "onProgressChanged:逆时针 mArrayX" + index + "=" + mArrayX[index]);
225 | // 更新mArray顶点数组
226 | if ((index == mArrayX.length - 1) || (index == mArrayX.length / 2)) {
227 | mArray[arrayIndex] = mArrayX[index];
228 | arrayIndex = arrayIndex + 3;
229 | } else {
230 | mArray[arrayIndex] = mArrayX[index];
231 | arrayIndex = arrayIndex + 3;
232 | mArray[arrayIndex] = mArrayX[index];
233 | arrayIndex = arrayIndex + 3;
234 | }
235 | }
236 | }
237 | show2.setText("逆时针当前角度:" + mAngle);
238 | }
239 |
240 | @Override
241 | public void onStartTrackingTouch(SeekBar seekBar) {
242 | }
243 |
244 | @Override
245 | public void onStopTrackingTouch(SeekBar seekBar) {
246 | }
247 | });
248 |
249 | show1 = new TextView(this);
250 | show1.setText("顺时针角度");
251 | show2 = new TextView(this);
252 | show2.setText("逆时针角度");
253 |
254 | l1.addView(seekBar1);
255 | l1.addView(seekBar2);
256 | l1.addView(show1);
257 | l1.addView(show2);
258 | addContentView(l1, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
259 | LinearLayout.LayoutParams.WRAP_CONTENT));
260 | }
261 |
262 | public void initRenderer() {
263 | // 如果本设备支持OpenGl ES 2.0
264 | if (IsSupported()) {
265 | // 先建GLSurfaceView实例
266 | glSurfaceView = (GLSurfaceView) findViewById(R.id.glSurfaceView);
267 | // 如果findViewById返回的是空,那就重新创建一个GLSurfaceView实例吧
268 | if (glSurfaceView == null) {
269 | glSurfaceView = new GLSurfaceView(this);
270 | Log.d(TAG, "onCreate: findViewById failed");
271 | }
272 | // 创建渲染器实例
273 | MyRenderer1 mRenderer = new MyRenderer1();
274 | // 设置渲染器
275 | glSurfaceView.setRenderer(mRenderer);
276 | // 显示SurfaceView
277 | setContentView(glSurfaceView);
278 | }
279 | }
280 |
281 | // 是否支持OpenGl ES 2.0
282 | private boolean IsSupported() {
283 | ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
284 | ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();
285 | boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x2000;
286 | return supportsEs2;
287 | }
288 |
289 | public float ComputerXOut(float angle, float y) {
290 | // L, D, W 已知,
291 | float firstStep = Square(mL * Cot(angle) + mW / 2) - Square(y + mD);
292 | float secondStep = (float) Math.pow(firstStep, 0.5);
293 | float x = secondStep - mL * Cot(angle);
294 | // 新加入第一视角,需要参数:屏幕宽W,camera的张角2a
295 | float a = 30f; // 当a越大,两条线越靠近,变化趋势相对平缓;a越小,两条线越远离,变化趋势相对剧烈
296 | float W = 0.8f; // 屏幕的宽度
297 | return (float) ((x * W) / ((Math.pow((Square(y) + Square(mH)), 0.5) * Tan(a) * 2)));
298 | // return ( x * W)/(y * Tan(a) * 2);
299 | // return secondStep - mL * Cot(angle);
300 | // return x * W;
301 |
302 | }
303 |
304 | public float ComputerXin(float angle, float y) {
305 | // L, D, W 已知,
306 | float firstStep = Square(mL * Cot(angle) - mW / 2) - Square(y + mD);
307 | float secondStep = (float) Math.pow(firstStep, 0.5);
308 | float x = secondStep - mL * Cot(angle);
309 | // 新加入第一视角,需要参数屏幕宽W,camera的张角2a大小
310 | float a = 30f; // 当a越大,两条线越靠近,变化趋势相对平缓;a越小,两条线越远离,变化趋势相对剧烈
311 | float W = 0.8f; // 屏幕的宽度
312 | return (float) ((x * W) / ((Math.pow((Square(y) + Square(mH)), 0.5) * Tan(a) * 2)));
313 | // return ( x * W)/(y * Tan(a) * 2);
314 | // return secondStep - mL * Cot(angle);
315 | // return x * W;
316 | }
317 |
318 | // 求反切值 默认参数为弧度,需要角度转弧度。
319 | public float Cot(float angle) {
320 | float cot = 1 / (float) Math.tan(angle * Math.PI / 180);
321 | return cot;
322 | }
323 |
324 | // 求平方
325 | public float Square(float number) {
326 | return (float) Math.pow(number, 2);
327 | }
328 |
329 | // 求Tan 默认的参数为弧度,需要角度转弧度
330 | public float Tan(float degreef) {
331 | return (float) Math.tan(Math.toRadians(degreef));
332 | }
333 |
334 | public void UpdateArray() {
335 | }
336 |
337 | public class MyRenderer1 implements GLSurfaceView.Renderer {
338 |
339 | // 顶点数组缓冲区
340 | private FloatBuffer mBuffer;
341 | // 顶点颜色数组缓冲区
342 | private FloatBuffer mColorBuffer;
343 |
344 |
345 | public MyRenderer1() {
346 | // //获取浮点型缓冲数据(顶点)
347 | // mBuffer = Utils.getFloatBuffer(mArray);
348 | // 获取负浮点型缓冲数据(顶点颜色)
349 | // mColorBuffer = Utils.getFloatBuffer(mColorArray);
350 | }
351 |
352 | // Surface创建的时候调用
353 | @Override
354 | public void onSurfaceCreated(GL10 gl, EGLConfig config) {
355 | Log.d(TAG, "onSurfaceCreated: 创建");
356 | // 设置清屏颜色为白色
357 | gl.glClearColor(1f, 1f, 1f, 0f);
358 |
359 | gl.glShadeModel(GL10.GL_LINE_SMOOTH);
360 | }
361 |
362 | // Surface改变的的时候调用
363 | @Override
364 | public void onSurfaceChanged(GL10 gl, int width, int height) {
365 | Log.d(TAG, "onSurfaceChanged: 窗口改变");
366 | // 设置窗口大小
367 | gl.glViewport(0, 0, width, height);
368 | }
369 |
370 | // 在Surface上绘制的时候调用
371 | @Override
372 | public void onDrawFrame(GL10 gl) {
373 |
374 | //获取浮点型缓冲数据(顶点)
375 | mBuffer = Utils.getFloatBuffer(mArray);
376 |
377 | Log.d(TAG, "onDrawFrame: " + Arrays.toString(mArray));
378 | Log.d(TAG, "onDrawFrame: 画");
379 | // 清除屏幕
380 | gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
381 | // 允许设置顶点 // GL10.GL_VERTEX_ARRAY顶点数组
382 | gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
383 | // 设置顶点
384 | gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mBuffer);
385 | //设置点的颜色为红色
386 | gl.glColor4f(1f, 0f, 0f, 1f);
387 |
388 | //设置点大小
389 | gl.glPointSize(10);
390 | //设置线的宽度
391 | gl.glLineWidth(10);
392 | // 绘制封闭的图线,[绘制类型(封闭的图线) ,,顶点个数]
393 | gl.glDrawArrays(GL10.GL_LINES, 0, 52);
394 | // 取消顶点设置
395 | gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
396 |
397 | }
398 | }
399 |
400 |
401 | @Override
402 | protected void onResume() {
403 | super.onResume();
404 | if (glSurfaceView != null) {
405 | glSurfaceView.onResume();
406 | }
407 | }
408 |
409 | @Override
410 | protected void onPause() {
411 | super.onPause();
412 | if (glSurfaceView != null) {
413 | glSurfaceView.onPause();
414 | }
415 | }
416 | }
417 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/ReversingTrackLine/Utils.java:
--------------------------------------------------------------------------------
1 | package com.example.ReversingTrackLine;
2 |
3 | import java.nio.ByteBuffer;
4 | import java.nio.ByteOrder;
5 | import java.nio.FloatBuffer;
6 | import java.nio.IntBuffer;
7 |
8 | public class Utils {
9 | /**
10 | * @param vertexs int数组
11 | * @return 获取整形缓冲数据
12 | */
13 | public static IntBuffer getIntBuffer(int[] vertexs) {
14 | IntBuffer buffer;
15 | ByteBuffer qbb = ByteBuffer.allocateDirect(vertexs.length * 4);
16 | qbb.order(ByteOrder.nativeOrder());
17 | buffer = qbb.asIntBuffer();
18 | buffer.put(vertexs);
19 | buffer.position(0);
20 | return buffer;
21 | }
22 | /**
23 | * @param vertexs float 数组
24 | * @return 获取浮点形缓冲数据
25 | */
26 | public static FloatBuffer getFloatBuffer(float[] vertexs) {
27 | FloatBuffer buffer;
28 | ByteBuffer qbb = ByteBuffer.allocateDirect(vertexs.length * 4);
29 | qbb.order(ByteOrder.nativeOrder());
30 | buffer = qbb.asFloatBuffer();
31 | buffer.put(vertexs);
32 | buffer.position(0);
33 | return buffer;
34 | }
35 |
36 | /**
37 | * @param vertexs Byte 数组
38 | * @return 获取字节型缓冲数据
39 | */
40 | public static ByteBuffer getByteBuffer(byte[] vertexs) {
41 | ByteBuffer buffer = null;
42 | buffer = ByteBuffer.allocateDirect(vertexs.length);
43 | buffer.put(vertexs);
44 | buffer.position(0);
45 | return buffer;
46 | }
47 | //
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
22 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TraceLineDemo
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/test/java/com/example/tracelinedemo/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.tracelinedemo;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.5.3'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microvector/ReversingTrackLine/760612e9282725ada8135d4f173c98786b51b637/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Dec 24 21:23:01 CST 2019
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-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/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 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
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 Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file is automatically generated by Android Studio.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file should *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 | #
7 | # Location of the SDK. This is only used by Gradle.
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/home/ding/Android/Sdk
11 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name='TraceLineDemo'
3 |
--------------------------------------------------------------------------------