Browse Source

修改

master-new-炒锅
liup 1 week ago
parent
commit
daba29dd7b
23 changed files with 775 additions and 349 deletions
  1. +0
    -329
      .idea/other.xml
  2. +3
    -0
      app/build.gradle
  3. +3
    -3
      app/release/output-metadata.json
  4. +4
    -1
      app/src/main/AndroidManifest.xml
  5. +30
    -2
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  6. +4
    -0
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  7. +1
    -0
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  8. +9
    -0
      app/src/main/java/com/bonait/bnframework/common/helper/AuthorizeHelper.java
  9. +74
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/adapter/LocalLogAdapter.java
  10. +11
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
  11. +10
    -2
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home4Fragment.java
  12. +35
    -4
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java
  13. +4
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java
  14. +237
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/LogRecordActivity.java
  15. +17
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_message.java
  16. +20
    -0
      app/src/main/res/drawable/btn_normal_bg.xml
  17. +11
    -0
      app/src/main/res/drawable/edit_input_bg.xml
  18. +220
    -0
      app/src/main/res/layout/activity_log_record.xml
  19. +15
    -0
      app/src/main/res/layout/fragment_home4.xml
  20. +59
    -0
      app/src/main/res/layout/item/layout/dialog_log_desc_h.xml
  21. +3
    -3
      app/src/main/res/layout/item/layout/item_log.xml
  22. +3
    -0
      app/src/main/res/values/colors.xml
  23. +2
    -2
      build.gradle

+ 0
- 329
.idea/other.xml View File

@@ -1,329 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="direct_access_persist.xml">
<option name="deviceSelectionList">
<list>
<PersistentDeviceSelectionData>
<option name="api" value="27" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="F01L" />
<option name="id" value="F01L" />
<option name="manufacturer" value="FUJITSU" />
<option name="name" value="F-01L" />
<option name="screenDensity" value="360" />
<option name="screenX" value="720" />
<option name="screenY" value="1280" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="28" />
<option name="brand" value="DOCOMO" />
<option name="codename" value="SH-01L" />
<option name="id" value="SH-01L" />
<option name="manufacturer" value="SHARP" />
<option name="name" value="AQUOS sense2 SH-01L" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2160" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="Lenovo" />
<option name="codename" value="TB370FU" />
<option name="id" value="TB370FU" />
<option name="manufacturer" value="Lenovo" />
<option name="name" value="Tab P12" />
<option name="screenDensity" value="340" />
<option name="screenX" value="1840" />
<option name="screenY" value="2944" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="samsung" />
<option name="codename" value="a51" />
<option name="id" value="a51" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy A51" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="akita" />
<option name="id" value="akita" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="b0q" />
<option name="id" value="b0q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S22 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="32" />
<option name="brand" value="google" />
<option name="codename" value="bluejay" />
<option name="id" value="bluejay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="caiman" />
<option name="id" value="caiman" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro" />
<option name="screenDensity" value="360" />
<option name="screenX" value="960" />
<option name="screenY" value="2142" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="comet" />
<option name="id" value="comet" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro Fold" />
<option name="screenDensity" value="390" />
<option name="screenX" value="2076" />
<option name="screenY" value="2152" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="crownqlteue" />
<option name="id" value="crownqlteue" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Note9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2220" />
<option name="screenY" value="1080" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="dm3q" />
<option name="id" value="dm3q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S23 Ultra" />
<option name="screenDensity" value="600" />
<option name="screenX" value="1440" />
<option name="screenY" value="3088" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="e1q" />
<option name="id" value="e1q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S24" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="felix" />
<option name="id" value="felix" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="felix_camera" />
<option name="id" value="felix_camera" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Fold (Camera-enabled)" />
<option name="screenDensity" value="420" />
<option name="screenX" value="2208" />
<option name="screenY" value="1840" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="samsung" />
<option name="codename" value="gts8uwifi" />
<option name="id" value="gts8uwifi" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Tab S8 Ultra" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1848" />
<option name="screenY" value="2960" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="husky" />
<option name="id" value="husky" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8 Pro" />
<option name="screenDensity" value="390" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="motorola" />
<option name="codename" value="java" />
<option name="id" value="java" />
<option name="manufacturer" value="Motorola" />
<option name="name" value="G20" />
<option name="screenDensity" value="280" />
<option name="screenX" value="720" />
<option name="screenY" value="1600" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="komodo" />
<option name="id" value="komodo" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9 Pro XL" />
<option name="screenDensity" value="360" />
<option name="screenX" value="1008" />
<option name="screenY" value="2244" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="lynx" />
<option name="id" value="lynx" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7a" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="31" />
<option name="brand" value="google" />
<option name="codename" value="oriole" />
<option name="id" value="oriole" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 6" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="panther" />
<option name="id" value="panther" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 7" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />
<option name="codename" value="q5q" />
<option name="id" value="q5q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy Z Fold5" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1812" />
<option name="screenY" value="2176" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="r11" />
<option name="id" value="r11" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Watch" />
<option name="screenDensity" value="320" />
<option name="screenX" value="384" />
<option name="screenY" value="384" />
<option name="type" value="WEAR_OS" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="30" />
<option name="brand" value="google" />
<option name="codename" value="redfin" />
<option name="id" value="redfin" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 5" />
<option name="screenDensity" value="440" />
<option name="screenX" value="1080" />
<option name="screenY" value="2340" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="shiba" />
<option name="id" value="shiba" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 8" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2400" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="33" />
<option name="brand" value="google" />
<option name="codename" value="tangorpro" />
<option name="id" value="tangorpro" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel Tablet" />
<option name="screenDensity" value="320" />
<option name="screenX" value="1600" />
<option name="screenY" value="2560" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="id" value="tokay" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="29" />
<option name="brand" value="samsung" />
<option name="codename" value="x1q" />
<option name="id" value="x1q" />
<option name="manufacturer" value="Samsung" />
<option name="name" value="Galaxy S20" />
<option name="screenDensity" value="480" />
<option name="screenX" value="1440" />
<option name="screenY" value="3200" />
</PersistentDeviceSelectionData>
</list>
</option>
</component>
</project>

