初始化项目

main
huangwei 9 months ago
commit f1340d38bd
  1. 31
      .gitignore
  2. 1
      README.md
  3. BIN
      aar/base/base-release.aar
  4. 2
      aar/base/build.gradle
  5. 2
      app/.gitignore
  6. 5
      app/README.md
  7. 147
      app/build.gradle
  8. BIN
      app/debug.keystore
  9. 44
      app/doc/Untitled-old.mdj
  10. 36869
      app/doc/states.mdj
  11. 45155
      app/doc/状态机.mdj
  12. 276
      app/proguard-rules.pro
  13. 43
      app/src/androidTest/kotlin/HelloKotlin.kt
  14. 90
      app/src/main/AndroidManifest.xml
  15. 58
      app/src/main/java/com/project/survey/App.java
  16. 16
      app/src/main/java/com/project/survey/activity/MainActivity.kt
  17. 6
      app/src/main/java/com/project/survey/activity/SplashActivity.kt
  18. 100
      app/src/main/java/com/project/survey/activity/base/BaseBindingActivity.kt
  19. 6
      app/src/main/res/anim/dialog_enter_bottom.xml
  20. 6
      app/src/main/res/anim/dialog_exit_bottom.xml
  21. 5
      app/src/main/res/anim/fade_in_quick.xml
  22. 5
      app/src/main/res/anim/fade_out_quick.xml
  23. 9
      app/src/main/res/anim/slide_in_left.xml
  24. 9
      app/src/main/res/anim/slide_in_right.xml
  25. 9
      app/src/main/res/anim/slide_out_left.xml
  26. 9
      app/src/main/res/anim/slide_out_right.xml
  27. 12
      app/src/main/res/layout/activity_base_binding.xml
  28. 31
      app/src/main/res/layout/activity_main.xml
  29. 31
      app/src/main/res/layout/activity_splash.xml
  30. 7
      app/src/main/res/menu/menu_activity_main.xml
  31. 271
      app/src/main/res/values/arrays.xml
  32. 70
      app/src/main/res/values/attr.xml
  33. 13
      app/src/main/res/values/color.xml
  34. 44
      app/src/main/res/values/dimens.xml
  35. 7
      app/src/main/res/values/ids.xml.xml
  36. 15
      app/src/main/res/values/strings.xml
  37. 157
      app/src/main/res/values/styles.xml
  38. 4
      app/src/main/res/xml/network_security_config.xml
  39. 9
      app/src/test/java/TestCase.java
  40. 37
      app/src/test/kotlin/Hello.kt
  41. 30
      build.gradle
  42. 7
      buildSrc/build.gradle.kts
  43. 9
      buildSrc/src/main/java/com/bingce/java/com/bingce/AarCopyUtilsJava.java
  44. 79
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/AarCopyUtilsKt.kt
  45. 34
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/BcFolder.kt
  46. 25
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/ConfigProperties.kt
  47. 44
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/ModuleName.kt
  48. 13
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/Sample.kt
  49. 27
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/SurveyorVersionUtils.kt
  50. 29
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/appInfo.kt
  51. 257
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/dependencies.kt
  52. 50
      buildSrc/src/main/java/com/bingce/kotlin/com/bingce/flavor/FlavorItems.java
  53. 25
      gradle.properties
  54. BIN
      gradle/wrapper/gradle-wrapper.jar
  55. 6
      gradle/wrapper/gradle-wrapper.properties
  56. 164
      gradlew
  57. 90
      gradlew.bat
  58. 36
      import-summary.txt
  59. 145
      settings.gradle

31
.gitignore vendored

@ -0,0 +1,31 @@
#git submodule update --init --recursive
*.hprof
build/
.vscode/
.gradle
/local.properties
/.idea
.DS_Store
/captures
/build
/app/build
/app/release
/app/mapping.txt
/app/src/main/libs
/app/src/main/obj
/controlapp/mapping.txt
/controlapp/release
/alpha/build
/alpha/release
/alpha/mapping.txt
/alpha/src/main/schemas/zone.a.dimap.db.RecordsDataBase/1.json
*.iml
.idea
*.jks
obj/
.cxx/
*.class
#定制版本
/app/*/release
/alpha/*/release
/pad/*/release

@ -0,0 +1 @@
解放军信息工程导线助手

Binary file not shown.

@ -0,0 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default", file('base-release.aar'))

2
app/.gitignore vendored

@ -0,0 +1,2 @@
/build
*/release

@ -0,0 +1,5 @@
打包注意事项:
1.检查 Test.java 中的DEBUG是否为false;
2.检查 打包版本号;
3.检查数据库版本号;
4.检查changelog.xml内容

