更换APP图标

master
admin-pc\admin 1 year ago
parent a1e987b677
commit 8bd23da926

@ -1,4 +1,7 @@
apply plugin: 'com.android.application' plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android { android {
namespace 'com.bjzc.yfdxj' namespace 'com.bjzc.yfdxj'
@ -15,9 +18,6 @@ android {
resValue "string", "authorities", applicationId resValue "string", "authorities", applicationId
resourceConfigurations += ['zh', 'en', 'hdpi'] resourceConfigurations += ['zh', 'en', 'hdpi']
} }
buildFeatures {
buildConfig = true
}
signingConfigs { signingConfigs {
release { release {
keyAlias 'key0' keyAlias 'key0'
@ -32,7 +32,6 @@ android {
buildTypes { buildTypes {
debug { debug {
minifyEnabled false minifyEnabled false
buildConfigField "boolean", "LOG_ERROR", "true"
} }
release { release {
lintOptions { lintOptions {
@ -43,7 +42,6 @@ android {
zipAlignEnabled true // zip zipAlignEnabled true // zip
debuggable false // debug debuggable false // debug
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "LOG_ERROR", "false"
signingConfig signingConfigs.release // signingConfig signingConfigs.release //
} }
} }
@ -62,14 +60,35 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.zhy:autolayout:1.4.5'
implementation 'com.yolanda.nohttp:nohttp:1.0.5' // implementation 'com.zhy:autolayout:1.4.5'
// implementation 'com.yolanda.nohttp:nohttp:1.0.5'
// implementation 'com.zhihu.android:matisse:0.5.3-beta3'
// implementation 'org.litepal.android:core:1.5.1'
// //
// implementation 'top.zibin:Luban:1.1.8'
// implementation 'id.zelory:compressor:1.0.3'
//
implementation project(':autolayout')
//
implementation project(':nohttp')
//
implementation project(':litepal')
//
implementation project(':matisse')
//
implementation project(':luban')
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'org.litepal.android:core:1.5.1'
implementation 'com.github.huangyanbin:SmartTable:2.2.0' implementation 'com.github.huangyanbin:SmartTable:2.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'de.hdodenhof:circleimageview:3.1.0' implementation 'de.hdodenhof:circleimageview:3.1.0'
@ -81,10 +100,8 @@ dependencies {
implementation files('libs/rinsunMT.jar') implementation files('libs/rinsunMT.jar')
implementation 'org.greenrobot:eventbus:3.0.0' implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.github.bumptech.glide:glide:4.11.0' implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.zhihu.android:matisse:0.5.3-beta3'
//
implementation 'top.zibin:Luban:1.1.8'
implementation 'id.zelory:compressor:1.0.3'
// //
implementation 'cn.hutool:hutool-all:5.8.5' implementation 'cn.hutool:hutool-all:5.8.5'
//mqtt //mqtt

@ -68,10 +68,10 @@
android:allowBackup="false" android:allowBackup="false"
android:fullBackupContent="false" android:fullBackupContent="false"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
android:icon="@mipmap/logo1" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config" android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/logo1" android:roundIcon="@mipmap/ic_launcher_round"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"

@ -155,7 +155,7 @@ public class GlideEngine implements ImageEngine {
.override(180, 180) .override(180, 180)
.centerCrop() .centerCrop()
.sizeMultiplier(0.5f) .sizeMultiplier(0.5f)
.apply(new RequestOptions().placeholder(R.drawable.picture_image_placeholder)) .apply(new RequestOptions().placeholder(com.luck.picture.lib.R.drawable.picture_image_placeholder))
.into(new BitmapImageViewTarget(imageView) { .into(new BitmapImageViewTarget(imageView) {
@Override @Override
protected void setResource(Bitmap resource) { protected void setResource(Bitmap resource) {
@ -198,7 +198,7 @@ public class GlideEngine implements ImageEngine {
.load(url) .load(url)
.override(200, 200) .override(200, 200)
.centerCrop() .centerCrop()
.apply(new RequestOptions().placeholder(R.drawable.picture_image_placeholder)) .apply(new RequestOptions().placeholder(com.luck.picture.lib.R.drawable.picture_image_placeholder))
.into(imageView); .into(imageView);
} }

@ -199,48 +199,81 @@ public class CheckVibrationActivity extends BaseActivity3 {
rgLevel.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { rgLevel.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(RadioGroup radioGroup, int i) { public void onCheckedChanged(RadioGroup radioGroup, int i) {
switch (i){ if(i==R.id.rb1){
case R.id.rb1: level = 0;
level = 0; if(isEdit){
if(isEdit){ demo();//测量
demo();//测量 }
}
break;
case R.id.rb2:
level = 1;
if(isEdit){
demo();//测量
}
break;
} }
if(i==R.id.rb2){
level = 1;
if(isEdit){
demo();//测量
}
}
// switch (i){
// case R.id.rb1:
// level = 0;
// if(isEdit){
// demo();//测量
// }
// break;
// case R.id.rb2:
// level = 1;
// if(isEdit){
// demo();//测量
// }
// break;
// }
} }
}); });
rgType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { rgType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(RadioGroup radioGroup, int i) { public void onCheckedChanged(RadioGroup radioGroup, int i) {
switch (i){ if(i==R.id.rb3){
case R.id.rb3: checkVibrationType = MTnativeInterface.CMD_VIBD_R;
checkVibrationType = MTnativeInterface.CMD_VIBD_R; etRealTitle.setText("实际值(mm):");
etRealTitle.setText("实际值(mm):"); if(isEdit){
if(isEdit){ demo();//测量
demo();//测量 }
} }
break; if(i==R.id.rb4){
case R.id.rb4: checkVibrationType = MTnativeInterface.CMD_VIBV_R;
checkVibrationType = MTnativeInterface.CMD_VIBV_R; etRealTitle.setText("实际值(mm/s):");
etRealTitle.setText("实际值(mm/s):"); if(isEdit){
if(isEdit){ demo();//测量
demo();//测量 }
} }
break; if(i==R.id.rb5){
case R.id.rb5: checkVibrationType = MTnativeInterface.CMD_VIBA_R;
checkVibrationType = MTnativeInterface.CMD_VIBA_R; etRealTitle.setText("实际值(mm/(s^2)):");
etRealTitle.setText("实际值(mm/(s^2)):"); if(isEdit){
if(isEdit){ demo();//测量
demo();//测量 }
}
break;
} }
// switch (i){
// case R.id.rb3:
// checkVibrationType = MTnativeInterface.CMD_VIBD_R;
// etRealTitle.setText("实际值(mm):");
// if(isEdit){
// demo();//测量
// }
// break;
// case R.id.rb4:
// checkVibrationType = MTnativeInterface.CMD_VIBV_R;
// etRealTitle.setText("实际值(mm/s):");
// if(isEdit){
// demo();//测量
// }
// break;
// case R.id.rb5:
// checkVibrationType = MTnativeInterface.CMD_VIBA_R;
// etRealTitle.setText("实际值(mm/(s^2)):");
// if(isEdit){
// demo();//测量
// }
// break;
// }
} }
}); });
noticeValue.setOnLongClickListener(new View.OnLongClickListener() { noticeValue.setOnLongClickListener(new View.OnLongClickListener() {

@ -19,7 +19,7 @@ import android.widget.TextView;
import com.azhon.appupdate.listener.OnButtonClickListener; import com.azhon.appupdate.listener.OnButtonClickListener;
import com.azhon.appupdate.listener.OnDownloadListener; import com.azhon.appupdate.listener.OnDownloadListener;
import com.azhon.appupdate.manager.DownloadManager; import com.azhon.appupdate.manager.DownloadManager;
import com.bjzc.yfdxj.BuildConfig;
import com.bjzc.yfdxj.base.BaseCallBackNoProgress; import com.bjzc.yfdxj.base.BaseCallBackNoProgress;
import com.bjzc.yfdxj.R; import com.bjzc.yfdxj.R;
import com.bjzc.yfdxj.base.BaseActivity; import com.bjzc.yfdxj.base.BaseActivity;
@ -181,7 +181,7 @@ public class LoginActivity extends BaseActivity {
} }
} }
if (BuildConfig.LOG_ERROR) { if (isApkInDebug(context)) {
etUse.setText("161619"); etUse.setText("161619");
etPwd.setText("lgy12345"); etPwd.setText("lgy12345");

@ -48,6 +48,7 @@ import com.bjzc.yfdxj.utils.FlashUtil;
import com.bjzc.yfdxj.utils.GsonUtils; import com.bjzc.yfdxj.utils.GsonUtils;
import com.bjzc.yfdxj.utils.HttpUtils; import com.bjzc.yfdxj.utils.HttpUtils;
import com.bjzc.yfdxj.utils.MqttSSLPublishServer; import com.bjzc.yfdxj.utils.MqttSSLPublishServer;
import com.bjzc.yfdxj.utils.NetworkUtil;
import com.bjzc.yfdxj.utils.OAToolbar; import com.bjzc.yfdxj.utils.OAToolbar;
import com.bjzc.yfdxj.utils.RSAAndroid; import com.bjzc.yfdxj.utils.RSAAndroid;
import com.bjzc.yfdxj.utils.SPUtils; import com.bjzc.yfdxj.utils.SPUtils;
@ -163,9 +164,11 @@ public class MainActivity extends BaseActivity3 {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);//设置透明状态栏 getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);//设置透明状态栏
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);//设置透明导航栏 getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);//设置透明导航栏
StatusBarUtil.transparencyBar(MainActivity.this);//设置透明状态栏 StatusBarUtil.transparencyBar(MainActivity.this);//设置透明状态栏
//当选择外网时才会开启一键招回 //当选择外网时,并且网络连接不是wifi才会开启一键招回
if(Contans.IP.equals(Contans.network_type_extranet)){ if(Contans.IP.equals(Contans.network_type_extranet)){
initMqtt(); if(!NetworkUtil.isWifiNetWorkStatus(context)){
initMqtt();
}
} }
btnLogout.setOnClickListener(new View.OnClickListener() { btnLogout.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -581,21 +584,24 @@ public class MainActivity extends BaseActivity3 {
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
if(Contans.IP.equals(Contans.network_type_extranet)){ if(Contans.IP.equals(Contans.network_type_extranet)){
if(mqttPublishServer==null){ if(!NetworkUtil.isWifiNetWorkStatus(context)){
mqttPublishServer = new MqttSSLPublishServer(this); if(mqttPublishServer==null){
} mqttPublishServer = new MqttSSLPublishServer(this);
if(timer==null){ }
try { if(timer==null){
timer = new Timer(); try {
timer.schedule(new TimerTask() { timer = new Timer();
public void run() { timer.schedule(new TimerTask() {
mqttPublishServer.start(); public void run() {
} mqttPublishServer.start();
}, 1000, 60000); }
// 设定指定的时间time,此处为10000毫秒 }, 1000, 60000);
} catch (Exception e) { // 设定指定的时间time,此处为10000毫秒
e.printStackTrace(); } catch (Exception e) {
e.printStackTrace();
}
} }
} }
} }

@ -189,38 +189,68 @@ public class CheckVibrationDqgzActivity extends BaseActivity3 {
rgLevel.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { rgLevel.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(RadioGroup radioGroup, int i) { public void onCheckedChanged(RadioGroup radioGroup, int i) {
switch (i) { if(i==R.id.rb1){
case R.id.rb1: level = 0;
level = 0; demo();//测量
demo();//测量 }
break; if(i==R.id.rb2){
case R.id.rb2: level = 1;
level = 1; demo();//测量
demo();//测量
break;
} }
// switch (i) {
// case R.id.rb1:
// level = 0;
// demo();//测量
// break;
// case R.id.rb2:
// level = 1;
// demo();//测量
// break;
// }
} }
}); });
rgType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { rgType.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override @Override
public void onCheckedChanged(RadioGroup radioGroup, int i) { public void onCheckedChanged(RadioGroup radioGroup, int i) {
switch (i) { if(i==R.id.rb3){
case R.id.rb3: checkVibrationType = MTnativeInterface.CMD_VIBD_R;
checkVibrationType = MTnativeInterface.CMD_VIBD_R; etRealTitle.setText("实际值(mm):");
etRealTitle.setText("实际值(mm):"); if(isEdit){
demo();//测量 demo();//测量
break; }
case R.id.rb4: }
checkVibrationType = MTnativeInterface.CMD_VIBV_R; if(i==R.id.rb4){
etRealTitle.setText("实际值(mm/s):"); checkVibrationType = MTnativeInterface.CMD_VIBV_R;
etRealTitle.setText("实际值(mm/s):");
if(isEdit){
demo();//测量 demo();//测量
break; }
case R.id.rb5: }
checkVibrationType = MTnativeInterface.CMD_VIBA_R; if(i==R.id.rb5){
etRealTitle.setText("实际值(mm/(s^2)):"); checkVibrationType = MTnativeInterface.CMD_VIBA_R;
etRealTitle.setText("实际值(mm/(s^2)):");
if(isEdit){
demo();//测量 demo();//测量
break; }
} }
// switch (i) {
// case R.id.rb3:
// checkVibrationType = MTnativeInterface.CMD_VIBD_R;
// etRealTitle.setText("实际值(mm):");
// demo();//测量
// break;
// case R.id.rb4:
// checkVibrationType = MTnativeInterface.CMD_VIBV_R;
// etRealTitle.setText("实际值(mm/s):");
// demo();//测量
// break;
// case R.id.rb5:
// checkVibrationType = MTnativeInterface.CMD_VIBA_R;
// etRealTitle.setText("实际值(mm/(s^2)):");
// demo();//测量
// break;
// }
} }
}); });
noticeValue.setOnLongClickListener(new View.OnLongClickListener() { noticeValue.setOnLongClickListener(new View.OnLongClickListener() {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save