+ 3
- 0
app/build.gradle View File

@@ -208,4 +208,7 @@ dependencies {
api 'com.squareup.okhttp3:logging-interceptor:3.10.0'
//调试okhttp请求(建议debug使用)
api 'com.localebro:okhttpprofiler:1.0.8'

//选择器 时间
implementation 'com.contrarywind:Android-PickerView:3.2.6'
}

+ 3
- 3
app/release/output-metadata.json View File

@@ -11,9 +11,9 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 107,
"versionName": "1.0.7",
"outputFile": "boluo-xiaochao-v107-202410071053-release.apk"
"versionCode": 108,
"versionName": "1.0.8",
"outputFile": "boluo-xiaochao-v108-202410311109-release.apk"
}
],
"elementType": "File"

+ 4
- 1
app/src/main/AndroidManifest.xml View File

@@ -249,7 +249,10 @@
</activity>
<activity android:name=".modules.home.activity.BottomNavigation2Activity"
android:launchMode="singleTask"
android:exported="true"></activity>
android:exported="true"/>
<activity android:name=".modules.home.fragment.from.LogRecordActivity"
android:launchMode="singleTask"
android:exported="true"/>

<receiver
android:name=".common.base.BootReceiver"


+ 30
- 2
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -1561,17 +1561,41 @@ public class ExecuteTheRecipe {
WritePLC("加热功率", data, new IWriteCallBack() {
@Override
public void onSuccess() {
RecordManager.getInstance().addLogRecord("角色操作日志","设置档位成功 加热功率:" + data + "档");

if (data == 0) {
ConfigName.getInstance().IsOpenHuoLi = false;
WritePLC("加热", false, null);
WritePLC("加热", false, new IWriteCallBack() {
@Override
public void onSuccess() {
RecordManager.getInstance().addLogRecord("角色操作日志","关闭加热成功 加热功率:" + data + "档");
}

@Override
public void onFailure(String ErrorMsg) {
RecordManager.getInstance().addLogRecord("角色操作日志","关闭加热失败 加热功率:" + data + "档");
}
});

} else {
ConfigName.getInstance().IsOpenHuoLi = true;
WritePLC("加热", true, null);
WritePLC("加热", true, new IWriteCallBack() {
@Override
public void onSuccess() {
RecordManager.getInstance().addLogRecord("角色操作日志","启动加热成功 加热功率:" + data + "档");
}

@Override
public void onFailure(String ErrorMsg) {
RecordManager.getInstance().addLogRecord("角色操作日志","启动加热失败 加热功率:" + data + "档");
}
});
}
}

@Override
public void onFailure(String ErrorMsg) {
RecordManager.getInstance().addLogRecord("角色操作日志","设置档位失败 加热功率:" + data + "档");
}
});
ToastUtils.info("火力按钮点击,当前级别:" + data,"Click the fire button, current level:" + data);
@@ -1749,6 +1773,7 @@ public class ExecuteTheRecipe {
* @param value
*/
public static void WritePLC(String name, Object value, IWriteCallBack callback) {
RecordManager.getInstance().addLogRecord("角色操作日志","写入plc数据 name="+name+" value="+value);
if(ConfigName.isTEST){
LogUtils.d("WritePLC name="+name+";value="+value);
return;
@@ -1770,6 +1795,9 @@ public class ExecuteTheRecipe {
{
ModbusTcpServer.get().WriteFloat(plcaddress.address, Float.parseFloat(value.toString()), callback);
}
RecordManager.getInstance().addLogRecord("角色操作日志","正在写入plc数据 name="+name+" value="+value+" 地址:"+plcaddress.address);
}else {
RecordManager.getInstance().addLogRecord("角色操作日志","失败写入plc数据 name="+name+" value="+value+" 地址为空");
}
}
} catch (Exception ex) {


+ 4
- 0
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -284,6 +284,10 @@ public class MainInit {
{
ConfigData.getInstance().RevertPLCProcess();
}
if(PreferenceUtils.getInt("init",1)==1){
ConfigData.getInstance().RevertPLCProcess();
PreferenceUtils.setInt("init",2);
}
}




+ 1
- 0
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java View File

@@ -116,6 +116,7 @@ public class ConfigName {
* 验证是否已经授权
*/
public boolean IsAuthorize=false;
public boolean needAuthorize=false;
/**
* 是否显示授权提醒
*/


+ 9
- 0
app/src/main/java/com/bonait/bnframework/common/helper/AuthorizeHelper.java View File

@@ -145,6 +145,9 @@ public class AuthorizeHelper {
}

public static void AuthorizeDialog(AppCompatActivity activity){
if(!needAuthorize()){
return;
}
AlertDialogUtils.showCancelAndConfirmDialog(activity, R.layout.layout_authority, (layoutView, xCom) -> {
LayoutAuthorityBinding binding = LayoutAuthorityBinding.bind(layoutView);
DisplayManager.scaleViewGroup(binding.getRoot());
@@ -240,12 +243,18 @@ public class AuthorizeHelper {
* @param activity
*/
public static void AuthorizeNotify(AppCompatActivity activity){
if(!needAuthorize()){
return;
}
if(ConfigName.getInstance().IsAuthorize)return;
if(ConfigName.getInstance().versionSelectionEnum.equals("一拖二"))return;
AuthorizeDialog(activity);
}

public static boolean needAuthorize(){
if(!ConfigName.getInstance().needAuthorize){
return false;
}
return !ConfigName.getInstance().versionSelectionEnum.equals("一拖二") && !ConfigName.getInstance().IsAuthorize;
}



+ 74
- 0
app/src/main/java/com/bonait/bnframework/modules/home/adapter/LocalLogAdapter.java View File

@@ -0,0 +1,74 @@
package com.bonait.bnframework.modules.home.adapter;

import android.annotation.SuppressLint;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD;
import com.bonait.bnframework.databinding.ItemLogBinding;
import com.bonait.bnframework.ui.adapter.BaseAdapter;
import com.bonait.bnframework.ui.util.DisplayManager;

/**
* @author: liup
* @description: 日志
* @date: 2024/6/3 15:46.
*/
public class LocalLogAdapter extends BaseAdapter<BPA_LOG_RECORD, LocalLogAdapter.ViewHolder> {
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(ItemLogBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
}

@SuppressLint("SetTextI18n")
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) {
BPA_LOG_RECORD log = mData.get(position);
if(holder.binding.getRoot().getWidth()==0){
DisplayManager.scaleViewGroup(holder.binding.getRoot());
}
holder.binding.type.setText(log.typeName+"");
holder.binding.time.setText(log.createTime+"");

if(log.userName!=null){
holder.binding.desc.setText(log.userName+"-"+log.describe+"");
}else {
holder.binding.desc.setText(log.describe+"");
}
holder.binding.getRoot().setOnClickListener(v->{
if(callBack!=null){
callBack.onDescClick(v,position);
}
});
}

@Override
protected void onItemClick(View v, int position) {

}

public static class ViewHolder extends RecyclerView.ViewHolder {
private ItemLogBinding binding;


public ViewHolder(ItemLogBinding view) {
super(view.getRoot());
binding = view;
}
}
private ClickCallBack callBack;

public void setCallBack(ClickCallBack callBack) {
this.callBack = callBack;
}

public interface ClickCallBack{
void onDescClick(View v,int position);
}
}


+ 11
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java View File

@@ -491,9 +491,14 @@ public class Home1Fragment extends BaseFragment {
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
Log.e("鼠标", "按下: ");
if (!IsMake(false)) {
// if (!IsMake(false)) {
// return false;
// }
if (!ConfigName.getInstance().PlcIsConnect) {
ToastUtils.warning("PLC未准备就绪!!!","PLC not connected");
return false;
}

int jd = (int) nifty_slider3.getValue();
ExecuteTheRecipe.WritePLC("转动速度", jd, new IWriteCallBack() {
@Override
@@ -523,7 +528,11 @@ public class Home1Fragment extends BaseFragment {
public boolean onTouch(View view, MotionEvent motionEvent) {
if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
Log.e("鼠标", "按下: ");
if (!IsMake(false)) {
// if (!IsMake(false)) {
// return false;
// }
if (!ConfigName.getInstance().PlcIsConnect) {
ToastUtils.warning("PLC未准备就绪!!!","PLC not connected");
return false;
}
int jd = (int) nifty_slider3.getValue();


+ 10
- 2
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home4Fragment.java View File

@@ -27,6 +27,7 @@ import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.bonait.bnframework.modules.home.fragment.from.BunkerSetupActivity;
import com.bonait.bnframework.modules.home.fragment.from.CpxzActivity;
import com.bonait.bnframework.modules.home.fragment.from.DishTestActivity;
import com.bonait.bnframework.modules.home.fragment.from.LogRecordActivity;
import com.bonait.bnframework.modules.home.fragment.mode.MyStatus;
import com.bonait.bnframework.modules.welcome.activity.LoginActivity;
import com.bonait.bnframework.ui.activity.EditGoodsActivity;
@@ -68,7 +69,9 @@ public class Home4Fragment extends BaseFragment {
getActivity().runOnUiThread(()->{
AuthorizeHelper.AuthorizeNotify((AppCompatActivity) getActivity());
AuthorizeHelper.AuthorizeInAdvanceNotify((AppCompatActivity) getActivity());
authorize.setVisibility(ConfigName.getInstance().IsVisibleAuthorize?View.VISIBLE:View.GONE);
if(ConfigName.getInstance().needAuthorize){
authorize.setVisibility(ConfigName.getInstance().IsVisibleAuthorize?View.VISIBLE:View.GONE);
}
});
}catch (Exception e){

@@ -91,9 +94,14 @@ public class Home4Fragment extends BaseFragment {
* @param view
*/
@OnClick({R.id.kaishipengren, R.id.shebeikongzhi, R.id.zhuxiaodenglu,R.id.authorize
, R.id.liaochangshezhi, R.id.caipinyanfa,})
, R.id.liaochangshezhi, R.id.caipinyanfa,R.id.btn_log})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.btn_log:
Intent intent = new Intent(context, LogRecordActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
break;
case R.id.kaishipengren:
MessageManager.getInstance().sendMessage(MessageName.SelectZY, 0);
break;


+ 35
- 4
app/src/main/java/com/bonait/bnframework/modules/home/fragment/HomeFragmentSBKZ.java View File

@@ -29,6 +29,7 @@ import android.widget.TextView;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.business.RecordManager;
import com.bonait.bnframework.common.base.BaseFragment;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.DataBus;
@@ -789,10 +790,10 @@ public class HomeFragmentSBKZ extends BaseFragment {
switch (getString(R.string.language)){
case "en":
int t = speed.ordinal();
ToastUtils.warning("Setting Stir-fry speed:" + SpeedEnum_en.values()[t]);
ToastUtils.info("Setting Stir-fry speed:" + SpeedEnum_en.values()[t]);
break;
case "zh":
ToastUtils.warning("设置翻炒速度:" + speed.name());
ToastUtils.info("设置翻炒速度:" + speed.name());
break;
}

@@ -801,15 +802,44 @@ public class HomeFragmentSBKZ extends BaseFragment {
ExecuteTheRecipe.WritePLC("搅拌速度", _speed, new IWriteCallBack() {
@Override
public void onSuccess() {
ToastUtils.info("设置翻炒速度: "+final_speed+" 成功" );
RecordManager.getInstance().addLogRecord("角色操作日志","搅拌速度 设置成功:"+final_speed);
if (final_speed == 0) {
ExecuteTheRecipe.WritePLC("搅拌", false, null);
ExecuteTheRecipe.WritePLC("搅拌", false, new IWriteCallBack() {
@Override
public void onSuccess() {
RecordManager.getInstance().addLogRecord("角色操作日志","关闭搅拌成功");
ToastUtils.info("关闭搅拌:成功" );
}

@Override
public void onFailure(String ErrorMsg) {
RecordManager.getInstance().addLogRecord("角色操作日志","关闭搅拌失败");
ToastUtils.warning("关闭搅拌:失败" );

}
});
} else {
ExecuteTheRecipe.WritePLC("搅拌", true, null);
ExecuteTheRecipe.WritePLC("搅拌", true, new IWriteCallBack() {
@Override
public void onSuccess() {
RecordManager.getInstance().addLogRecord("角色操作日志","启动搅拌成功");
ToastUtils.info("启动搅拌:成功" );
}

@Override
public void onFailure(String ErrorMsg) {
RecordManager.getInstance().addLogRecord("角色操作日志","启动搅拌失败");
ToastUtils.warning("启动搅拌:失败" );
}
});
}
}

@Override
public void onFailure(String ErrorMsg) {
RecordManager.getInstance().addLogRecord("角色操作日志","搅拌速度 设置失败:"+final_speed);
ToastUtils.warning("设置翻炒速度:失败" );
}
});
}
@@ -952,6 +982,7 @@ public class HomeFragmentSBKZ extends BaseFragment {
* @param data
*/
public void SetFire(int data) {
RecordManager.getInstance().addLogRecord("角色操作日志","准备设置火力:" + data + "档");
ExecuteTheRecipe.Write_PLC_HuoLI((int) data);
ToastUtils.warning("设置火力:" + data + "档");
}


+ 4
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/BunkerSetupActivity.java View File

@@ -100,6 +100,10 @@ public class BunkerSetupActivity extends BaseActivity {
ExecuteTheRecipe.WritePLC("料仓1手动开关", false, null);
ExecuteTheRecipe.WritePLC("料仓2手动开关", false, null);
ExecuteTheRecipe.WritePLC("料仓3手动开关", false, null);
ExecuteTheRecipe.WritePLC("料仓4手动开关", false, null);
ExecuteTheRecipe.WritePLC("料仓5手动开关", false, null);
ExecuteTheRecipe.WritePLC("料仓6手动开关", false, null);
ExecuteTheRecipe.WritePLC("料仓7手动开关", false, null);
finish();
}
});


+ 237
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/LogRecordActivity.java View File

@@ -0,0 +1,237 @@
package com.bonait.bnframework.modules.home.fragment.from;

import android.annotation.SuppressLint;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.bigkoo.pickerview.TimePickerView;
import com.bonait.bnframework.R;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.mode.BPA_LOG_RECORD;
import com.bonait.bnframework.common.db.util.LogRecordUtil;
import com.bonait.bnframework.common.helper.DateUtils;
import com.bonait.bnframework.common.utils.AlertDialogUtils;
import com.bonait.bnframework.common.utils.ToastUtils;
import com.bonait.bnframework.databinding.ActivityLogRecordBinding;
import com.bonait.bnframework.databinding.DialogLogDescHBinding;
import com.bonait.bnframework.modules.home.adapter.LocalLogAdapter;
import com.bonait.bnframework.ui.util.DisplayManager;
import com.bonait.bnframework.ui.widget.NewToastUtil;
import com.bonait.bnframework.ui.widget.XComDialog;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

/**
* 日志页面
*/
public class LogRecordActivity extends BaseActivity {
private ActivityLogRecordBinding viewBinding;
/**
* 日志数据
*/
ArrayList<BPA_LOG_RECORD> dataLogs = new ArrayList<>();
private LocalLogAdapter adapter;
/**
* 日志类型
*/
List<String> typeMap = new ArrayList<>();
private TimePickerView pvTime;

private ViewGroup view;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
viewBinding = ActivityLogRecordBinding.inflate(getLayoutInflater());
setContentView(viewBinding.getRoot());
view=(ViewGroup)getWindow().getDecorView();
DisplayManager.scaleViewGroup(viewBinding.getRoot());
initTopBar();
Init();
}

private void initTopBar() {
viewBinding.btnQuery.requestFocus();
// viewBinding.topbar.setTitle("日志记录");
viewBinding.back.setOnClickListener(v->{
finish();
});
}

/**
* 初始化
*/
@SuppressLint("SimpleDateFormat")
private void Init(){

typeMap.add("全部日志");
typeMap.add("登录日志");
typeMap.add("角色操作日志");
typeMap.add("数据接收");
typeMap.add("上传日志");
typeMap.add("订单处理日志");
// typeMap.add("设备异常日志");
typeMap.add("页面上报日志");

viewBinding.btnQuery.setOnClickListener(v->{
if(ConfigName.getInstance().isFastClick()){
NewToastUtil.getInstance().showToast("点击过快!");
return;
}
Initdata();
});

ArrayAdapter<String> adapter2 = new ArrayAdapter<>(this, R.layout.spinner_text_item,typeMap);
adapter2.setDropDownViewResource(R.layout.spinner_dropdown_item);
viewBinding.spinner.setAdapter(adapter2);
String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(new Date().getTime() - 60*60 * 1000));
String time2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(new Date().getTime() ));
viewBinding.starttime.setText(time);
viewBinding.stoptime.setText(time2);
viewBinding.starttime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(ConfigName.getInstance().isFastClick()){
NewToastUtil.getInstance().showToast("点击过快!");
return;
}
if (pvTime != null) {
pvTime.show(viewBinding.starttime);
}
}
});
viewBinding.stoptime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(ConfigName.getInstance().isFastClick()){
NewToastUtil.getInstance().showToast("点击过快!");
return;
}
if (pvTime != null) {
pvTime.show(viewBinding.stoptime);
}
}
});

adapter = new LocalLogAdapter();
adapter.setCallBack(new LocalLogAdapter.ClickCallBack() {
@Override
public void onDescClick(View v, int position) {
AlertDialogUtils.showCancelAndConfirmDialog(LogRecordActivity.this, R.layout.dialog_log_desc_h, new XComDialog.OnDialogListener() {
@Override
public void onDialogClick(View layoutView, XComDialog xCom) {
DialogLogDescHBinding binding = DialogLogDescHBinding.bind(layoutView);
DisplayManager.scaleViewGroup(binding.getRoot());
binding.btnClose1.setOnClickListener(v->{
xCom.dismissX();
});
binding.logDesc.setText(adapter.getData().get(position).describe+"");
}
});
}
});
adapter.setNewData(dataLogs);
viewBinding.recycleView.setAdapter(adapter);


CalendarTime();
Initdata();
}
/**
* CalendarTime
* 时间选择器
*/
public void CalendarTime() {
//控制时间范围(如果不设置范围,则使用默认时间1900-2100年,此段代码可注释)
//因为系统Calendar的月份是从0-11的,所以如果是调用Calendar的set方法来设置时间,月份的范围也要是从0-11
Calendar selectedDate = Calendar.getInstance();
Calendar startDate = Calendar.getInstance();
startDate.set(2023, 0, 23);
Calendar endDate = Calendar.getInstance();
endDate.set(2099, 11, 28);
//时间选择器
pvTime = new TimePickerView.Builder(this, new TimePickerView.OnTimeSelectListener() {
@Override
public void onTimeSelect(Date date, View v) {//选中事件回调
// 这里回调过来的v,就是show()方法里面所添加的 View 参数,如果show的时候没有添加参数,v则为null
TextView btn = (TextView) v;
String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
btn.setText(time.replace(" ","\n"));
}
})
//年月日时分秒 的显示与否,不设置则默认全部显示
.setType(new boolean[]{true, true, true, true, true, false})
.setLabel("年", "月", "日", "时", "分", "秒")
.isCenterLabel(true)
.setDividerColor(Color.DKGRAY)
.setContentSize(26)//字号
.setDate(selectedDate)
.setRangDate(startDate, endDate)
.setDecorView(view)
.build();


}


/**
* 初始化数据加载
*/
public void Initdata() {
try {
if(DateUtils.compareDate( viewBinding.stoptime.getText().toString(),viewBinding.starttime.getText().toString()))
{
ToastUtils.warning("开始时间不能大于结束时间!!!");
return;
}
String lx= viewBinding.spinner.getSelectedItem().toString();
String text= viewBinding.edittext.getText().toString();
dataLogs.clear();
if(lx.equals("全部日志")){
dataLogs.addAll(LogRecordUtil.getLogByFilter(viewBinding.starttime.getText().toString(), viewBinding.stoptime.getText().toString(), "",text));
}else {
dataLogs.addAll(LogRecordUtil.getLogByFilter(viewBinding.starttime.getText().toString(), viewBinding.stoptime.getText().toString(), lx,text));
}
adapter.notifyDataSetChanged();

} catch (Exception e) {

}
}

@Override
public void onDestroy() {
super.onDestroy();
if(dataLogs!=null){
dataLogs.clear();
dataLogs = null;
}
if(adapter!=null){
adapter = null;
}
viewBinding.recycleView.setAdapter(null);
viewBinding.spinner.setAdapter(null);
if(typeMap!=null){
typeMap.clear();
typeMap = null;
}
}

@Override
protected boolean canDragBack() {
return false;
}

@Override
protected String getClassName() {
return "日志记录页";
}
}

+ 17
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/add_silos_message.java View File

@@ -20,6 +20,7 @@ import androidx.annotation.Nullable;

import com.bonait.bnframework.R;
import com.bonait.bnframework.business.ExecuteTheRecipe;
import com.bonait.bnframework.business.RecordManager;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.db.QueryDB;
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE;
@@ -172,7 +173,21 @@ public class add_silos_message extends LinearLayout {
ToastUtils.error("校准重量!" + e.getMessage());
return;
}
ExecuteTheRecipe.WritePLC("料仓"+mode.num+"校准值",jzzl_1,null);
int finalJzzl_ = jzzl_1;
ExecuteTheRecipe.WritePLC("料仓" + mode.num + "校准值", jzzl_1, new IWriteCallBack() {
@Override
public void onSuccess() {
ToastUtils.info("成功写入 料仓" + mode.num + "校准值"+finalJzzl_ );
RecordManager.getInstance().addLogRecord("角色操作日志","料仓" + mode.num + "校准值 写入成功 "+"校准重量:"+ finalJzzl_);
}

@Override
public void onFailure(String ErrorMsg) {
ToastUtils.info("失败写入 料仓" + mode.num + "校准值"+finalJzzl_ );
RecordManager.getInstance().addLogRecord("角色操作日志","料仓" + mode.num + "校准值 写入失败 "+"校准重量:"+ finalJzzl_);

}
});
ToastUtils.warning("调料标定成功!");
break;
case R.id.save_ghtl:
@@ -328,6 +343,7 @@ public class add_silos_message extends LinearLayout {
if(obj1!=null)
{
String s = String.valueOf(obj1);
ToastUtils.warning("读取"+"料仓"+mode.num+"校准值 失败");
//jzz = String.format("%.1f", (Double.parseDouble(s) / 10));
jzz = s;//String.format("%.1f", (Double.parseDouble(s)));
}else


+ 20
- 0
app/src/main/res/drawable/btn_normal_bg.xml View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:state_pressed="true">
<shape>
<corners android:radius="5dp"/>
<solid android:color="#FF9800"/>
</shape>

</item>


<item>
<shape>
<corners android:radius="5dp"/>
<solid android:color="#8477FE"/>
</shape>

</item>
</selector>

+ 11
- 0
app/src/main/res/drawable/edit_input_bg.xml View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
>
<shape>
<solid android:color="@color/transparent" />
<stroke
android:width="1dp"
android:color="@color/button_border" />
<corners android:radius="5dp"/>
</shape>
</inset>

+ 220
- 0
app/src/main/res/layout/activity_log_record.xml View File

@@ -0,0 +1,220 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/white"
android:id="@+id/root"
android:fitsSystemWindows="true">



<RelativeLayout
android:id="@+id/tabs"
android:layout_marginTop="@dimen/home_tab_height"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:layout_marginTop="@dimen/dp_10"
android:id="@+id/ll_time"
android:layout_width="match_parent"
android:layout_height="70dp"
android:orientation="horizontal"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_5"
android:gravity="center_vertical"
android:textColor="@color/black"
android:textSize="@dimen/sp_26"
android:text="时间:"
android:focusableInTouchMode="true"
android:focusable="true"
>
<requestFocus/>
</TextView>
<TextView
android:id="@+id/starttime"
android:layout_width="@dimen/dp_200"
android:layout_height="match_parent"
android:padding="3dp"
android:textColor="@color/foreground"
android:background="@drawable/input_bj"
android:layout_marginLeft="@dimen/dp_5"
tools:text="2023-02-33 00:00:00"
android:gravity="center"
android:textSize="@dimen/sp_26"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:gravity="center_vertical"
android:textColor="@color/black"
android:textSize="@dimen/sp_26"
android:text="—"/>
<EditText
android:id="@+id/stoptime"
android:layout_width="@dimen/dp_200"
android:layout_height="match_parent"
android:focusable="false"
android:textColor="@color/foreground"
android:background="@drawable/input_bj"
android:layout_marginLeft="@dimen/dp_5"
android:text="2023-02-33 00:00:00"
android:gravity="center"
android:textSize="@dimen/sp_26"/>


</LinearLayout>

<LinearLayout
android:layout_below="@id/ll_time"
android:layout_marginTop="10dp"
android:id="@+id/ll2"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_5"
android:gravity="center_vertical"
android:textColor="@color/black"
android:textSize="@dimen/sp_26"
android:text="类型:"/>
<Spinner
android:id="@+id/spinner"
android:layout_width="@dimen/dp_300"
android:layout_height="match_parent"
style="@style/commonSpinnerStyle"/>
<EditText
android:id="@+id/edittext"
android:layout_width="@dimen/dp_400"
android:layout_height="match_parent"
android:inputType="text"
android:padding="3dp"
android:textColor="@color/foreground"
android:background="@drawable/input_bj"
android:hint="请输入查询条件"
android:maxLines="1"
android:layout_marginStart="20dp"
android:textSize="@dimen/sp_26"/>
</LinearLayout>



<LinearLayout
android:layout_below="@id/ll2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:background="@color/color3"
android:orientation="horizontal"
android:layout_height="@dimen/dp_50">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="@dimen/sp_26"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志类型"
android:textStyle="bold"
android:textColor="@color/white" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2.5">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="@dimen/sp_26"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志时间"
android:textStyle="bold"
android:textColor="@color/white"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="@dimen/sp_26"
android:layout_marginLeft="20dp"
android:layout_alignParentLeft="true"
android:text="日志描述"
android:textStyle="bold"
android:textColor="@color/white"/>
</RelativeLayout>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycle_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
/>
</LinearLayout>


<Button
android:id="@+id/btn_query"
android:text="查 询"
android:background="@drawable/bg_btn_login_selected"
android:textSize="@dimen/sp_32"
android:layout_marginLeft="@dimen/dp_10"
android:layout_gravity="center"
android:layout_width="@dimen/dp_180"
android:layout_height="70dp"
android:layout_marginTop="@dimen/dp_10"
android:textColor="@color/white"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/dp_10"
/>
</RelativeLayout>

<com.qmuiteam.qmui.widget.QMUITopBarLayout
android:id="@+id/topbar"
android:layout_width="match_parent"
android:layout_height="@dimen/home_tab_height" >
<TextView
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="@color/white"
android:textSize="@dimen/sp_32"
android:text=" 返 回"
android:paddingRight="@dimen/dp_50"
android:drawableLeft="@mipmap/fanhui"
android:gravity="center"
android:paddingLeft="@dimen/dp_5"
android:drawablePadding="@dimen/dp_5"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="日志记录"
android:textColor="@color/white"
android:textSize="36sp"
android:layout_gravity="center"
android:gravity="center"
/>
</com.qmuiteam.qmui.widget.QMUITopBarLayout>
</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>

+ 15
- 0
app/src/main/res/layout/fragment_home4.xml View File

@@ -162,6 +162,21 @@
android:textSize="80dp" />
</RelativeLayout>

<TextView
android:id="@+id/btn_log"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="0dp"
android:text="日志记录"
android:textStyle="bold"
android:textSize="30dp"
android:gravity="right|center"
android:paddingRight="10dp"
android:textColor="@color/red"
android:elevation="40dp"/>

<Button
android:id="@+id/zhuxiaodenglu"
android:layout_width="120dp"


+ 59
- 0
app/src/main/res/layout/item/layout/dialog_log_desc_h.xml View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="center"
android:background="@color/transparent"
android:layout_height="wrap_content">

<RelativeLayout
android:layout_width="650dp"
android:background="@drawable/bg_round25_white"
android:layout_gravity="center"
android:gravity="center"
android:layout_height="700dp">
<TextView
android:id="@+id/title1"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_80"
android:background="@drawable/bg_round25_top_yellow"
style="@style/TextView_btn_dialog"
android:text="日志详情"
/>

<ImageView
android:id="@+id/btn_close1"
android:layout_width="@dimen/dp_80"
android:layout_marginEnd="20dp"
android:layout_height="@dimen/dp_80"
style="@style/TextView_btn_dialog"
android:layout_alignParentEnd="true"
android:background="@mipmap/ic_clear_white_48dp"
/>

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="80dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/log_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="22sp"
android:padding="20dp"
android:layout_gravity="center"
android:textColor="@color/black"
/>
</LinearLayout>
</ScrollView>


</RelativeLayout>

</LinearLayout>

+ 3
- 3
app/src/main/res/layout/item/layout/item_log.xml View File

@@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="@dimen/sp_26"
android:textSize="@dimen/sp_20"
android:layout_alignParentLeft="true"
tools:text="角色操作日志"
android:textColor="@color/black" />
@@ -30,7 +30,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="@dimen/sp_26"
android:textSize="@dimen/sp_20"
android:layout_marginLeft="10dp"
tools:text="yyyy-MM-dd 00:00:00"
android:textColor="@color/black"/>
@@ -44,7 +44,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="@dimen/sp_26"
android:textSize="@dimen/sp_20"
android:ellipsize="end"
android:maxLines="1"
android:singleLine="true"


+ 3
- 0
app/src/main/res/values/colors.xml View File

@@ -17,6 +17,9 @@
<color name="tab_text_normal">#99a0aa</color>
<color name="tab_11">#EFE9D2</color>

<color name="button_border">#BBBBBB</color>
<color name="text_gray">#605F5F</color>
<color name="red">#FF2C00</color>


<!-- common -->


+ 2
- 2
build.gradle View File

@@ -35,8 +35,8 @@ task clean(type: Delete) {

ext { // 统一版本入口
//App版本号
versionCode = 107
versionName = "1.0.7"
versionCode = 108
versionName = "1.0.8"

// 支持Android版本
buildToolsVersion = "33.0.0"


Loading…
Cancel
Save