diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 8199d50..83da877 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -5,6 +5,8 @@
cmake_minimum_required(VERSION 3.4.1)
+project("native-lib")
+
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
@@ -41,4 +43,6 @@ target_link_libraries( # Specifies the target library.
# Links the target library to the log library
# included in the NDK.
- ${log-lib} )
\ No newline at end of file
+ ${log-lib} )
+
+set_target_properties(native-lib PROPERTIES LINK_FLAGS "-Wl,-z,max-page-size=16384")
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 42d55b4..de4dba2 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,10 +1,12 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
-apply plugin: "com.tencent.android.tpns"
+plugins {
+ id 'com.android.application'
+ id 'org.jetbrains.kotlin.android'
+// id 'kotlin-kapt'
+ id 'com.tencent.android.tpns'
+}
def appName() {
- return "TT"
+ return "TTSTDUtils"
}
def releaseTime() {
@@ -12,20 +14,25 @@ def releaseTime() {
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.1"
+ namespace "com.ttstd.ttutils"
+
+ compileSdkVersion 36
+ buildToolsVersion "36.0.0"
defaultConfig {
applicationId "com.ttstd.ttutils"
//https://github.com/flutter/flutter/issues/58758
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
minSdkVersion 26
- targetSdkVersion 30
+ targetSdkVersion 36
+
// versionCode 1
// versionName "1.0"
- multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+
+ multiDexEnabled true
+
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
@@ -38,20 +45,41 @@ android {
//添加
exclude 'META-INF/rxjava.properties'
}
+
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
- abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
+ abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
// 还可以添加 'armeabi' , 'x86', 'x86_64', 'mips', 'mips64'
}
+
+ lintOptions {
+ checkReleaseBuilds false
+ // Or, if you prefer, you can continue to check for errors in release builds,
+ // but continue the build even when errors are found:
+ abortOnError false
+ }
+
manifestPlaceholders = [
XG_ACCESS_ID : "1500026407",
XG_ACCESS_KEY: "AQ6C6W1O19LT",
]
- dataBinding {
- enabled true
- }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ // 添加 Kotlin 编译选项
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ buildFeatures {
+ dataBinding true
+ buildConfig true
+ aidl true
}
externalNativeBuild {
@@ -60,18 +88,6 @@ android {
}
}
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- lintOptions {
- checkReleaseBuilds false
- }
-
- dexOptions {
- jumboMode true
- }
//多版本
productFlavors {
@@ -312,9 +328,31 @@ android {
v2SigningEnabled true
}
+ BCM310 {
+ storeFile file("keystore/BCM310.keystore")
+ storePassword "123456"
+ keyAlias "bcm310"
+ keyPassword "123456"
+ v1SigningEnabled true
+ v2SigningEnabled true
+ }
}
buildTypes {
+ BCM310Debug.initWith(debug)
+ BCM310Debug {
+ versionNameSuffix "-debug"
+ debuggable true
+ signingConfig signingConfigs.BCM310
+ buildConfigField "String", "platform", '"HL500"'
+ }
+
+ BCM310Release.initWith(release)
+ BCM310Release {
+ signingConfig signingConfigs.BCM310
+ buildConfigField "String", "platform", '"HL500"'
+ }
+
MT6789Debug.initWith(debug)
MT6789Debug {
buildConfigField "String", "platform", '"G12NL"'
@@ -568,49 +606,28 @@ android {
debug {
buildConfigField "String", "platform", '"MTK"'
- // 不显示Log
- //buildConfigField "boolean", "LOG_DEBUG", "false"
- //
- versionNameSuffix "-debug"
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- //Zipalign优化
- zipAlignEnabled true
+ versionNameSuffix "_debug"
signingConfig signingConfigs.xueshibao
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- def outputFile = output.outputFile
- if (outputFile != null) {
- def fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType.name}.apk"
- output.outputFileName = fileName
- }
- }
- }
}
release {
buildConfigField "String", "platform", '"MTK"'
- //混淆
minifyEnabled false
- //前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- //Zipalign优化
- zipAlignEnabled true
- //签名
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.xueshibao
- //将release版本的包名重命名,加上版本及日期
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- def outputFile = ""
- if (outputFile != null) {
- def fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${productFlavors[0].name}_${buildType.name}.apk"
- output.outputFileName = fileName
- }
- }
- }
}
}
+ android.applicationVariants.all { variant ->
+ variant.outputs.all { output -> // 改为 all
+ def buildType = variant.buildType.name
+ if (buildType.contains("debug")) {
+ outputFileName = "${appName()}_V${defaultConfig.versionName}_${releaseTime()}.apk"
+ } else {
+ outputFileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType}.apk"
+ }
+ }
+ }
}
@@ -624,6 +641,8 @@ dependencies {
implementation project(':viewlibrary')
implementation project(path: ':niceimageview')
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ // activity_main.xml 直接使用了 com.suke.widget.SwitchButton,需在本模块声明依赖
+ implementation 'com.github.zcweng:switch-button:0.0.3@aar'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
@@ -650,6 +669,9 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+ //内存泄漏检测
+ debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'
+
////三方
//RxJava
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
@@ -666,14 +688,13 @@ dependencies {
implementation 'com.trello.rxlifecycle4:rxlifecycle-android-lifecycle:4.0.2'
//okhttp
- implementation 'com.squareup.okhttp3:okhttp:4.9.3'
- implementation 'com.squareup.moshi:moshi:1.9.3'
+ implementation 'com.squareup.okhttp3:okhttp:5.4.0'
//4.9.3最后一个4.x版本
//Retrofit
- implementation 'com.squareup.retrofit2:retrofit:2.9.0'
- implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
+ implementation 'com.squareup.retrofit2:retrofit:3.0.0'
+ implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
// implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
- implementation "com.squareup.retrofit2:adapter-rxjava3:2.9.0"
+ implementation "com.squareup.retrofit2:adapter-rxjava3:3.0.0"
//磁盘缓存
implementation 'com.jakewharton:disklrucache:2.0.2'
//Google
@@ -684,34 +705,27 @@ dependencies {
//Jackson
implementation 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
implementation 'org.codehaus.jackson:jackson-core-asl:1.9.13'
- //view绑定
- implementation 'com.jakewharton:butterknife:10.2.3'
-// If you are using Kotlin, replace annotationProcessor with kapt.
-// annotationProcessor rootProject.ext.dependencies["butterknife-compiler"]
- annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
//MMKV
- implementation 'com.tencent:mmkv-static:1.2.13'
+ implementation 'com.tencent:mmkv-static:2.4.0'
//Bugly
- implementation 'com.tencent.bugly:crashreport:4.0.0'
+ implementation 'com.tencent.bugly:crashreport:4.1.9.3'
//腾讯移动推送 TPNS
- implementation 'com.tencent.tpns:tpns:1.2.2.0-release'
+ implementation "com.tencent.tpns:tpns:1.4.4.11-release"
- //内存泄漏检测
- debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
////图片加载框架
//Glide
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
//Fresco
- implementation 'com.facebook.fresco:fresco:2.2.0'
+ implementation 'com.facebook.fresco:fresco:3.7.0'
//Picasso
implementation 'com.squareup.picasso:picasso:2.71828'
//个人
//utilcode工具类
- implementation 'com.blankj:utilcodex:1.30.6'
+ implementation 'com.blankj:utilcodex:1.31.1'
//更换字体框架
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
//屏幕适配方案
@@ -722,17 +736,17 @@ dependencies {
//滑动返回
implementation 'com.github.bingoogolapple:BGASwipeBackLayout-Android:2.0.2'
//圆角
- implementation 'de.hdodenhof:circleimageview:2.2.0'
+ implementation 'de.hdodenhof:circleimageview:3.1.0'
// 圆角ImageView
// implementation 'com.github.zane618:NiceImageView:1.0.0'
// 权限请求框架:https://github.com/getActivity/XXPermissions
- implementation 'com.github.getActivity:XXPermissions:12.3'
+ implementation 'com.github.getActivity:XXPermissions:28.3'
// 吐司框架:https://github.com/getActivity/Toaster
implementation 'com.github.getActivity:Toaster:12.6'
//动态权限框架
implementation 'com.yanzhenjie:permission:2.0.3'
//沉浸状态栏
- implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
+ implementation 'com.gitee.zackratos:UltimateBarX:0.8.1'
// implementation 'com.gyf.barlibrary:barlibrary:2.2.8'
// 基础依赖包,必须要依赖
@@ -746,24 +760,12 @@ dependencies {
}
-preBuild {
- doLast {
- def imlFile = file(project.name + ".iml")
- println 'Change ' + project.name + '.iml order'
- try {
- def parsedXml = (new XmlParser()).parse(imlFile)
- def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
- parsedXml.component[1].remove(jdkNode)
- def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform"
- println 'what' + sdkString
- new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
- groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
- } catch (FileNotFoundException e) {
- // nop, iml not found
- println "no iml found"
- }
+// 在 dependencies 之后添加
+project.afterEvaluate {
+ android.applicationVariants.all { variant ->
+ variant.javaCompileProvider.get().options.bootstrapClasspath = files(
+ file('libs/framework.jar'),
+ android.getBootClasspath()
+ )
}
- //https://www.pianshen.com/article/93481144911/
- //https://blog.csdn.net/dhl_1986/article/details/102856026
- //使用系统编译后的framework.jar
}
diff --git a/app/keystore/BCM310.keystore b/app/keystore/BCM310.keystore
new file mode 100644
index 0000000..aff7eb0
Binary files /dev/null and b/app/keystore/BCM310.keystore differ
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a278b60..31a0aa2 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -24,6 +24,7 @@
+
@@ -38,7 +39,7 @@
-
+
@@ -52,49 +53,60 @@
-
+
-
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
@@ -106,7 +118,7 @@
@@ -155,7 +167,8 @@
-
+
diff --git a/app/src/main/java/com/ttstd/ttutils/activity/KotlinMainActivity.kt b/app/src/main/java/com/ttstd/ttutils/activity/KotlinMainActivity.kt
index 53a98e3..3a1caba 100644
--- a/app/src/main/java/com/ttstd/ttutils/activity/KotlinMainActivity.kt
+++ b/app/src/main/java/com/ttstd/ttutils/activity/KotlinMainActivity.kt
@@ -9,17 +9,17 @@ import android.os.Environment
import android.os.IBinder
import android.util.Log
import android.widget.Button
+import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.notepad.uiui.INoteAidlInterface
import com.ttstd.ttutils.R
import com.ttstd.ttutils.utils.java.DevicesUtils
-import kotlinx.android.synthetic.main.activity_main.*
import me.jessyan.autosize.internal.CancelAdapt
import java.io.File
-
class KotlinMainActivity : AppCompatActivity(), CancelAdapt {
lateinit var button: Button
+ lateinit var textView: TextView
private val INSTALLAPK_ACTION = "JGY_INSTALLAPK_ACTION"
private val INSTALLAPK_PREMISSIONS = "com.jiaoguanyi.appstore.permissions.INSTALL_APK"
lateinit var filePath: String
diff --git a/app/src/main/java/com/ttstd/ttutils/activity/main/MainAContact.java b/app/src/main/java/com/ttstd/ttutils/activity/main/MainAContact.java
deleted file mode 100644
index 5daf58b..0000000
--- a/app/src/main/java/com/ttstd/ttutils/activity/main/MainAContact.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package com.ttstd.ttutils.activity.main;
-
-import com.ttstd.ttutils.mvp.BasePresenter;
-import com.ttstd.ttutils.mvp.BaseView;
-
-public class MainAContact {
- public interface MainView extends BaseView {
- void testRetrofit();
- }
-
- public interface Presenter extends BasePresenter {
- void testRetrofitFinish();
- }
-}
diff --git a/app/src/main/java/com/ttstd/ttutils/activity/main/MainAPresenter.java b/app/src/main/java/com/ttstd/ttutils/activity/main/MainAPresenter.java
deleted file mode 100644
index 024facd..0000000
--- a/app/src/main/java/com/ttstd/ttutils/activity/main/MainAPresenter.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.ttstd.ttutils.activity.main;
-
-import android.content.Context;
-import android.util.Log;
-
-import com.trello.rxlifecycle4.LifecycleProvider;
-import com.trello.rxlifecycle4.android.ActivityEvent;
-
-import io.reactivex.rxjava3.subjects.BehaviorSubject;
-
-
-/**
- * MainActivity 的 Presenter
- *
- * @author jgy02
- */
-public class MainAPresenter implements MainAContact.Presenter {
- private static final String TAG = "MainAPresenter";
- private MainAContact.MainView mView;
- private Context mContext;
-
- private final String DEFAULT_INFO = "暂无信息";
- private final int OK = 200;
-
- public MainAPresenter(Context context) {
- this.mContext = context;
- Log.e(TAG, "MainSPresenter: " + context.getClass());
- }
-
- /**
- * Lifecycle start
- */
-
- /*1*/
- private LifecycleProvider provider;
-
- public void setProvider(LifecycleProvider provider) {
- this.provider = provider;
- }
-
- public LifecycleProvider getProvider() {
- return provider;
- }
-
- /*2*/
- private BehaviorSubject lifecycle;
-
- public void setLifecycle(BehaviorSubject lifecycle) {
- this.lifecycle = lifecycle;
- }
-
- public BehaviorSubject getLifecycle() {
- return lifecycle;
- }
-
- /**
- * Lifecycle end
- */
-
- @Override
- public void attachView(@androidx.annotation.NonNull MainAContact.MainView view) {
- this.mView = view;
- }
-
- @Override
- public void detachView() {
- this.mView = null;
- }
-
- @Override
- public void testRetrofitFinish() {
-
- }
-}
diff --git a/app/src/main/java/com/ttstd/ttutils/activity/main/MainActivity.java b/app/src/main/java/com/ttstd/ttutils/activity/main/MainActivity.java
index ba991be..c149bba 100644
--- a/app/src/main/java/com/ttstd/ttutils/activity/main/MainActivity.java
+++ b/app/src/main/java/com/ttstd/ttutils/activity/main/MainActivity.java
@@ -25,6 +25,7 @@ import android.widget.Toast;
import com.jiaoguanyi.appstore.IGetLicenseInterface;
import com.notepad.uiui.INoteAidlInterface;
import com.ttstd.ttutils.base.mvvm.BaseMvvmActivity;
+import com.ttstd.ttutils.databinding.ActivityMainBinding;
import com.ttstd.ttutils.server.main.MainService;
import com.ttstd.ttutils.R;
import com.ttstd.ttutils.utils.java.CmdUtil;
@@ -36,77 +37,8 @@ import com.uiui.sn.IGetInfoInterface;
import java.util.ArrayList;
-import butterknife.BindView;
-import butterknife.ButterKnife;
-
-public class MainActivity extends BaseMvvmActivity {
- @BindView(R.id.tv_qch_Developeroptions)
- TextView tv_qch_Developeroptions;
- @BindView(R.id.tv_development_settings_enabled)
- TextView tv_development_settings_enabled;
- @BindView(R.id.tv_adb_enabled)
- TextView tv_adb_enabled;
- @BindView(R.id.textView)
- TextView textView;
- @BindView(R.id.button)
- Button button;
- @BindView(R.id.none)
- Button none;
- @BindView(R.id.adb)
- Button adb;
- @BindView(R.id.rndis)
- Button rndis;
- @BindView(R.id.mtp)
- Button mtp;
- @BindView(R.id.ptp)
- Button ptp;
- @BindView(R.id.audio_source)
- Button audio_source;
- @BindView(R.id.midi)
- Button midi;
- @BindView(R.id.accessory)
- Button accessory;
-
- @BindView(R.id.icon_off)
- Button icon_off;
- @BindView(R.id.icon_on)
- Button icon_on;
- @BindView(R.id.icon_look)
- Button icon_look;
-
- @BindView(R.id.bt_bar_show)
- Button bt_bar_show;
- @BindView(R.id.bt_bar_hide)
- Button bt_bar_hide;
-
- @BindView(R.id.bt_statusbar_show)
- Button bt_statusbar_show;
- @BindView(R.id.bt_statusbar_hide)
- Button bt_statusbar_hide;
-
-
- @BindView(R.id.bt_bc_boot)
- Button bt_bc_boot;
- @BindView(R.id.bt_start_jgy)
- Button bt_start_jgy;
-
- @BindView(R.id.tv_statu)
- TextView tv_statu;
- @BindView(R.id.bt_camera_close)
- Button bt_camera_close;
- @BindView(R.id.bt_camera_open)
- Button bt_camera_open;
- @BindView(R.id.bt_camera_refresh)
- Button bt_camera_refresh;
-
- @BindView(R.id.tv_net_statu)
- TextView tv_net_statu;
- @BindView(R.id.bt_net_close)
- Button bt_net_close;
- @BindView(R.id.bt_net_open)
- Button bt_net_open;
- @BindView(R.id.bt_net_refresh)
- Button bt_net_refresh;
+public class MainActivity extends BaseMvvmActivity {
+ private static final String TAG = "MainActivity";
private ServiceConnection mServiceConnection;
private INoteAidlInterface noteAidlInterface;
@@ -114,7 +46,6 @@ public class MainActivity extends BaseMvvmActivity {
private IGetLicenseInterface getLicenseInterface;
private ServiceConnection mIGetInfoConnection;
private IGetInfoInterface getInfoInterface;
- private static final String TAG = "MainActivity";
private UsbManager mUsbManager;
@@ -133,8 +64,6 @@ public class MainActivity extends BaseMvvmActivity {
@Override
public void initView() {
- ButterKnife.bind(this);
-
View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
@@ -150,18 +79,18 @@ public class MainActivity extends BaseMvvmActivity {
mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
// mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_NONE, true);
- none.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_NONE, true));
+ mViewDataBinding.none.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_NONE, true));
//报错
- adb.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_ADB, true));
- rndis.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_RNDIS, true));
- mtp.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_MTP, true));
- ptp.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_PTP, true));
+ mViewDataBinding.adb.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_ADB, true));
+ mViewDataBinding.rndis.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_RNDIS, true));
+ mViewDataBinding.mtp.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_MTP, true));
+ mViewDataBinding.ptp.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_PTP, true));
//报错
- audio_source.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_AUDIO_SOURCE, true));
- midi.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_MIDI, true));
+ mViewDataBinding.audioSource.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_AUDIO_SOURCE, true));
+ mViewDataBinding.midi.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_MIDI, true));
//报错
- accessory.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_ACCESSORY, true));
- icon_off.setOnClickListener(view -> {
+ mViewDataBinding.accessory.setOnClickListener(view -> mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_ACCESSORY, true));
+ mViewDataBinding.iconOff.setOnClickListener(view -> {
Settings.System.putInt(getContentResolver(), "qch_app_deskclock", 1);
Settings.System.putInt(getContentResolver(), "qch_app_soundrecorder", 1);
Settings.System.putInt(getContentResolver(), "qch_app_music", 1);
@@ -170,7 +99,7 @@ public class MainActivity extends BaseMvvmActivity {
Settings.System.putInt(getContentResolver(), "qch_app_browser", 1);
});
- icon_on.setOnClickListener(view -> {
+ mViewDataBinding.iconOn.setOnClickListener(view -> {
Settings.System.putInt(getContentResolver(), "qch_app_deskclock", 0);
Settings.System.putInt(getContentResolver(), "qch_app_soundrecorder", 0);
Settings.System.putInt(getContentResolver(), "qch_app_music", 0);
@@ -178,7 +107,7 @@ public class MainActivity extends BaseMvvmActivity {
Settings.System.putInt(getContentResolver(), "qch_app_filemanager", 0);
Settings.System.putInt(getContentResolver(), "qch_app_browser", 0);
});
- icon_look.setOnClickListener(view -> {
+ mViewDataBinding.iconLook.setOnClickListener(view -> {
int qch_app_deskclock = Settings.System.getInt(getContentResolver(), "qch_app_deskclock", 0);
Log.e(TAG, "debugTest: qch_app_deskclock = " + qch_app_deskclock);
int qch_app_soundrecorder = Settings.System.getInt(getContentResolver(), "qch_app_soundrecorder", 0);
@@ -192,30 +121,30 @@ public class MainActivity extends BaseMvvmActivity {
int qch_app_browser = Settings.System.getInt(getContentResolver(), "qch_app_browser", 0);
Log.e(TAG, "debugTest: qch_app_browser = " + qch_app_browser);
});
- bt_bar_show.setOnClickListener(v -> {
+ mViewDataBinding.btBarShow.setOnClickListener(v -> {
String navigationStatus = "aole_show_NavigationBar";
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
sendBroadcast(navIntent);
});
- bt_bar_hide.setOnClickListener(v -> {
+ mViewDataBinding.btBarHide.setOnClickListener(v -> {
String navigationStatus = "aole_hide_NavigationBar";
Intent navIntent = new Intent(navigationStatus).setPackage("com.android.systemui");
sendBroadcast(navIntent);
});
- bt_statusbar_show.setOnClickListener(view -> {
+ mViewDataBinding.btStatusbarShow.setOnClickListener(view -> {
String statusbarStatus = "aole_show_statusBar";
Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
sendBroadcast(statusIntent);
});
- bt_statusbar_hide.setOnClickListener(view -> {
+ mViewDataBinding.btStatusbarHide.setOnClickListener(view -> {
String statusbarStatus = "aole_hide_statusBar";
Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
sendBroadcast(statusIntent);
});
- bt_bc_boot.setOnClickListener(view -> CmdUtil.execute("am broadcast -a android.intent.action.BOOT_COMPLETED"));
+ mViewDataBinding.btBcBoot.setOnClickListener(view -> CmdUtil.execute("am broadcast -a android.intent.action.BOOT_COMPLETED"));
- bt_start_jgy.setOnClickListener(view -> {
+ mViewDataBinding.btStartJgy.setOnClickListener(view -> {
JgyUtils.getInstance().wakeUpAppstore();
JgyUtils.getInstance().wakeUpDeviceInfo();
JgyUtils.getInstance().wakeUpNotify();
@@ -294,8 +223,8 @@ public class MainActivity extends BaseMvvmActivity {
// intent.setComponent(new ComponentName("com.notepad.uiui", "com.notepad.uiui.service.NoteService"));
// startService(intent);
- textView.setText(ndks);
- textView.setOnClickListener(new View.OnClickListener() {
+ mViewDataBinding.textView.setText(ndks);
+ mViewDataBinding.textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// open();
@@ -318,7 +247,7 @@ public class MainActivity extends BaseMvvmActivity {
}
});
- button.setOnClickListener(new View.OnClickListener() {
+ mViewDataBinding.button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// ApkUtils.openApp(JMainActivity.this, "com.info.sn");
@@ -360,14 +289,14 @@ public class MainActivity extends BaseMvvmActivity {
}
});
- bt_camera_refresh.setOnClickListener(new View.OnClickListener() {
+ mViewDataBinding.btCameraRefresh.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int code = Settings.System.getInt(getContentResolver(), "qch_app_camera", 0);
- tv_statu.setText("状态:" + code);
+ mViewDataBinding.tvStatu.setText("状态:" + code);
}
});
- bt_camera_close.setOnClickListener(new View.OnClickListener() {
+ mViewDataBinding.btCameraClose.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Settings.System.putInt(getContentResolver(), "qch_app_camera", 1);
@@ -375,7 +304,7 @@ public class MainActivity extends BaseMvvmActivity {
sendBroadcast(cameraIntent);
}
});
- bt_camera_open.setOnClickListener(new View.OnClickListener() {
+ mViewDataBinding.btCameraOpen.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Settings.System.putInt(getContentResolver(), "qch_app_camera", 0);
@@ -384,7 +313,7 @@ public class MainActivity extends BaseMvvmActivity {
}
});
- bt_net_close.setOnClickListener(new View.OnClickListener() {
+ mViewDataBinding.btNetClose.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Settings.System.putString(getContentResolver(), "app_web_white_list",
@@ -394,7 +323,7 @@ public class MainActivity extends BaseMvvmActivity {
}
});
- bt_net_open.setOnClickListener(new View.OnClickListener() {
+ mViewDataBinding.btNetOpen.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Settings.System.putString(getContentResolver(), "app_web_white_list", "null");
@@ -407,11 +336,11 @@ public class MainActivity extends BaseMvvmActivity {
protected void onResume() {
super.onResume();
Log.e(TAG, "onResume: " + Settings.System.getInt(getContentResolver(), "qch_Developeroptions", 0));
- tv_qch_Developeroptions.setText("qch_Developeroptions: " + Settings.System.getInt(getContentResolver(), "qch_Developeroptions", 0));
+ mViewDataBinding.tvQchDeveloperoptions.setText("qch_Developeroptions: " + Settings.System.getInt(getContentResolver(), "qch_Developeroptions", 0));
Log.e(TAG, "onResume: " + Settings.Global.getInt(getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0));
- tv_development_settings_enabled.setText("development_settings_enabled: " + Settings.Global.getInt(getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0));
+ mViewDataBinding.tvDevelopmentSettingsEnabled.setText("development_settings_enabled: " + Settings.Global.getInt(getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0));
Log.e(TAG, "onResume: " + Settings.Global.getInt(getContentResolver(), Settings.Global.ADB_ENABLED, 0));
- tv_adb_enabled.setText("development_settings_enabled: " + Settings.Global.getInt(getContentResolver(), Settings.Global.ADB_ENABLED, 0));
+ mViewDataBinding.tvAdbEnabled.setText("development_settings_enabled: " + Settings.Global.getInt(getContentResolver(), Settings.Global.ADB_ENABLED, 0));
}
private HideAppReceiver hideAppReceiver;
diff --git a/app/src/main/java/com/ttstd/ttutils/activity/main/MainViewModel.java b/app/src/main/java/com/ttstd/ttutils/activity/main/MainViewModel.java
new file mode 100644
index 0000000..e2fae93
--- /dev/null
+++ b/app/src/main/java/com/ttstd/ttutils/activity/main/MainViewModel.java
@@ -0,0 +1,12 @@
+package com.ttstd.ttutils.activity.main;
+
+import com.trello.rxlifecycle4.android.ActivityEvent;
+import com.ttstd.ttutils.base.mvvm.BaseViewModel;
+import com.ttstd.ttutils.databinding.ActivityMainBinding;
+
+public class MainViewModel extends BaseViewModel {
+ @Override
+ public void onDestroy() {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/ttstd/ttutils/activity/test/TestActivity.java b/app/src/main/java/com/ttstd/ttutils/activity/test/TestActivity.java
index d64f143..19f218d 100644
--- a/app/src/main/java/com/ttstd/ttutils/activity/test/TestActivity.java
+++ b/app/src/main/java/com/ttstd/ttutils/activity/test/TestActivity.java
@@ -1,34 +1,20 @@
package com.ttstd.ttutils.activity.test;
-import androidx.appcompat.app.AppCompatActivity;
-
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.os.Bundle;
-import android.widget.Button;
import com.ttstd.ttutils.R;
-import com.ttstd.ttutils.base.BaseDataBindingActivity;
import com.ttstd.ttutils.base.mvvm.BaseMvvmActivity;
+import com.ttstd.ttutils.databinding.ActivityTestBinding;
import com.ttstd.ttutils.utils.java.TTUtils;
import java.util.List;
-import butterknife.BindView;
-import butterknife.ButterKnife;
-
-public class TestActivity extends BaseMvvmActivity {
- private String TAG = "TestActivity";
-
- @BindView(R.id.bt1)
- Button bt1;
- @BindView(R.id.bt2)
- Button bt2;
- @BindView(R.id.bt3)
- Button bt3;
+public class TestActivity extends BaseMvvmActivity {
+ private static final String TAG = "TestActivity";
@Override
protected int getLayoutId() {
@@ -45,14 +31,13 @@ public class TestActivity extends BaseMvvmActivity {
@Override
protected void initView() {
- ButterKnife.bind(this);
Intent intent = getIntent();
if (intent != null) {
TTUtils.getExtrax(intent);
}
- bt1.setOnClickListener(view -> setDefault("com.aoleyunos.dop1"));
- bt2.setOnClickListener(view -> setDefault("com.aoleyunos.dop2"));
- bt3.setOnClickListener(view -> setDefault("com.aoleyun.os"));
+ mViewDataBinding.bt1.setOnClickListener(view -> setDefault("com.aoleyunos.dop1"));
+ mViewDataBinding.bt2.setOnClickListener(view -> setDefault("com.aoleyunos.dop2"));
+ mViewDataBinding.bt3.setOnClickListener(view -> setDefault("com.aoleyun.os"));
}
@Override
diff --git a/app/src/main/java/com/ttstd/ttutils/activity/test/TestViewModel.java b/app/src/main/java/com/ttstd/ttutils/activity/test/TestViewModel.java
new file mode 100644
index 0000000..fec4d95
--- /dev/null
+++ b/app/src/main/java/com/ttstd/ttutils/activity/test/TestViewModel.java
@@ -0,0 +1,12 @@
+package com.ttstd.ttutils.activity.test;
+
+import com.trello.rxlifecycle4.android.ActivityEvent;
+import com.ttstd.ttutils.base.mvvm.BaseViewModel;
+import com.ttstd.ttutils.databinding.ActivityTestBinding;
+
+public class TestViewModel extends BaseViewModel {
+ @Override
+ public void onDestroy() {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/ttstd/ttutils/base/mvvm/BaseMvvmActivity.java b/app/src/main/java/com/ttstd/ttutils/base/mvvm/BaseMvvmActivity.java
index 4aa3350..1e6394a 100644
--- a/app/src/main/java/com/ttstd/ttutils/base/mvvm/BaseMvvmActivity.java
+++ b/app/src/main/java/com/ttstd/ttutils/base/mvvm/BaseMvvmActivity.java
@@ -16,7 +16,7 @@ import java.lang.reflect.ParameterizedType;
public abstract class BaseMvvmActivity extends BaseTransparentActivity {
- private static final String TAG = "BaseMvvmActivity";
+ private static final String TAG = BaseMvvmActivity.class.getSimpleName();
protected VM mViewModel;
protected VDB mViewDataBinding;
@@ -31,10 +31,19 @@ public abstract class BaseMvvmActivity) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
boolean isAbstract = Modifier.isAbstract(vmClass.getModifiers());
- Log.e(TAG, "isLocalClass:" + vmClass.getSimpleName().equals("ViewModel") + " isAbstract:" + isAbstract);
+ Log.e(TAG, "isLocalClass:" + vmClass.getSimpleName().equals(ViewModel.class.getSimpleName()) + " isAbstract:" + isAbstract);
if (!isAbstract) {//不是一个抽象类
mViewModel = new ViewModelProvider(this).get(vmClass);
}
+
+ // 自动初始化 BaseViewModel 属性,减少子类模板代码
+ if (mViewModel instanceof BaseViewModel) {
+ BaseViewModel, ?> baseVm = (BaseViewModel, ?>) mViewModel;
+ baseVm.setVDBinding(mViewDataBinding);
+ baseVm.setCtx(this);
+ baseVm.setLifecycle(getLifecycleSubject());
+ }
+
initDataBinding();
initView();
initData();
diff --git a/app/src/main/java/com/ttstd/ttutils/network/interceptor/PostCacheInterceptor.java b/app/src/main/java/com/ttstd/ttutils/network/interceptor/PostCacheInterceptor.java
index 4504b0e..4ff1622 100644
--- a/app/src/main/java/com/ttstd/ttutils/network/interceptor/PostCacheInterceptor.java
+++ b/app/src/main/java/com/ttstd/ttutils/network/interceptor/PostCacheInterceptor.java
@@ -1,5 +1,7 @@
package com.ttstd.ttutils.network.interceptor;
+import static okhttp3.internal._UtilCommonKt.closeQuietly;
+
import android.text.TextUtils;
import com.blankj.utilcode.util.LogUtils;
@@ -20,7 +22,6 @@ import okhttp3.internal.http.HttpHeaders;
import okio.Buffer;
import okio.BufferedSource;
-import static okhttp3.internal.Util.closeQuietly;
public class PostCacheInterceptor implements Interceptor {
final DiskLruCacheHelper cache;
diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml
index ba9b855..01d2a0d 100644
--- a/app/src/main/res/layout-land/activity_main.xml
+++ b/app/src/main/res/layout-land/activity_main.xml
@@ -1,284 +1,291 @@
-
-
+
+
+
+
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
-
+ android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:orientation="vertical">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+ android:id="@+id/tv_qch_Developeroptions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ android:id="@+id/tv_development_settings_enabled"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+
+ android:text="nav_bar_show"
+ app:layout_constraintStart_toEndOf="@+id/icon_on"
+ app:layout_constraintTop_toTopOf="@+id/accessory" />
+ android:text="nav_bar_hide"
+ app:layout_constraintStart_toEndOf="@+id/icon_on"
+ app:layout_constraintTop_toTopOf="@+id/accessory" />
+ android:text="status_bar_show"
+ app:layout_constraintStart_toEndOf="@+id/icon_on"
+ app:layout_constraintTop_toTopOf="@+id/accessory" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout-port/activity_main.xml b/app/src/main/res/layout-port/activity_main.xml
index ba9b855..01d2a0d 100644
--- a/app/src/main/res/layout-port/activity_main.xml
+++ b/app/src/main/res/layout-port/activity_main.xml
@@ -1,284 +1,291 @@
-
-
+
+
+
+
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
-
+ android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:orientation="vertical">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+ android:id="@+id/tv_qch_Developeroptions"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ android:id="@+id/tv_development_settings_enabled"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+
+ android:text="nav_bar_show"
+ app:layout_constraintStart_toEndOf="@+id/icon_on"
+ app:layout_constraintTop_toTopOf="@+id/accessory" />
+ android:text="nav_bar_hide"
+ app:layout_constraintStart_toEndOf="@+id/icon_on"
+ app:layout_constraintTop_toTopOf="@+id/accessory" />
+ android:text="status_bar_show"
+ app:layout_constraintStart_toEndOf="@+id/icon_on"
+ app:layout_constraintTop_toTopOf="@+id/accessory" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_test.xml b/app/src/main/res/layout/activity_test.xml
index a18488f..da8e8b1 100644
--- a/app/src/main/res/layout/activity_test.xml
+++ b/app/src/main/res/layout/activity_test.xml
@@ -1,35 +1,42 @@
-
-
+
-
+
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 791d183..a4c8d4c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,19 +1,21 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = "1.4.10"
+ ext.kotlin_version = "2.4.0"
+
repositories {
google()
-// mavenCentral()
- maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
- maven { url "https://jitpack.io" }
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
+ maven { url 'https://maven.google.com' }
maven { url 'https://developer.huawei.com/repo/' }
+ maven { url 'https://developer.hihonor.com/repo' }
maven { url 'https://maven.aliyun.com/repository/central' }
- maven { url "https://maven.aliyun.com/repository/jcenter" }
+ maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
}
dependencies {
- classpath "com.android.tools.build:gradle:3.6.4"
+ classpath 'com.android.tools.build:gradle:8.13.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.tencent.android.tpns:tpnsplugin:1.8.0"
@@ -31,21 +33,24 @@ allprojects {
force 'androidx.annotation:annotation:1.3.0'
// 统一 lifecycle-runtime
force 'androidx.lifecycle:lifecycle-runtime:2.3.1'
- // 统一 Kotlin 标准库
- force 'org.jetbrains.kotlin:kotlin-stdlib:1.5.10'
+ // 统一 Kotlin 标准库(需与 kotlin_version 保持一致,否则运行时会缺 EnumEntriesKt 等类)
+ force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
}
+
repositories {
google()
-// mavenCentral()
- maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
- maven { url "https://jitpack.io" }
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
+ maven { url 'https://maven.google.com' }
maven { url 'https://developer.huawei.com/repo/' }
+ maven { url 'https://developer.hihonor.com/repo' }
maven { url 'https://maven.aliyun.com/repository/central' }
- maven { url "https://maven.aliyun.com/repository/jcenter" }
+ maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
}
+
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
//设置jar相对包路径或绝对路径
diff --git a/gradle.properties b/gradle.properties
index c39c4c4..4d15d01 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,5 +18,4 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
-kotlin.code.style=official
-android.useDeprecatedNdk=true
\ No newline at end of file
+kotlin.code.style=official
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 0f61ef1..86e9b6f 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
diff --git a/niceimageview/build.gradle b/niceimageview/build.gradle
index 6c9dbaf..547be1a 100644
--- a/niceimageview/build.gradle
+++ b/niceimageview/build.gradle
@@ -1,6 +1,8 @@
apply plugin: 'com.android.library'
android {
+ namespace "com.shehuan.niv"
+
compileSdkVersion 28
defaultConfig {
@@ -11,6 +13,8 @@ android {
}
buildTypes {
+ BCM310Debug {}
+ BCM310Release {}
MT6789Debug {}
MT6789Release {}
QZ15Debug {}
diff --git a/niceimageview/src/main/AndroidManifest.xml b/niceimageview/src/main/AndroidManifest.xml
index 6dab987..a215831 100644
--- a/niceimageview/src/main/AndroidManifest.xml
+++ b/niceimageview/src/main/AndroidManifest.xml
@@ -1,2 +1 @@
-
+
diff --git a/viewlibrary/build.gradle b/viewlibrary/build.gradle
index 81da98d..921bd86 100644
--- a/viewlibrary/build.gradle
+++ b/viewlibrary/build.gradle
@@ -1,12 +1,14 @@
apply plugin: 'com.android.library'
android {
+ namespace "com.ttstd.viewlibrary"
+
compileSdkVersion 30
- buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 23
targetSdkVersion 30
+
versionCode 1
versionName "1.0"
@@ -25,6 +27,8 @@ android {
}
buildTypes {
+ BCM310Debug {}
+ BCM310Release {}
MT6789Debug {}
MT6789Release {}
QZ15Debug {}
@@ -75,5 +79,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.facebook.rebound:rebound:0.3.6'
// implementation 'com.zcw:togglebutton-library:1.0.0'
- implementation 'com.github.zcweng:switch-button:0.0.3@aar'
+ api 'com.github.zcweng:switch-button:0.0.3@aar'
}
diff --git a/viewlibrary/src/main/AndroidManifest.xml b/viewlibrary/src/main/AndroidManifest.xml
index a33d1af..03af443 100644
--- a/viewlibrary/src/main/AndroidManifest.xml
+++ b/viewlibrary/src/main/AndroidManifest.xml
@@ -1,2 +1 @@
-
+