@ -0,0 +1,147 @@
import com.bingce.AndroidSdk
import com.bingce.AndroidX
import com.bingce.Libs
import com.bingce.ModuleName
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
android {
useLibrary Libs.httpLegacy
compileSdk AndroidSdk.compileSdkVersion
namespace "com.project.survey"
defaultConfig {
minSdkVersion AndroidSdk.minSdkVersion
targetSdkVersion AndroidSdk.targetSdkVersion
ndk {}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = [
//room
"room.schemaLocation": "$projectDir/src/main/schemas".toString()
]
}
}
}
buildFeatures {
viewBinding true
buildConfig true
}
signingConfigs {
debug {
storeFile file('./debug.keystore')
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
splits {
// Split apks on build target ABI, view all options for the splits here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
abi {
enable true
reset()
include 'arm64-v8a', 'armeabi-v7a'//,'armeabi-v7a', 'x86'//, 'x86_64', 'mips','armeabi',
}
}
//META-INF的问题
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/*.kotlin_module'
exclude '/META-INF/{AL2.0,LGPL2.1}'//compose
}
lintOptions {
abortOnError false
disable 'GoogleAppIndexingWarning'
}
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
def moduleName = new ModuleName(project)
implementation project(moduleName.bingceModule("appBase"))
implementation project(moduleName.bingceModule("repository"))
implementation project(moduleName.bingceModule("base"))
// implementation project(moduleName.bingceModule("leancloud"))
implementation project(moduleName.bingceModule("base-java"))
implementation project(moduleName.bingceModule("utils"))
implementation project(moduleName.bingceModule("coordlib"))
implementation project(moduleName.bingceModule("device"))
implementation project(moduleName.bingceModule("device-ui"))
implementation project(moduleName.bingceModule("rtk"))
implementation project(moduleName.bingceModule("totalstation"))
implementation project(moduleName.bingceModule("level"))
implementation project(moduleName.bingceModule("bcdialog-style"))
implementation project(moduleName.openSourceModule("utilcode"))
implementation project(moduleName.openSourceModule("colorful"))//
implementation project(moduleName.openSourceModule("dragExpandGrid"))//
implementation project(moduleName.openSourceModule("lsettingitemlibrary"))//
implementation project(moduleName.openSourceModule("spinkit"))//loading控件 使
implementation project(moduleName.openSourceModule("splashview"))//广view
implementation project(moduleName.openSourceModule("poishadowjar"))//excel
implementation project(moduleName.openSourceModule("safFilePicker"))//
implementation project(moduleName.openSourceModule("fastjson"))
implementation project(moduleName.openSourceModule("agentweb"))
implementation project(":opensource:exFilePicker")
implementation project(":sdk:tensorFlowTTS")//
implementation Libs.RxImagePicker.core
// implementation Libs.RxImagePicker.support
// implementation Libs.RxImagePicker.supportWechat
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
// implementation "cn.leancloud:storage-android:8.2.5"
// implementation "cn.leancloud:realtime-android:8.2.5"
implementation Libs.LeanCloud.storage
implementation Libs.LeanCloud.realtime
implementation AndroidX.multidex
implementation AndroidX.material
implementation AndroidX.appcompat
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test:runner:1.1.0"
androidTestImplementation "androidx.test:rules:1.1.0"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.google.android.gms:play-services-auth:20.7.0'
implementation Libs.flycoTabLayout
}

Binary file not shown.

@ -0,0 +1,44 @@
{
"_type": "Project",
"_id": "AAAAAAFF+h6SjaM2Hec=",
"name": "Untitled",
"ownedElements": [
{
"_type": "UMLModel",
"_id": "AAAAAAFF+qBWK6M3Z8Y=",
"_parent": {
"$ref": "AAAAAAFF+h6SjaM2Hec="
},
"name": "Model",
"ownedElements": [
{
"_type": "UMLStateMachine",
"_id": "AAAAAAF5RXOA7okfG2A=",
"_parent": {
"$ref": "AAAAAAFF+qBWK6M3Z8Y="
},
"name": "StateMachine1",
"ownedElements": [
{
"_type": "UMLStatechartDiagram",
"_id": "AAAAAAF5RXOA7okhiTg=",
"_parent": {
"$ref": "AAAAAAF5RXOA7okfG2A="
},
"name": "StatechartDiagram1"
}
],
"regions": [
{
"_type": "UMLRegion",
"_id": "AAAAAAF5RXOA7okgaKU=",
"_parent": {
"$ref": "AAAAAAF5RXOA7okfG2A="
}
}
]
}
]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,276 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Administrator\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keepclassmembers class * {
public <init>(org.json.JSONObject);
}
-keep public class cn.liuyanbing.surveyor.R$*{
public static final int *;
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
#混淆前后的映射
-printmapping mapping.txt
-keep class androidx.appcompat.widget.SearchView { *; }
-keep class cn.aigestudio.datepicker.**{*;}
-dontwarn javax.**
-keep class com.tencent.mm.sdk.** {
*;
}
-dontwarn com.tencent.**
-keep class com.tencent.** {*;}
-ignorewarnings
# Apache POI
-dontwarn org.apache.**
-dontwarn org.openxmlformats.schemas.**
-dontwarn org.etsi.**
-dontwarn org.w3.**
-dontwarn com.microsoft.schemas.**
-dontwarn com.fasterxml.**
-dontwarn javax.naming.**
-dontwarn java.lang.management.**
-dontwarn org.slf4j.impl.**
-dontnote org.apache.**
-dontnote org.openxmlformats.schemas.**
-dontnote org.etsi.**
-dontnote org.w3.**
-dontnote com.microsoft.schemas.**
-dontnote com.fasterxml.**
-dontnote javax.naming.**
-dontnote java.lang.management.**
-dontnote org.slf4j.impl.**
-keeppackagenames org.apache.poi.ss.formula.function
-keep class org.apache.** {*;}
-keep class org.openxmlformats.** {*;}
-keep class org.etsi.** {*;}
-keep class org.w3.** {*;}
-keep class com.microsoft.** {*;}
-keep class com.fasterxml.** {*;}
-keep class schemaorg_apache_xmlbeans.** {*;}
# ------------------------ leancloud sdk ------------------------
-keepattributes Signature
-dontwarn com.jcraft.jzlib.**
-keep class com.jcraft.jzlib.** { *;}
-dontwarn sun.misc.**
-keep class sun.misc.** { *;}
-dontwarn alibaba.fastjson.**
-dontnote alibaba.fastjson.**
-keep class alibaba.fastjson.** { *;}
-dontwarn sun.security.**
-keep class sun.security.** { *; }
-dontwarn com.google.**
-keep class com.google.** { *;}
-dontwarn com.avos.**
-dontnote com.avos.**
-keep class com.avos.** { *;}
-dontwarn cn.leancloud.**
-dontnote cn.leancloud.**
-keep class cn.leancloud.** { *;}
-keep public class android.net.http.SslError
-keep public class android.webkit.WebViewClient
-dontwarn android.webkit.WebView
-dontwarn android.net.http.SslError
-dontwarn android.webkit.WebViewClient
-dontnote android.net.http.**
-dontwarn android.support.**
-dontwarn org.jivesoftware.smack.**
-keep class org.jivesoftware.smack.** { *;}
-dontwarn com.loopj.**
-keep class com.loopj.** { *;}
-dontwarn com.squareup.okhttp.**
-keep class com.squareup.okhttp.** { *;}
-keep interface com.squareup.okhttp.** { *; }
# keep okhttp3okio
-dontwarn okhttp3.**
-keep class okhttp3.** { *;}
-keep interface okhttp3.** { *; }
-dontwarn okio.**
-keep class com.google.protobuf.** { *; }
-keep public class * extends com.google.protobuf.** { *; }
-dontwarn com.google.protobuf.**
-dontwarn org.xbill.**
-keep class org.xbill.** { *;}
-keepattributes *Annotation*
# ------------------------ ChatKit ------------------------
-dontwarn cn.leancloud.chatkit.**
-keep class cn.leancloud.chatkit.** { *;}
-dontnote cn.leancloud.chatkit.**
# ------------------------ picasso ------------------------
-dontwarn com.squareup.picasso**
-keep class com.squareup.picasso.**{*;}
# ------------------------ eventbus ------------------------
-keepattributes *Annotation*
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
#--------------------------工具集-----------------------------
-keep class blankj.utilcode.** { *; }
-keepclassmembers class blankj.utilcode.** { *; }
-dontwarn blankj.utilcode.**
-keep class com.chad.library.adapter.** {
*;
}
-keep public class * extends com.chad.library.adapter.base.BaseQuickAdapter
-keep public class * extends com.chad.library.adapter.base.BaseViewHolder
-keepclassmembers class **$** extends com.chad.library.adapter.base.BaseViewHolder {
<init>(...);
}
# glide 的混淆代码
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
# banner 的混淆代码
-keep class com.youth.banner.** {
*;
}
# 华测sdk
-keep class com.chc.gnss.sdk.** { *; }
-dontwarn com.chc.gnss.sdk.**
# 中国移动sdk
-keep class com.cmcc.sy.hap.** { *; }
-dontwarn com.cmcc.sy.hap.**
# 梦想CAD sdk
-keep class org.cocos2dx.** { *; }
-dontwarn org.cocos2dx.**
-keep class com.chukong.cocosplay.client.** { *; }
-dontwarn com.chukong.cocosplay.client.**
-keep class com.MxDraw.** { *; }
-dontwarn com.MxDraw.**
#agentweb
-keep class com.just.agentweb.** {
*;
}
-dontwarn com.just.agentweb.**
#androidx
-keep class com.google.android.material.** {*;}
-keep class androidx.** {*;}
-keep public class * extends androidx.**
-keep interface androidx.** {*;}
-dontwarn com.google.android.material.**
-dontnote com.google.android.material.**
-dontwarn androidx.**
# 南方坐标转换
-keep class com.qxwz.sdk.** { *; }
-dontwarn com.qxwz.sdk.**
-keep class com.bingce.device.rtk.configuration.** { *; }
-keep class com.bingce.device.rtk.model.** { *; }
-keep class com.bingce.totalstation.TsConfig { *; }
#OkSocket
-dontwarn xuhao.didi.socket.client.**
-dontwarn xuhao.didi.socket.common.**
-dontwarn xuhao.didi.socket.server.**
-dontwarn xuhao.didi.core.**
-keep class xuhao.didi.socket.client.** { *; }
-keep class xuhao.didi.socket.common.** { *; }
-keep class xuhao.didi.socket.server.** { *; }
-keep class xuhao.didi.core.** { *; }
-keep class xuhao.didi.socket.client.sdk.client.OkSocketOptions$* {
*;
}
-keep class xuhao.didi.socket.server.impl.OkServerOptions$* {
*;
}
#gsyvideoplayer
-keep class com.shuyu.gsyvideoplayer.video.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.video.**
-keep class com.shuyu.gsyvideoplayer.video.base.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.video.base.**
-keep class com.shuyu.gsyvideoplayer.utils.** { *; }
-dontwarn com.shuyu.gsyvideoplayer.utils.**
-keep class tv.danmaku.ijk.** { *; }
-dontwarn tv.danmaku.ijk.**
-keep public class * extends android.view.View{
*** get*();
void set*(***);
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
}
# # keep rx
# -dontwarn sun.misc.**
# -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
# long producerIndex;
# long consumerIndex;
# }
# -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
# rx.internal.util.atomic.LinkedQueueNode producerNode;
# }
# -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
# rx.internal.util.atomic.LinkedQueueNode consumerNode;
# }
#
# -keep class cn.liuyanbing.surveyor.model.base.SerializableStringArray { *; }
-dontwarn com.yalantis.ucrop**
-keep class com.yalantis.ucrop** { *; }
-keep interface com.yalantis.ucrop** { *; }
-keep class com.bingce.event.WxLoginSuccessEvent{ *; }
# 友盟
-keep class com.umeng.** {*;}

@ -0,0 +1,43 @@
import org.junit.Test
class HelloKotlin {
@Test
fun test() {
// runBlocking {
//
// launch {
// Log.d("hwhw", "请求1")
//
// delay(1000)
// Log.d("hwhw", "请求1 delay")
//
// val apiCall = RetrofitClient.apiCall {
// RetrofitClient.createService<CommonService>().getPassageData()
// }
//
// apiCall?.let {
// Log.d("hwhw", "请求成功1,$it")
// }
// }
//
// launch {
// Log.d("hwhw", "请求2")
//
// delay(1000)
// Log.d("hwhw", "请求2 delay")
//
// val apiCall1 = RetrofitClient.apiCall {
// RetrofitClient.createService<CommonService>().getPassageData()
// }
// apiCall1?.let {
// Log.d("hwhw", "请求成功2,$it")
// }
// }
//
//
// }
}
}

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.BLUETOOTH" /> <!-- 蓝牙 -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission
android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<application
android:name="com.project.survey.App"
android:allowBackup="false"
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:theme="@style/CustomThemeLight"
tools:replace="android:label,android:allowBackup">
<!-- the following MUST be in application, not activity -->
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<activity
android:name=".activity.MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- <activity-->
<!-- android:name="com.bingce.surveyor.agentweb.AgentWebActivity"-->
<!-- android:configChanges="orientation|keyboardHidden|screenSize"-->
<!-- android:exported="true"-->
<!-- android:hardwareAccelerated="true"-->
<!-- android:windowSoftInputMode="adjustUnspecified|stateHidden" />-->
<activity
android:name=".activity.SplashActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true">
<!-- <meta-data-->
<!-- android:name="android.app.shortcuts"-->
<!-- android:resource="@xml/shortcuts" />-->
</activity>
<!-- <activity-->
<!-- android:name=".activity.user.LoginActivity"-->
<!-- android:configChanges="orientation|keyboardHidden|screenSize"-->
<!-- android:exported="true"-->
<!-- android:label="@string/log_in" />-->
</application>
</manifest>

@ -0,0 +1,58 @@
package com.project.survey;
import static com.bingce.AppChannel.customChannel;
import android.app.Application;
import android.util.Log;
import com.bingce.AppChannel;
import org.polaric.colorful.Colorful;
import blankj.utilcode.util.Utils;
import io.reactivex.functions.Consumer;
import io.reactivex.plugins.RxJavaPlugins;
public class App extends Application {
private static App app;
@Override
public void onCreate() {
customChannel = AppChannel.CUSTOM_CONTROL_PRO;//AppChannel.CUSTOM_PUBLIC;
super.onCreate();
app = this;
initThemeDark();
RxJavaPlugins.setErrorHandler(new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) {
Log.e("rxThrowable", String.valueOf(throwable));
}
});
Utils.init(this);
}
private void initThemeDark() {
Colorful.defaults()
.primaryColor(Colorful.ThemeColor.BLUE)
.accentColor(Colorful.ThemeColor.BLUE)
.translucent(false)
.dark(false);
Colorful.init(this);
Colorful.config(this).primaryColor(Colorful.ThemeColor.BROWN).apply();
Colorful.config(this).accentColor(Colorful.ThemeColor.BROWN).apply();
}
public static App getApp() {
return app;
}
}

@ -0,0 +1,16 @@
package com.project.survey.activity
import com.project.survey.activity.base.BaseBindingActivity
import com.project.survey.databinding.ActivityMainBinding
class MainActivity : BaseBindingActivity<ActivityMainBinding>() {
override fun getBinding(): ActivityMainBinding {
return ActivityMainBinding.inflate(layoutInflater)
}
override fun initView() {
}
override fun initData() {
}
}

@ -0,0 +1,6 @@
package com.project.survey.activity
import com.project.survey.activity.base.BaseBindingActivity
class SplashActivity :BaseBindingActivity<> {
}

@ -0,0 +1,100 @@
package com.project.survey.activity.base
import android.os.Bundle
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.widget.LinearLayout
import androidx.annotation.StringRes
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.viewbinding.ViewBinding
import blankj.utilcode.util.Utils
import com.project.survey.App
import com.project.survey.R
import com.project.survey.databinding.ActivityBaseBindingBinding
import org.polaric.colorful.Colorful
abstract class BaseBindingActivity<VB : ViewBinding> : AppCompatActivity() {
protected val mBinding get() = _binding!!
private var _binding: VB? = null
private lateinit var toolBar: Toolbar
abstract fun getBinding(): VB
abstract fun initView()
abstract fun initData()
override fun onCreate(savedInstanceState: Bundle?) {
initTheme()
super.onCreate(savedInstanceState)
setContentView(getContentView())
initToolBar()
initView()
initData()
}
private fun initTheme() {
setTheme(Colorful.getThemeDelegate().styleResBase)
getTheme().applyStyle(Colorful.getThemeDelegate().styleResPrimary, true)
getTheme().applyStyle(Colorful.getThemeDelegate().styleResAccent, true)
val app = Utils.getApp() as App
delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_YES
// if (app.isThemeDark) {
// delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_YES
// } else {
// delegate.localNightMode = AppCompatDelegate.MODE_NIGHT_NO
// }
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
private fun getContentView(): View {
val baseBinding = ActivityBaseBindingBinding.inflate(layoutInflater)
val layoutParams = LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
_binding = getBinding()
baseBinding.llParent.addView(mBinding.root, layoutParams)
baseBinding.llParent.setBackgroundColor(
ContextCompat.getColor(
this,
R.color.bg_content_new
)
)
toolBar = baseBinding.ilToolBar.toolbar
return baseBinding.root
}
protected open fun initToolBar() {
setSupportActionBar(toolBar)
if (supportActionBar != null) supportActionBar!!.setDisplayHomeAsUpEnabled(true)
}
protected fun setToolbarTitle(text: String?) {
toolBar.setTitle(text)
}
protected fun setToolbarTitle(@StringRes text: Int) {
toolBar.setTitle(text)
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == android.R.id.home) {
if (isFinishAtOnce())
finish()
}
return super.onOptionsItemSelected(item)
}
protected open fun isFinishAtOnce(): Boolean {
return true
}
}

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="150"
android:fromYDelta="100%"
android:interpolator="@android:anim/linear_interpolator"
android:toYDelta="0" />

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="150"
android:fromYDelta="0"
android:interpolator="@android:anim/linear_interpolator"
android:toYDelta="100%" />

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200"
android:fromAlpha="0.0"
android:toAlpha="1.0" />

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200"
android:fromAlpha="1.0"
android:toAlpha="0.0" />

@ -0,0 +1,9 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="-100%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%" />
</set>

@ -0,0 +1,9 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="100%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%" />
</set>

@ -0,0 +1,9 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="-100%"
android:toYDelta="0%" />
</set>

@ -0,0 +1,9 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="100%"
android:toYDelta="0%" />
</set>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/llParent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/ilToolBar"
layout="@layout/toolbar" />
</LinearLayout>

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:tl="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.viewpager.widget.ViewPager
android:id="@+id/activity_main_viewpager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<com.flyco.tablayout.CommonTabLayout
android:id="@+id/activity_main_tab_layout"
android:layout_width="match_parent"
android:layout_height="54dp"
android:background="#ffffff"
tl:tl_iconHeight="23dp"
tl:tl_iconWidth="23dp"
tl:tl_indicator_color="#3498db"
tl:tl_indicator_height="0dp"
tl:tl_textSelectColor="#3498db"
tl:tl_textUnselectColor="#666666"
tl:tl_textsize="12sp"
tl:tl_underline_color="#cfcfcf"
tl:tl_underline_gravity="TOP"
tl:tl_underline_height="1dp" />
</LinearLayout>

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:tl="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.viewpager.widget.ViewPager
android:id="@+id/activity_main_viewpager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<com.flyco.tablayout.CommonTabLayout
android:id="@+id/activity_main_tab_layout"
android:layout_width="match_parent"
android:layout_height="54dp"
android:background="#ffffff"
tl:tl_iconHeight="23dp"
tl:tl_iconWidth="23dp"
tl:tl_indicator_color="#3498db"
tl:tl_indicator_height="0dp"
tl:tl_textSelectColor="#3498db"
tl:tl_textUnselectColor="#666666"
tl:tl_textsize="12sp"
tl:tl_underline_color="#cfcfcf"
tl:tl_underline_gravity="TOP"
tl:tl_underline_height="1dp" />
</LinearLayout>

@ -0,0 +1,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_activity_main_settings"
android:title="@string/settings"
app:showAsAction="never" />
</menu>

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="instrument_connect_types">
<item>Classic BT</item>
<item>BLE</item>
<item>Hotspot</item>
</string-array>
<string-array name="project_parameter_list">
<item>Known Control Point</item>
<item>Unknown Point</item>
</string-array>
<string-array name="lenth_accuracy_entries">
<item>1</item>
<item>0.1</item>
<item>0.01</item>
<item>0.001</item>
<item>0.0001</item>
</string-array>
<string-array name="lenth_accuracy_entry_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
<string-array name="angle_accuracy_entries">
<item>0°00′00″</item>
<item>0°00′00.0″</item>
<item>0°00′00.00″</item>
</string-array>
<string-array name="angle_accuracy_entry_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="display_unit_entries">
<item>m</item>
<item>cm</item>
<item>mm</item>
<item>auto</item>
</string-array>
<string-array name="display_unit_entry_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="volume_plus_function_entries">
<item>none</item>
<item>calculate</item>
<item>survey</item>
<item>record</item>
<item>last</item>
<item>next</item>
<item>survey not send result</item>
<item>survey and record</item>
</string-array>
<string-array name="volume_plus_function_entry_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
</string-array>
<string-array name="volume_minus_function_entries">
<item>none</item>
<item>calculate</item>
<item>survey</item>
<item>record</item>
<item>last</item>
<item>next</item>
<item>survey not send result</item>
<item>survey and record</item>
</string-array>
<string-array name="volume_minus_function_entry_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
</string-array>
<string-array name="hor_cal_method_entries">
<item>Common</item>
<item>Trapezoid</item>
<item>Simpson</item>
<item>Romberg</item>
<item>Gauss-Legendre3</item>
<item>Gauss-Legendre4</item>
<item>Gauss-Legendre5</item>
</string-array>
<string-array name="hor_cal_method_entry_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
</string-array>
<string-array name="ver_cal_method_entries">
<item>Second parabola</item>
<item>Round curve</item>
</string-array>
<string-array name="ver_cal_method_entry_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="setup_station_type">
<item>View Current Instrument Station</item>
<item>Phone * Last Station</item>
<item>Phone * Known Back Sight Setup Station</item>
<item>Phone * Resection Setup Station</item>
<item>Instrument * Input Station(Only Face1)</item>
<item>Instrument * Skip(Only Face1)</item>
</string-array>
<string-array name="main_activity_setup_station_type">
<item>Phone * Last Station</item>
<item>Phone * Known Back Sight Setup Station</item>
<item>Phone * Resection Setup Station</item>
<item>Instrument * Input Station(Only Face1)</item>
<item>Instrument * Skip(Only Face1)</item>
</string-array>
<string-array name="navigation_display_items">
<item>Road</item>
<item>Feature coordinate</item>
<item>Mileage</item>
<item>Control coordinate</item>
<item>CAD</item>
</string-array>
<string-array name="navigation_source_items">
<item>Phone GPS</item>
<item>RTK</item>
</string-array>
<string-array name="tcs_backbreak_send_content_items">
<item>BackBreak</item>
<item>UpDown</item>
<item>LeftRight</item>
<item>Feature UpDown</item>
<item>Feature LeftRight</item>
<item>Measured XYZ</item>
</string-array>
<string-array name="xyz2k_send_content_items">
<item>Side move</item>
<item>Up Dwon</item>
<item>Kilometer</item>
<item>Distance to middle</item>
<item>Measured XYZ</item>
<item>Design Measured</item>
</string-array>
<string-array name="k2xyz_send_content_items">
<item>K move D move</item>
<item>Foreback leftRight move</item>
<item>Up Down</item>
<item>Measured XYZ</item>
<item>Design Measured</item>
</string-array>
<string-array name="side_send_content_items">
<item>BackBreak</item>
<item>UpDown</item>
<item>LeftRight</item>
<item>Feature UpDown</item>
<item>Feature LeftRight</item>
<item>Kilometer</item>
<item>Measured XYZ</item>
</string-array>
<string-array name="known_staking_fragment_send_content_items">
<item>K move D move</item>
<item>Foreback leftRight move</item>
<item>Up Down</item>
<item>Measured XYZ</item>
<item>Design Measured</item>
</string-array>
<string-array name="known_staking_activity_send_content_items">
<item>K move D move</item>
<item>Up Down</item>
<item>Measured XYZ</item>
<item>Design Measured</item>
</string-array>
<string-array name="cad_staking_send_content_items">
<item>K move D move</item>
<item>Up Down</item>
<item>Measured XYZ</item>
<item>Design Measured</item>
</string-array>
<string-array name="tts_speak_times">
<item>once</item>
<item>twice</item>
<item>three times</item>
</string-array>
<string-array name="tts_speak_times_values">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="multi_xy2k_result_choose_entries">
<item>Nearest to the midline</item>
<item>Minimum mileage</item>
<item>Maximum mileage</item>
<item>Nearest to the mileage</item>
</string-array>
<string-array name="multi_xy2k_result_choose_entry_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="xy2k_d_range_entries">
<item>Not limit</item>
<item>Input allow distance</item>
</string-array>
<string-array name="xy2k_d_range_entry_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="staking_move_method">
<item>Mileage</item>
<item>Left Right Fore Back</item>
<item>Direction</item>
</string-array>
<string-array name="road_parameter_list">
<item>Break Chain</item>
<item>Hor</item>
<item>Vertical</item>
<item>Standard Cross Section</item>
<item>Super</item>
<item>Widen</item>
<item>Tunnel Section Library</item>
<item>Tunnel Section Matching</item>
<item>Middle Offset</item>
<item>Center Up Down</item>
<item>Tunnel Feature Point</item>
<item>Tunnel Embedded</item>
<item>Tunnel Rotate</item>
<item>Side Section Library</item>
<item>Side Section Matching</item>
<item>SubWay Info</item>
<item>Tbm Ref</item>
<item>Pier Template Library</item>
<item>Bridge Pier Layout</item>
<item>Road Control Point</item>
</string-array>
<string-array name="navigation_map_type">
<item>Amap Map</item>
<item>Baidu Map</item>
<item>Tencent Map</item>
</string-array>
<string-array name="efp__sorting_types">
<item>By name, ascending</item>
<item>By name, descending</item>
<item>By size, ascending</item>
<item>By size, descending</item>
<item>By date, ascending</item>
<item>By date, descending</item>
</string-array>
<string-array name="efp__size_units">
<item>B</item>
<item>KB</item>
<item>MB</item>
<item>GB</item>
<item>TB</item>
<item>PB</item>
</string-array>
</resources>

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--以下全部为ChatUI的属性-->
<declare-styleable name="BubbleView">
<attr name="arrowWidth" format="dimension" />
<attr name="angle" format="dimension" />
<attr name="arrowHeight" format="dimension" />
<attr name="arrowPosition" format="dimension" />
<attr name="bubbleColor" format="color" />
<attr name="arrowLocation" format="enum">
<enum name="left" value="0x00" />
<enum name="right" value="0x01" />
<enum name="top" value="0x02" />
<enum name="bottom" value="0x03" />
</attr>
</declare-styleable>
<declare-styleable name="RotateLayout">
<!-- Child view of this layout will be rotated by this angle. -->
<attr name="rotate_angle" format="integer" />
</declare-styleable>
<declare-styleable name="TextItem">
<attr name="text" format="string" />
<attr name="text_size" format="dimension" />
<attr name="text_color" format="color" />
<attr name="dividerVisible" format="enum">
<enum name="visible" value="0" />
<enum name="invisible" value="1" />
</attr>
<attr name="text_gravity" format="enum">
<enum name="start" value="0" />
<enum name="center" value="1" />
<enum name="end" value="2" />
</attr>
</declare-styleable>
<declare-styleable name="TextItemWithDescribe">
<attr name="describeValue" format="string" />
</declare-styleable>
<declare-styleable name="customAttrs">
<attr name="efp__selected_item_background" format="reference" />
<attr name="efp__ic_action_cancel" format="reference" />
<attr name="efp__ic_action_deselect" format="reference" />
<attr name="efp__ic_action_grid" format="reference" />
<attr name="efp__ic_action_invert_selection" format="reference" />
<attr name="efp__ic_action_list" format="reference" />
<attr name="efp__ic_action_new_folder" format="reference" />
<attr name="efp__ic_action_ok" format="reference" />
<attr name="efp__ic_action_select_all" format="reference" />
<attr name="efp__ic_action_sort" format="reference" />
<attr name="efp__ic_action_storage" format="reference" />
</declare-styleable>
<declare-styleable name="SwitchWithText">
<attr name="name" format="string" />
<attr name="onText" format="string" />
<attr name="offText" format="string" />
<attr name="onChecked" format="boolean" />
</declare-styleable>
<declare-styleable name="EditSpinner">
<attr name="hint" format="string"/>
<attr name="rightImage" format="reference"/>
<attr name="Background" format="reference"/>
<attr name="maxLine" format="integer"/>
</declare-styleable>
</resources>

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--新增-->
<color name="bg_content_new">#f2f3f5</color>
<color name="hor_line">#f2f2f2</color>
<color name="text_color_1">#000</color>
<color name="text_color_2">#999</color>
<color name="text_color_desc">#F3AE42</color>
<color name="divide_line">#1A000000</color>
<color name="text_color_disable">#AAA</color>
<color name="green_gnss">#00B050</color>
<color name="yellow_gnss">#FFFF00</color>
</resources>

@ -0,0 +1,44 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="content_horizontal_margin">10dp</dimen>
<dimen name="content_vertical_margin">10dp</dimen>
<dimen name="content_small">5dp</dimen>
<!-- fragment_viewpager.xml -->
<dimen name="tab_layout_height">50dp</dimen>
<dimen name="item_height_record">80dp</dimen>
<dimen name="item_height_point">80dp</dimen>
<dimen name="app_bar_height">180dp</dimen>
<dimen name="fab_margin">16dp</dimen>
<dimen name="text_margin">16dp</dimen>
<!--calculator-->
<dimen name="calculator_norm_button_text">40sp</dimen>
<!-- chatui字体大小 -->
<dimen name="text_title">19sp</dimen>
<dimen name="text_subhead">17sp</dimen>
<dimen name="text_body">15sp</dimen>
<dimen name="text_caption">13sp</dimen>
<dimen name="divider_height">1dp</dimen>
<dimen name="default_elevation">1dp</dimen>
<dimen name="middle_text">18sp</dimen>
<dimen name="files_list_item_height">64dp</dimen>
<dimen name="files_list_item_thumbnail_size">60dp</dimen>
<dimen name="files_list_item_thumbnail_margin_right">8dp</dimen>
<dimen name="files_grid_item_thumbnail_size">60dp</dimen>
<dimen name="files_grid_item_thumbnail_margin">4dp</dimen>
<dimen name="files_grid_filename_text_size">12sp</dimen>
<dimen name="files_grid_item_size">100dp</dimen>
<dimen name="files_grid_item_margin_top">8dp</dimen>
<dimen name="files_grid_item_text_margin_side">4dp</dimen>
</resources>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item name="FriendLife_Position" type="id" />
<item name="menu_id_delete" type="id" />
</resources>

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="app_name">Control Network</string>
<string name="temperature_hint">Please enter the temperature</string>
<string name="humidity_hint">Please enter humidity</string>
<string name="air_pressure_hint">Please enter air pressure</string>
<string name="addition_constant_hint">Please enter the addition constant</string>
<string name="multiply_constant_hint">Please enter the multiplication constant</string>
<string name="instrument_height_hint">Please enter the instrument height</string>
<string name="notice_list_left_swipe_delete">Note: Swipe left on the list to delete it</string>
<string name="create_i_angle_detection">NEW I CORNER DETECTION</string>
<string name="please_choose">Please choose</string>
</resources>

@ -0,0 +1,157 @@
<resources>
<style name="CustomThemeLight" parent="Theme.AppCompat.Light.NoActionBar">
<!-- 窗口状态栏颜色可以设置为和背景色一致 -->
<item name="colorPrimaryDark">@color/white</item>
<!-- &lt;!&ndash; 窗口的背景,替代启动时候出现的白屏 &ndash;&gt;-->
<!-- <item name="android:windowBackground">@drawable/bg_splash</item>-->
<item name="android:textAllCaps">false</item>
</style>
<style name="CustomThemeDark" parent="Theme.AppCompat.NoActionBar">
<!-- 窗口状态栏颜色可以设置为和背景色一致 -->
<item name="colorPrimaryDark">@color/white</item>
<!-- &lt;!&ndash; 窗口的背景,替代启动时候出现的白屏 &ndash;&gt;-->
<!-- <item name="android:windowBackground">@drawable/bg_splash</item>-->
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="item_text">
<item name="android:textSize">25sp</item>
<item name="android:layout_margin">10dp</item>
<item name="android:layout_marginStart">20dp</item>
<item name="android:textColor">@color/black</item>
<item name="android:gravity">start|center_vertical</item>
</style>
<style name="small_item_text" parent="item_text">
<item name="android:textSize">18sp</item>
<item name="android:textColor">#99000000</item>
</style>
<style name="item_text_little_without_margin">
<item name="android:textSize">18sp</item>
<item name="android:textColor">#AA000000</item>
<item name="android:gravity">start|center_vertical</item>
</style>
<style name="text_surveyor_station_point">
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:maxLines">1</item>
<item name="android:gravity">center</item>
<item name="android:ellipsize">end</item>
<item name="android:textColor">@color/value_1_normal</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAppearance">?attr/textAppearanceListItemSecondary</item>
</style>
<style name="Dialog.FullScreen" parent="ThemeOverlay.AppCompat.Dialog">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowSoftInputMode">adjustResize</item>
</style>
<style name="animate_dialog">
<item name="android:windowEnterAnimation">@anim/slide_up</item>
<item name="android:windowExitAnimation">@anim/slide_down</item>
</style>
<style name="animate_full_dialog">
<item name="android:windowEnterAnimation">@anim/fade_in_quick</item>
<item name="android:windowExitAnimation">@anim/fade_out_quick</item>
</style>
<style name="DefaultButtonStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAllCaps">false</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:textSize">16sp</item>
<item name="cornerRadius">30dp</item>
</style>
<style name="label_text">
<item name="android:textColor">@color/black</item>
<item name="android:textSize">19sp</item>
</style>
<style name="alert_dialog_button_color" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog" />
<style name="alert_dialog_button_normal" parent="Widget.AppCompat.Button.Borderless" />
<!-- <style name="textview_add_button">-->
<!-- <item name="android:background">@drawable/transparent_ripple_bg</item>-->
<!-- <item name="android:clickable">true</item>-->
<!-- <item name="android:focusable">true</item>-->
<!-- <item name="android:gravity">center</item>-->
<!-- <item name="android:text">+</item>-->
<!-- <item name="android:textColor">?colorPrimary</item>-->
<!-- <item name="android:textSize">25sp</item>-->
<!-- <item name="android:paddingStart">20dp</item>-->
<!-- <item name="android:paddingEnd">20dp</item>-->
<!-- </style>-->
<style name="textview_title" parent="@android:style/TextAppearance.DialogWindowTitle" />
<style name="textview_content" parent="@android:style/TextAppearance.Widget.TextView" />
<style name="textview_small">
<item name="android:textAppearance">?attr/textAppearanceListItemSmall</item>
<item name="android:textSize">15sp</item>
</style>
<style name="my_checkbox">
<item name="android:checkboxStyle">
@style/Widget.MaterialComponents.Button.TextButton.Dialog.Flush
</item>
</style>
<style name="loading_dialog" parent="android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="ExFilePickerThemeCustom" parent="Theme.AppCompat.Light.NoActionBar">
<item name="efp__ic_action_cancel">@drawable/efp_dark__ic_action_cancel</item>
<item name="efp__ic_action_deselect">@drawable/efp_dark__ic_action_deselect</item>
<item name="efp__ic_action_grid">@drawable/efp_dark__ic_action_grid</item>
<item name="efp__ic_action_invert_selection">
@drawable/efp_dark__ic_action_invert_selection
</item>
<item name="efp__ic_action_list">@drawable/efp_dark__ic_action_list</item>
<item name="efp__ic_action_new_folder">@drawable/efp_dark__ic_action_new_folder</item>
<item name="efp__ic_action_ok">@drawable/efp_dark__ic_action_ok</item>
<item name="efp__ic_action_select_all">@drawable/efp_dark__ic_action_select_all</item>
<item name="efp__ic_action_sort">@drawable/efp_dark__ic_action_sort</item>
<item name="efp__ic_action_storage">@drawable/efp_dark__ic_action_storage</item>
</style>
<!-- <style name="textview_add_button_black">-->
<!-- <item name="android:background">@drawable/transparent_ripple_bg</item>-->
<!-- <item name="android:clickable">true</item>-->
<!-- <item name="android:focusable">true</item>-->
<!-- <item name="android:gravity">center</item>-->
<!-- <item name="android:text">+</item>-->
<!-- <item name="android:textColor">@color/black</item>-->
<!-- <item name="android:textSize">25sp</item>-->
<!-- <item name="android:paddingStart">20dp</item>-->
<!-- <item name="android:paddingEnd">20dp</item>-->
<!-- </style>-->
<style name="BottomDialogAnimation" parent="android:Animation">
<item name="android:windowEnterAnimation">@anim/dialog_enter_bottom</item>
<item name="android:windowExitAnimation">@anim/dialog_exit_bottom</item>
</style>
</resources>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

@ -0,0 +1,9 @@
import org.junit.Test;
public class TestCase {
@Test
public void test() {
}
}

@ -0,0 +1,37 @@
import org.junit.Test
class Hello {
@Test
fun main() {
// runBlocking {
// retrofit {
// api {
// val createService = RetrofitClient.createService<CommonService>()
// val passageData = createService.getPassageData()
// Log.d("hwhw","sfsdf")
// passageData
// }
// }
// }
// // 调用高阶函数
// kotlinDSL {
// // 这个 lambda 的接收者类型为StringBuilder
// append(" DSL")
// println(this)
// }
}
// 声明接收者
fun kotlinDSL(block: StringBuilder.() -> Unit) {
block(StringBuilder())
}
}

@ -0,0 +1,30 @@
buildscript {
repositories {
mavenCentral()
google()
maven { url 'https://oss.sonatype.org/content/groups/public/' }
maven { url 'https://developer.huawei.com/repo/' }
maven { url "https://jitpack.io" }
}
dependencies {
// classpath Libs.ButterKnife.plugin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
classpath "com.android.tools.build:gradle:7.3.1"
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
// classpath 'com.android.tools.build:gradle:7.4.2'
// classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10'
}
}
allprojects {
repositories {
flatDir { dirs 'libs' }
mavenCentral()
google()
maven { url 'https://jitpack.io' }
maven { url 'https://oss.sonatype.org/content/groups/public/' }
maven { url 'https://developer.huawei.com/repo/' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
}
}

@ -0,0 +1,7 @@
repositories {
mavenCentral()
}
plugins {
`kotlin-dsl`
}

@ -0,0 +1,9 @@
package com.bingce;
import org.gradle.api.Project;
public class AarCopyUtilsJava {
public static void configCopyTask(Project project, boolean aarOrJava) {
AarCopyUtilsKt.Companion.configCopyTask(project, aarOrJava);
}
}

@ -0,0 +1,79 @@
package com.bingce
import org.gradle.api.Project
import org.gradle.api.tasks.Copy
import java.io.File
class AarCopyUtilsKt {
companion object {
private fun copyToXXX(
taskName: String,
project: Project,
destination: String,
aarOrJava: Boolean
): Copy {
val projectName = project.name
return project.tasks.register(taskName, Copy::class.java) {
outputs.upToDateWhen { false }
from(if (aarOrJava) "build/outputs/aar/${projectName}-release.aar" else "build/libs/${projectName}.jar") // 源目录,这里假设生成物在 build/libs 目录下
into(destination) // 目标目录
enabled = destination.isNotEmpty() && destination.isNotBlank() // 取消任务
}.get()
}
fun configCopyTask(project: Project, aarOrJava: Boolean) {
val surveyorCopyTaskName = "copy2Surveyor"
val alphaCopyTaskName = "copy2Alpha"
val tjCopyTaskName = "copy2Tj"
val projectName = project.name
val copy2Surveyor =
copyToXXX(
surveyorCopyTaskName,
project,
"../../aar/${project.name}/",
aarOrJava
)
val bcFolder = BcFolder(project)
val alphaDestination = bcFolder.folderConfig("alpha.outputDir")?.let {
File(it, "bingceAAR\\${projectName}").absolutePath
} ?: ""
println("alphaDestination: $alphaDestination")
val copy2Alpha = copyToXXX(alphaCopyTaskName, project, alphaDestination, aarOrJava)
val tjDestination = bcFolder.folderConfig("tj.outputDir")?.let {
File(it, "aar\\${projectName}").absolutePath
} ?: ""
println("tjDestination: $tjDestination")
val copy2Tj = copyToXXX(tjCopyTaskName, project, tjDestination, aarOrJava)
// 设置任务依赖,确保在 assemble 任务执行完后执行拷贝任务
project.tasks.named("assemble").configure {
copy2Surveyor.enabled = true
finalizedBy(copy2Surveyor)
}
val nextTaskName1 = if (alphaDestination.isEmpty() || alphaDestination.isBlank()) {
surveyorCopyTaskName
} else {
project.tasks.named(surveyorCopyTaskName).configure {
copy2Alpha.enabled = true
finalizedBy(copy2Alpha)
}
alphaCopyTaskName
}
if (tjDestination.isNotEmpty() && tjDestination.isNotBlank()) {
project.tasks.named(nextTaskName1).configure {
copy2Tj.enabled = true
finalizedBy(copy2Tj)
}
}
}
}
}

@ -0,0 +1,34 @@
package com.bingce
import org.gradle.api.Project
import java.io.File
import java.io.FileInputStream
import java.util.Properties
class BcFolder(project: Project) {
private val NAME = "local.properties"
private val properties: Properties = Properties()
private val rootProject = project.rootProject
init {
val config1 = File(rootProject.projectDir.parent, NAME)
if (config1.exists()) {
properties.load(FileInputStream(config1))
} else {
properties.load(FileInputStream(project.rootProject.file(NAME)))
}
}
fun rootProjectDir(): File {
val bcFolder = properties.getProperty("bingce.dir")
if (bcFolder == null || bcFolder.isEmpty()) return rootProject.projectDir
return File(bcFolder)
}
fun folderConfig(folderKey: String): File? {
val folderString = properties.getProperty(folderKey)
if (folderString == null || folderString.isEmpty()) return null
return File(folderString)
}
}

@ -0,0 +1,25 @@
package com.bingce
import org.gradle.api.Project
import java.io.File
import java.io.FileInputStream
import java.util.Properties
class ConfigProperties(project: Project) {
private val NAME = "local.properties"
private val properties: Properties = Properties()
init {
val rootProject = project.rootProject
val config1 = File(rootProject.projectDir.parent, NAME)
if (config1.exists()) {
properties.load(FileInputStream(config1))
} else {
properties.load(FileInputStream(project.rootProject.file(NAME)))
}
}
fun getProperty(key: String?): String? {
return properties.getProperty(key)
}
}

@ -0,0 +1,44 @@
package com.bingce
import org.gradle.api.Project
import java.io.FileInputStream
import java.util.*
class ModuleName(project: Project) {
private val useAAR: String
private val useBaseAAR: String
init {
val properties = ConfigProperties(project)
useAAR = properties.getProperty("useAAR") ?: "true"
useBaseAAR = properties.getProperty("useBaseAAR") ?: "true"
}
fun bingceModule(name: String): String {
return if ("base" == name) {
if ("false" == useBaseAAR) {
":bingce:base"
} else {
":aar:base"
}
} else {
if ("false" == useAAR) {
":bingce:$name"
} else {
":aar:$name"
}
}
}
fun openSourceModule(name: String): String {
return if ("false" == useAAR) {
":opensource:$name"
} else {
":aar:$name"
}
}
fun isUseAAR(): Boolean {
return useAAR == "true"
}
}

@ -0,0 +1,13 @@
package com.bingce
object Sample{
const val applicationId = "com.bingce.sample"
const val versionCode = 1
const val versionName = "1"
const val minSdkVersion = 21
const val targetSdkVersion = 28
const val compileSdkVersion = 31
const val buildToolsVersion = AndroidSdk.buildToolsVersion
}

@ -0,0 +1,27 @@
package com.bingce
import org.gradle.api.Project
import java.util.Calendar
class SurveyorVersionUtils(project: Project) {
val versionCode: Int
val versionName: String
val mappingFolder: String
init {
val cale = Calendar.getInstance();
val year = cale.get(Calendar.YEAR);
val month = cale.get(Calendar.MONTH) + 1;
val day = cale.get(Calendar.DATE);
val hour = cale.get(Calendar.HOUR_OF_DAY);
val minute = cale.get(Calendar.MINUTE);
val second = cale.get(Calendar.SECOND);
versionCode = (year - 2000) * 100000 + month * 1000 + day * 10
versionName = "" + (year - 2010) + "." + month + "." + day + "." + hour + "." + minute
//检测mapping folder
val properties = ConfigProperties(project)
mappingFolder = properties.getProperty("mapping.dir") ?: ""
}
}

@ -0,0 +1,29 @@
package com.bingce
object App {
object Surveyor {
const val applicationId = "cn.liuyanbing.surveyor"
}
object Alpha {
const val applicationId = "zone.a.dimap"
}
object SurveyorPad {
const val applicationId = "com.bingce.pad"
const val versionCode = 2303130
const val versionName = "1.0.0"
}
object ControlNetwork {
const val applicationId = "com.bingce.controlnetwork"
const val versionCode = 2212130
const val versionName = "1.6.221213"
}
object GnssServer {
const val applicationId = "com.bingce.gnssserver"
const val versionCode = 2212060//注意同步更新DeviceUtil里的checkIfGnssServerReady里的版本
const val versionName = "1.0.221206"
}
}

@ -0,0 +1,257 @@
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bingce
import org.gradle.api.JavaVersion
object AndroidSdk {
const val minSdkVersion = 26 //POI库要求最低26
const val targetSdkVersion = 31
const val compileSdkVersion = 34
const val buildToolsVersion = "33.0.0"
private const val junitVersion = "4.13.2"
const val junit = "junit:junit:$junitVersion"
const val runner = "androidx.test:runner:1.4.0"
const val core = "androidx.test:core:1.4.0"
const val testJunit = "androidx.test.ext:junit:1.1.5"
const val testEspresso = "androidx.test.espresso:espresso-core:3.1.0"
const val androidJUnitRunner = "androidx.test.runner.AndroidJUnitRunner"
val javaVersion: JavaVersion = JavaVersion.VERSION_1_8
}
object Kotlin {
private const val kotlinVersion = "1.9.10"
const val sdk = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
const val corountine = "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9"
const val plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
object AndroidX {
const val appcompat = "androidx.appcompat:appcompat:1.6.1"
const val localBroadcastManager = "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
const val swipeRefreshLayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
private const val legacyVersion = "1.0.0"
const val legacySupport = "androidx.legacy:legacy-support-v4:$legacyVersion"
const val legacyPreference = "androidx.legacy:legacy-preference-v14:$legacyVersion"
const val preference = "androidx.preference:preference:1.1.1"
const val multidex = "androidx.multidex:multidex:2.0.1"
const val cardView = "androidx.cardview:cardview:1.0.0"
const val recyclerview = "androidx.recyclerview:recyclerview:1.2.1"
const val annotationz = "androidx.annotation:annotation:1.1.0"
const val documentFile = "androidx.documentfile:documentfile:1.0.1"
const val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.4"
const val material = "com.google.android.material:material:1.8.0"
const val materialDialogs = "com.afollestad.material-dialogs:core:0.9.6.0"
const val vectorDrawable = "androidx.vectordrawable:vectordrawable:1.1.0"
object Core {
const val coreKtx = "androidx.core:core-ktx:1.9.0"
}
object Paging {
private const val version = "3.2.1"
const val runtime = "androidx.paging:paging-runtime:$version"
const val common = "androidx.paging:paging-common:$version"
}
object Lifecycle {
private const val lifecycleVersion = "2.2.0"
const val extensions = "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion"
const val viewModel = "androidx.lifecycle:lifecycle-viewmodel:$lifecycleVersion"
const val runtimeKt = "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0";
const val viewModelKt = "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0";
}
object Room {
private const val version = "2.6.1"
const val runtime = "androidx.room:room-runtime:$version"
const val ktx = "androidx.room:room-ktx:$version"
const val compiler = "androidx.room:room-compiler:$version"
const val paging = "androidx.room:room-paging:$version"
}
object Ktx {
private const val version = "1.8.0"
const val activity = "androidx.activity:activity-ktx:$version"
const val fragment = "androidx.fragment:fragment-ktx:1.2.5"
}
}
object Libs {
const val eventBus = "org.greenrobot:eventbus:3.1.1"
object ButterKnife {
private const val version = "10.2.3"
const val core = "com.jakewharton:butterknife:$version"
const val compiler = "com.jakewharton:butterknife-compiler:$version"
const val plugin = "com.jakewharton:butterknife-gradle-plugin:$version"
}
const val jPinYin = "com.github.stuxuhai:jpinyin:1.0"
const val switchIcon = "com.github.zagum:Android-SwitchIcon:1.4.0"
const val zxing = "com.google.zxing:core:3.2.1"
object Rx {
const val rxJava = "io.reactivex.rxjava2:rxjava:2.2.8"
const val rxAndroid = "io.reactivex.rxjava2:rxandroid:2.1.1"
}
object POI {
const val slf4j_api = "org.slf4j:slf4j-api:1.7.30"
const val jcl_over_slf4j = "org.slf4j:jcl-over-slf4j:1.7.30"
const val poi_ooxml = "org.apache.poi:poi-ooxml:4.1.2"//4.0.1版本会造成无法识别Poi的类例如Cell,高于4.1.2又会导致读写xls异常,提示provider未找到,所以4.1.2是最好的选着,不好的一点是,4.1.2要求在minsdk>26(Android8)以上才能编译
const val aalto_xml = "com.fasterxml:aalto-xml:1.3.0"
const val stax_api = "stax:stax-api:1.0.1"
const val commons_jexl3 = "org.apache.commons:commons-jexl3:3.2"
const val commons_beanutils = "commons-beanutils:commons-beanutils:1.9.4"
const val logback_core = "ch.qos.logback:logback-core:1.2.10"
const val commons_compress = "org.apache.commons:commons-compress:1.21"
const val commons_lang3 = "org.apache.commons:commons-lang3:3.7"
}
object UMeng {
const val common = "com.umeng.umsdk:common:9.6.6"
const val asms = "com.umeng.umsdk:asms:1.8.0"
const val apm = "com.umeng.umsdk:apm:1.9.4"
}
object RxHttp {
const val core = "com.ljx.rxhttp:rxhttp:2.5.5"
const val compiler = "com.ljx.rxhttp:rxhttp-compiler:2.5.5"
}
object Retrofit2 {
const val core = "com.squareup.retrofit2:retrofit:2.9.0"
const val converterFastjson = "org.ligboy.retrofit2:converter-fastjson-android:2.1.0"
}
const val scanplus = "com.huawei.hms:scanplus:2.12.0.301"
object Glide {
private const val version = "4.9.0"
const val core = "com.github.bumptech.glide:glide:$version"
const val compiler = "com.github.bumptech.glide:compiler:$version"
}
object RxImagePicker {
private const val version = "2.5.6"
const val core = "com.github.qingmei2:rximagepicker:$version"
const val support = "com.github.qingmei2:rximagepicker_support:$version"
const val supportWechat = "com.github.qingmei2:rximagepicker_support_wechat:$version"
}
object OkHttp {
private const val version = "4.9.0"
const val core = "com.squareup.okhttp3:okhttp:$version"
const val loggingInterceptor = "com.squareup.okhttp3:logging-interceptor:$version"
}
// const val fastJson = "com.alibaba:fastjson:1.1.71.android"
object Iconics {
private const val version = "3.2.5"
const val core = "com.mikepenz:iconics-core:$version"
const val views = "com.mikepenz:iconics-views:$version"
const val materialIconicTypeface =
"com.mikepenz:material-design-iconic-typeface:2.2.0.4@aar"
const val typeiconsTypeface = "com.mikepenz:typeicons-typeface:2.0.7.4@aar"
}
object Filament {
private const val version = "1.49.1"
const val android = "com.google.android.filament:filament-android:$version"
const val gltfio = "com.google.android.filament:gltfio-android:$version"
const val utils = "com.google.android.filament:filament-utils-android:$version"
}
const val compressor = "id.zelory:compressor:2.1.1"//图片压缩工具
const val picasso = "com.squareup.picasso:picasso:2.71828"
const val rubberStamp = "com.vinaygaba:rubberstamp:1.0.0"//图像处理
const val photoView = "com.github.chrisbanes:PhotoView:2.1.3"//图片缩放库
const val circleImage = "de.hdodenhof:circleimageview:3.0.1"//圆角图片
const val realmPlugin = "io.realm:realm-gradle-plugin:5.14.0"
const val objectBox = "io.objectbox:objectbox-gradle-plugin:3.5.1"
const val materialEditText = "com.rengwuxian.materialedittext:library:2.1.4"
const val swipeLayout = "com.daimajia.swipelayout:library:1.2.0@aar"
const val recyclerviewAnimator = "jp.wasabeef:recyclerview-animators:2.2.7"
const val fabButton = "com.github.clans:fab:1.6.4"//悬浮按钮
const val datePicker = "cn.aigestudio.datepicker:DatePicker:2.2.0"//时间选择器
const val changeLog = "com.github.gabrielemariotti.changeloglib:changelog:2.1.0"//变更日志库
const val flycoTabLayout = "com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar"//标签库
// const val utilCodex = "com.blankj:utilcodex:1.31.0"//工具类工具\
const val materialAbout = "com.github.jrvansuita:MaterialAbout:0.2.4"//界面风格工具
const val banner = "com.youth.banner:banner:2.1.0"//轮播图
const val webChatSdk = "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.4.3"//腾讯opensdk
const val appUpdate = "com.github.jenly1314.AppUpdater:app-updater:1.1.3"//app版本更新
const val rootBeer = "com.scottyab:rootbeer-lib:0.0.7"//root检查
const val tabBar = "devlight.io:navigationtabbar:1.2.5"//tabBar
const val agentWeb = "com.just.agentweb:agentweb:4.1.2"//网页加载工具
const val tencentSonic = "com.tencent.sonic:sdk:2.0.0"//腾讯网页加载工具
const val downloader = "com.download.library:Downloader:4.1.2"//下载工具
const val keyboardVisibility =
"net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.3.0"//软件盘监听工具
const val progressBar = "com.daimajia.numberprogressbar:library:1.4@aar"//进度条
// const val fastBle = "clj.fastble:FastBleLib:2.3.4"//蓝牙ble
object FastAdapter {
private const val version = "3.3.1"
const val core = "com.mikepenz:fastadapter:$version"
const val itemanimators = "com.mikepenz:itemanimators:1.1.0"
}
const val pickerView = "com.contrarywind:Android-PickerView:4.1.9"
const val unCrop = "com.github.yalantis:ucrop:2.2.7"
const val imageTextButton = "cn.dxjia:imagetextbutton:1.0.0"
const val threadPoster = "com.techyourchance:threadposter:1.0.1"
const val fileDownloader = "com.liulishuo.filedownloader:library:1.7.7"
const val gson = "com.google.code.gson:gson:2.8.9"
object LeanCloud {
private const val version = "8.2.16"
const val storage = "cn.leancloud:storage-android:$version"
const val realtime = "cn.leancloud:realtime-android:$version"
}
const val dragExpandGrid = "com.nineoldandroids:library:2.4.0"//动画效果库
const val giftDrawable = "pl.droidsonroids.gif:android-gif-drawable:1.2.23"//加载gif图
const val xxPermissions = "com.github.getActivity:XXPermissions:18.5"
const val httpLegacy = "org.apache.http.legacy"
// const val usbSerial4Android = "com.github.mik3y:usb-serial-for-android:3.4.3"
const val serialPort = "io.github.xmaihh:serialport:2.1.1"
const val timber = "com.jakewharton.timber:timber:4.7.1"
const val loadingView = "com.ldoublem.loadingview:loadingviewlib:1.0"
const val gjygitEditext="com.github.gjygit:editext:3.0"
object RefreshLayout {
private const val version = "2.0.5"
const val kernel = "io.github.scwang90:refresh-layout-kernel:$version"//核心必须依赖
const val header = "io.github.scwang90:refresh-header-classics:$version"//经典刷新头
const val footer = "io.github.scwang90:refresh-footer-classics:$version"//经典加载
}
}

@ -0,0 +1,50 @@
package com.bingce.flavor;
import java.util.ArrayList;
import java.util.List;
public class FlavorItems {
public static class FlavorItem {
public final String name;
public final String STRING_APP;
public final int CHANNEL_TYPE;
public FlavorItem(String name, String string_app, int channel_type) {
this.name = name;
STRING_APP = string_app;
CHANNEL_TYPE = channel_type;
}
}
public static List<FlavorItem> flavorItemList(String configs) {
List<FlavorItem> flavorItemList = new ArrayList<>();
String[] contentArray = configs.split("\n");
String name = "";
String STRING_APP = "测量员";
int CHANNEL_TYPE = 0;
for (String str : contentArray) {
if (str.startsWith("{")) {
name = "";
STRING_APP = "测量员";
CHANNEL_TYPE = 0;
} else if (str.startsWith("}")) {
flavorItemList.add(new FlavorItem(name, STRING_APP, CHANNEL_TYPE));
} else {
str = str.trim();
String[] array = str.split("=");
if ("name".equals(array[0])) {
name = array[1];
} else if ("STRING_APP".equals(array[0])) {
STRING_APP = array[1];
} else if ("CHANNEL_TYPE".equals(array[0])) {
CHANNEL_TYPE = Integer.parseInt(array[1]);
}
}
}
return flavorItemList;
}
}

@ -0,0 +1,25 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
#org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx8000m -XX:MaxPermSize=8000m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
#android.jetifier.blacklist = doNot.*\\.jar
#android.enableAapt2=false
MAPBOX_DOWNLOADS_TOKEN=sk.eyJ1IjoieWFuYmluZzE3NyIsImEiOiJja2p6dHRleHgwYXdiMnhycmZrdXdmY3l0In0.GDgDxGT_JPn4YCsYvh82rA
# all surveyor control
app=all

Binary file not shown.

@ -0,0 +1,6 @@
#Fri Sep 16 16:02:22 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

164
gradlew vendored

@ -0,0 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored

@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

@ -0,0 +1,36 @@
ECLIPSE ANDROID PROJECT IMPORT SUMMARY
======================================
Ignored Files:
--------------
The following files were *not* copied into the new Gradle project; you
should evaluate whether these are still needed in your project and if
so manually move them:
* .gitignore
* proguard-project.txt
Moved Files:
------------
Android Gradle projects use a different directory structure than ADT
Eclipse projects. Here's how the projects were restructured:
* AndroidManifest.xml => tableFixHeaders\src\main\AndroidManifest.xml
* assets\ => tableFixHeaders\src\main\assets
* res\ => tableFixHeaders\src\main\res\
* src\ => tableFixHeaders\src\main\java\
Next Steps:
-----------
You can now build the project. The Gradle project needs network
connectivity to download dependencies.
Bugs:
-----
If for some reason your project does not build, and you determine that
it is due to a bug or limitation of the Eclipse to Gradle importer,
please file a bug at http://b.android.com with category
Component-Tools.
(This import summary is for your information only, and can be deleted
after import once you are satisfied with the results.)

@ -0,0 +1,145 @@
include ':app'
def properties = properties(rootProject)
def bcDir = properties.getProperty('bingce.dir')
if (bcDir == null || bcDir.empty) throw new RuntimeException("需要在local.properties中设置bingce.dir路径")
// Git
def listGitBranches(File gitDirectory) {
def command = ['git', 'symbolic-ref', '--short', '-q', 'HEAD']
def processBuilder = new ProcessBuilder(command)
// Git
processBuilder.directory(gitDirectory)
//
def process = processBuilder.start()
def reader = new BufferedReader(new InputStreamReader(process.inputStream))
def branches = []
String line
while ((line = reader.readLine()) != null) {
return line
}
//
def exitCode = process.waitFor()
if (exitCode != 0) {
//
throw new RuntimeException("Git command failed with exit code ${exitCode}")
}
return ""
}
// Git getGitBranch
//def gitDirectory = new File(bcDir)
//def currentBranch = listGitBranches(gitDirectory)
//
//if (currentBranch != "master_alpha_tj_offline") throw new RuntimeException("需要将${bcDir}仓库切换到master_alpha_tj_offline分支")
static def properties(ProjectDescriptor rootProject) {
Properties properties = new Properties()
properties.load(new File(rootProject.projectDir, 'local.properties').newDataInputStream())
return properties
}
static def bingceModule(ProjectDescriptor rootProject, String name) {
def properties = properties(rootProject)
def useAAR = properties.getProperty('useAAR')
def useBaseAAR = properties.getProperty('useBaseAAR')
if ("base" == name) {
if ("false" == useBaseAAR && "false" == useAAR) {
return ":bingce:base"
} else {
return ":aar:base"
}
}
if ("false" == useAAR) {
return ":bingce:$name"
} else {
return ":aar:$name"
}
}
static def openSourceModule(ProjectDescriptor rootProject, String name) {
def properties = properties(rootProject)
def useAAR = properties.getProperty('useAAR')
if ("false" == useAAR) {
return ":opensource:$name"
} else {
return ":aar:$name"
}
}
static def includeBingceModule(Settings settings, ProjectDescriptor rootProject, String bcDir, String name) {
def moduleName = bingceModule(rootProject, name)
settings.include(moduleName)
if (moduleName == ":aar:base") return // base projectDir
settings.project(moduleName).projectDir = new File(bcDir, "bingce/$name")
}
static def includeOpenSourceModule(Settings settings, ProjectDescriptor rootProject, String bcDir, String name) {
settings.include(openSourceModule(rootProject, name))
settings.project(openSourceModule(rootProject, name)).projectDir = new File(bcDir, "opensource/$name")
}
static def includeSdkModule(Settings settings, ProjectDescriptor rootProject, String bcDir, String name) {
def moduleName = ":sdk:$name"
settings.include(moduleName)
settings.project(moduleName).projectDir = new File(bcDir, "sdk/$name")
}
includeBingceModule(settings, rootProject, bcDir, "base")
includeBingceModule(settings, rootProject, bcDir, "base-java")
includeBingceModule(settings, rootProject, bcDir, "appBase")
includeBingceModule(settings, rootProject, bcDir, "leancloud")
includeBingceModule(settings, rootProject, bcDir, "repository")
includeBingceModule(settings, rootProject, bcDir, "coordlib")
includeBingceModule(settings, rootProject, bcDir, "device")
includeBingceModule(settings, rootProject, bcDir, "device-ui")
includeBingceModule(settings, rootProject, bcDir, "utils")
includeBingceModule(settings, rootProject, bcDir, "totalstation")
includeBingceModule(settings, rootProject, bcDir, "rtk")
includeBingceModule(settings, rootProject, bcDir, "level")
includeBingceModule(settings, rootProject, bcDir, "bc-dialog")
includeBingceModule(settings, rootProject, bcDir, "DialogXInterface")
includeBingceModule(settings, rootProject, bcDir, "bcdialog-style")
includeOpenSourceModule(settings, rootProject, bcDir, "hellocharts")
includeOpenSourceModule(settings, rootProject, bcDir, "gson")
includeOpenSourceModule(settings, rootProject, bcDir, "fastjson")
includeOpenSourceModule(settings, rootProject, bcDir, "javadxf")
includeOpenSourceModule(settings, rootProject, bcDir, "utilcode")
includeOpenSourceModule(settings, rootProject, bcDir, "colorful")
includeOpenSourceModule(settings, rootProject, bcDir, "dragExpandGrid")
includeOpenSourceModule(settings, rootProject, bcDir, "lsettingitemlibrary")
includeOpenSourceModule(settings, rootProject, bcDir, "spinkit")
includeOpenSourceModule(settings, rootProject, bcDir, "splashview")
includeOpenSourceModule(settings, rootProject, bcDir, "poishadowjar")
includeOpenSourceModule(settings, rootProject, bcDir, "safFilePicker")
includeOpenSourceModule(settings, rootProject, bcDir, "exFilePicker")
includeOpenSourceModule(settings, rootProject, bcDir, "agentweb")
includeOpenSourceModule(settings, rootProject, bcDir, "fastBle")
includeOpenSourceModule(settings, rootProject, bcDir, "socket-core")
includeOpenSourceModule(settings, rootProject, bcDir, "socket-common-interface")
includeOpenSourceModule(settings, rootProject, bcDir, "socket-client")
includeOpenSourceModule(settings, rootProject, bcDir, "socket-usbSerialForAndroid")
includeOpenSourceModule(settings, rootProject, bcDir, "usbSerialForAndroid")
includeOpenSourceModule(settings, rootProject, bcDir, "menuItemBadge")
includeOpenSourceModule(settings, rootProject, bcDir, "triangle-library")
includeSdkModule(settings, rootProject, bcDir, "jama")
includeSdkModule(settings, rootProject, bcDir, "libqxwz-sdkcore")
includeSdkModule(settings, rootProject, bcDir, "libsixents-sdkcore")
includeSdkModule(settings, rootProject, bcDir, "cmccSdk")
includeSdkModule(settings, rootProject, bcDir, "luowangSdk")
includeSdkModule(settings, rootProject, bcDir, "ruide-extension-sdk")
includeSdkModule(settings, rootProject, bcDir, "huaceRtkSdk")
includeSdkModule(settings, rootProject, bcDir, "southGnssSdk")
includeSdkModule(settings, rootProject, bcDir, "tensorFlowTTS")
Loading…
Cancel
Save