1个文件已添加
11个文件已修改
3 文件已重命名
| | |
| | | minSdk 23 |
| | | targetSdk 30 |
| | | versionCode 1 |
| | | versionName "1.3.3"//版本规则1.3是产品功能迭代用的,最后一位0是我们修复bug用的 |
| | | versionName "1.4.0"//版本规则1.3是产品功能迭代用的,最后一位0是我们修复bug用的 |
| | | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| | | multiDexEnabled true |
| | | manifestPlaceholders = mfph |
| | |
| | | implementation 'cn.jiguang.sdk:jpush-google:5.2.2' |
| | | //分析和用户标签等功能(可选,集成极光分析SDK后,即可支持行为触发推送消息、推送转化率统计,用户行为分) |
| | | implementation 'cn.jiguang.sdk:joperate:2.0.2' |
| | | |
| | | |
| | | |
| | | //若不集成厂商通道,可直接跳过以下依赖 |
| | |
| | | package com.hdl.photovoltaic.internet.api; |
| | | |
| | | public class TopicApi { |
| | | |
| | | |
| | | /* |
| | | *逆变器热点配置 |
| | | * */ |
| | | public static final String DELETING_GATEWAY_HOTSPOT_EDIT = "/user/%s/custom/hotspot/edit"; |
| | | /* |
| | | *逆变器热点获取 |
| | | * */ |
| | | public static final String DELETING_GATEWAY_HOTSPOT_GET = "/user/%s/custom/hotspot/get"; |
| | | |
| | | |
| | | /* |
| | | *逆变器wif配置 |
| | | * */ |
| | | public static final String DELETING_GATEWAY_WIFI_EDIT = "/user/%s/custom/wifi/edit"; |
| | | /* |
| | | *逆变器wifi获取 |
| | | * */ |
| | | public static final String DELETING_GATEWAY_WIFI_GET = "/user/%s/custom/wifi/get"; |
| | | |
| | | /* |
| | | *逆变器wifi状态通知 |
| | | * */ |
| | | public static final String DELETING_GATEWAY_WIFI_NOTIFY = "/user/%s/custom/wifi/notify"; |
| | | /* |
| | | *逆变器以太网配置 |
| | | * */ |
| | | public static final String DELETING_GATEWAY_ETHERNET_EDIT = "/user/%s/custom/ethernet/edit"; |
| | | /* |
| | | *逆变器以太网获取 |
| | | * */ |
| | | public static final String DELETING_GATEWAY_ETHERNET_GET = "/user/%s/custom/ethernet/get"; |
| | | |
| | | /* |
| | | *通知删除并退网子设备拓扑关系 |
| | | *删除从网关 |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 刷新逆变器缓存信息(包括设置mqtt秘钥) |
| | | * 注: |
| | |
| | | package com.hdl.photovoltaic.other; |
| | | |
| | | |
| | | import android.util.LruCache; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.utils.TimeUtils; |
| | |
| | | |
| | | //默认打印标题 |
| | | private static String logTitle = "自定义输出打印信息"; |
| | | |
| | | private static Gson gson = new Gson(); |
| | | |
| | | /** |
| | | * java打印 |
| | |
| | | * @param isAddToMemory 是否加入内存(本地日志用到) |
| | | */ |
| | | private static void printBase(String msg, String code, boolean isAddToMemory) { |
| | | CustomLogObject customLogObject = new CustomLogObject(); |
| | | customLogObject.msgOrData = msg; |
| | | customLogObject.code = code; |
| | | String json = logTitle + (UserConfigManage.getInstance().isBAccount() ? "(B端):" : "(C端):"); |
| | | json += customLogObject.getJointMessage(); |
| | | if (isPrintLogcat) { |
| | | System.out.println(json); |
| | | } |
| | | if (isAddToMemory) { |
| | | writeLog(customLogObject.getJointMessage()); |
| | | try { |
| | | CustomLogObject customLogObject = new CustomLogObject(); |
| | | customLogObject.setMsgOrData(msg); |
| | | customLogObject.setCode(code); |
| | | String json = logTitle + (UserConfigManage.getInstance().isBAccount() ? "(B端)==" : "(C端)==") + gson.toJson(customLogObject); |
| | | if (isPrintLogcat) { |
| | | System.out.println(json); |
| | | } |
| | | if (isAddToMemory) { |
| | | writeLog(json); |
| | | } |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | | |
| | |
| | | * 自定义日志类 |
| | | */ |
| | | static class CustomLogObject { |
| | | |
| | | //信息描述 |
| | | public String msgOrData = ""; |
| | | private String msgOrData; |
| | | |
| | | //状态码 |
| | | public String code = "0"; |
| | | private String code; |
| | | |
| | | public String getJointMessage() { |
| | | |
| | | if ("0".equals(code)) { |
| | | return msgOrData; |
| | | } |
| | | return msgOrData + "(" + code + ")"; |
| | | |
| | | public String getMsgOrData() { |
| | | return msgOrData == null ? "" : msgOrData; |
| | | } |
| | | |
| | | public void setMsgOrData(String msgOrData) { |
| | | this.msgOrData = msgOrData; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code == null ? "0" : code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpServer; |
| | | import com.hdl.photovoltaic.internet.TcpClient; |
| | | import com.hdl.photovoltaic.internet.api.HttpApi; |
| | | import com.hdl.photovoltaic.internet.api.TopicApi; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.listener.LinkCallBack; |
| | |
| | | import com.hdl.sdk.link.core.connect.HDLModBusConnect; |
| | | import com.hdl.sdk.link.core.connect.HDLUdpConnect; |
| | | import com.hdl.sdk.link.gateway.HDLLinkLocalGateway; |
| | | import com.huawei.hms.api.Api; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | import org.json.JSONObject; |
| | |
| | | */ |
| | | public class HdlUniLogic implements HDLUniMPSDKManager.IOnOtherUniMPEventCallBack { |
| | | private static volatile HdlUniLogic sHdlUniLogic; |
| | | |
| | | public final static String separator="---"; |
| | | |
| | | /** |
| | | * 获取当前对象 |
| | |
| | | } |
| | | String type = getKeyValue("type", data);//小类 |
| | | String logTag = getKeyValue("logTag", data);//标记uni指令 |
| | | String mode_type = "大类->" + topic + "--->" + "小类->" + type;//用来打印的 |
| | | HdlLogLogic.print(logTag + ":" + "uni--->发送--->" + mode_type + "\r\n" + data, true); |
| | | String mode_type = "大类-" + topic + "---" + "小类-" + type;//用来打印的 |
| | | HdlLogLogic.print(logTag + ":" + "uni---发送---" + mode_type + "\r\n" + data, true); |
| | | if (HDLUniMP.UNI_EVENT_REPLY_USER_MODEL.equals(topic)) { |
| | | //用户模块 |
| | | switch (type) { |
| | |
| | | WifiUtils wifiUtils = WifiUtils.getInstance(); |
| | | //wifi模块 |
| | | switch (type) { |
| | | //获取wifi列表 |
| | | case HDLUniMP.UNI_EVENT_REPLY_WIFI_LIST: { |
| | | //获取手机wifi列表 |
| | | case HDLUniMP.UNI_EVENT_REPLY_PHONE_WIFI_LIST: { |
| | | if (callback != null) { |
| | | uniCallbackData(mode_type, wifiUtils.getScanResult(), callback); |
| | | } |
| | | } |
| | | break; |
| | | //当前wifi详情 |
| | | case HDLUniMP.UNI_EVENT_REPLY_WIFI_PHONE_INFO: { |
| | | //获取手机当前wifi详情 |
| | | case HDLUniMP.UNI_EVENT_REPLY_PHONE_WIFI_INFO: { |
| | | if (callback != null) { |
| | | uniCallbackData(mode_type, wifiUtils.getCurrentConnectWifiInfo(), callback); |
| | | } |
| | | } |
| | | break; |
| | | //配置WiFi信息给逆变器 |
| | | case HDLUniMP.UNI_EVENT_REPLY_WIFI_SET_DEVICE: { |
| | | String mac = getKeyValue("mac", getKeyValue("data", data));// |
| | | String wif_type = getKeyValue("wif_type", getKeyValue("data", data));//1:热点,2:无线wifi,3:以太网 |
| | | String ssid = getKeyValue("ssid", getKeyValue("data", data));// |
| | | String password = getKeyValue("password", getKeyValue("data", data));// |
| | | startTcpThreadSendAccountAndPassword(mode_type, ssid, password, callback); |
| | | |
| | | } |
| | | break; |
| | | //打开手机Wifi设置界面 |
| | | case HDLUniMP.UNI_EVENT_REPLY_OPEN_WIFI_SETTINGS: { |
| | | case HDLUniMP.UNI_EVENT_REPLY_PHONE_OPEN_WIFI_SETTINGS: { |
| | | Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS); |
| | | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| | | HDLApp.getInstance().startActivity(intent); |
| | | } |
| | | //逆变器WiFi信息配置 |
| | | case HDLUniMP.UNI_EVENT_REPLY_DEVICE_WIFI_SET: { |
| | | uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_WIFI_EDIT, callback); |
| | | } |
| | | break; |
| | | //逆变器WiFi信息获取 |
| | | case HDLUniMP.UNI_EVENT_REPLY_DEVICE_WIFI_GET: { |
| | | uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_WIFI_GET, callback); |
| | | } |
| | | break; |
| | | //逆变器热点配置 |
| | | case HDLUniMP.UNI_EVENT_REPLY_DEVICE_HOTSPOT_SET: { |
| | | uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_HOTSPOT_EDIT, callback); |
| | | } |
| | | break; |
| | | //逆变器热点获取 |
| | | case HDLUniMP.UNI_EVENT_REPLY_DEVICE_HOTSPOT_GET: { |
| | | uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_HOTSPOT_GET, callback); |
| | | } |
| | | break; |
| | | //逆变器以太网配置 |
| | | case HDLUniMP.UNI_EVENT_REPLY_DEVICE_ETHERNET_SET: { |
| | | uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_ETHERNET_EDIT, callback); |
| | | } |
| | | break; |
| | | //逆变器以太网获取 |
| | | case HDLUniMP.UNI_EVENT_REPLY_DEVICE_ETHERNET_GET: { |
| | | uniGetAndSetNetwork(mode_type, data, TopicApi.DELETING_GATEWAY_ETHERNET_GET, callback); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | } else if (HDLUniMP.UNI_EVENT_REPLY_OTA_MODEL.equals(topic)) { |
| | | //OTA升级模块 |
| | |
| | | //专门收集uni日志 |
| | | case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNI_LOG: { |
| | | String customizeContentFormat = getKeyValue("customizeContentFormat", getKeyValue("data", data)); |
| | | HdlLogLogic.print("uni--->log--->" + customizeContentFormat, true); |
| | | HdlLogLogic.print("uni---log---" + customizeContentFormat, true); |
| | | |
| | | } |
| | | break; |
| | |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | HdlLogLogic.print("uni--->发送--->" + e.getMessage(), true); |
| | | HdlLogLogic.print("uni---发送---" + e.getMessage(), true); |
| | | } |
| | | |
| | | } |
| | |
| | | public void openUniMP(String path, JSONObject jsonObject) { |
| | | JSONObject json = this.createdJSONObject(jsonObject, true); |
| | | HDLUniMPSDKManager.getInstance().openUniMP(HDLUniMP.UNI_APP_ID, path, json, HdlUniLogic.this); |
| | | HdlLogLogic.print("uni--->组装uni发送数据格式--->" + json, false); |
| | | HdlLogLogic.print("uni---组装uni发送数据格式---" + json, false); |
| | | } |
| | | |
| | | /** |
| | |
| | | try { |
| | | HDLUniMPSDKManager.getInstance().sendUniMPEvent(HDLUniMP.UNI_APP_ID, topic, getJSONObject(callBackBaseBean)); |
| | | } catch (Exception e) { |
| | | HdlLogLogic.print("uni--->原生主动向小程序发送通知事件--->" + e.getMessage(), false); |
| | | HdlLogLogic.print("uni---原生主动向小程序发送通知事件---" + e.getMessage(), false); |
| | | } |
| | | } |
| | | |
| | |
| | | //endregion |
| | | |
| | | //region ******uni接口方法****** |
| | | |
| | | |
| | | /** |
| | | * 获取或者配置逆变器网络(包括逆变器热点,wifi,以太网)信息 |
| | | */ |
| | | private void uniGetAndSetNetwork(String type, Object data, String TopicApi, DCUniMPJSCallback callback) { |
| | | String mac = getKeyValue("mac", getKeyValue("data", data)); |
| | | JsonObject jObject = null; |
| | | String attribute_data = getKeyValue("attribute_data", getKeyValue("data", data)); |
| | | if (!TextUtils.isEmpty(attribute_data)) { |
| | | try { |
| | | jObject = new Gson().fromJson(attribute_data, JsonObject.class); |
| | | } catch (Exception ignored) { |
| | | jObject = new JsonObject(); |
| | | } |
| | | } |
| | | //解密负载数据(写密钥给网关一定是明文,因为那时网关还没有密钥) |
| | | TcpClient.getInstance().sendDataToLinkGateway(mac, false, TopicApi, jObject, "", new HDLLinkCallBack() { |
| | | @Override |
| | | public void onSuccess(String msg) { |
| | | if (callback != null) { |
| | | uniCallbackData(type, msg, callback); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onError(HDLLinkException e) { |
| | | if (callback != null) { |
| | | uniCallbackData(type, null, e.getCode(), e.getMsg(), callback); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取位置信息,包括经纬度 |
| | |
| | | @Override |
| | | public void onSuccess(Boolean b) { |
| | | if (b) { |
| | | HdlLogLogic.print("本地升级--->", true); |
| | | HdlLogLogic.print("本地升级---", true); |
| | | //本地 |
| | | //1,建立本地服务; |
| | | //2,告诉网关手机ip和端口; |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | HdlLogLogic.print("在线升级--->", true); |
| | | HdlLogLogic.print("在线升级---", true); |
| | | //远程升级需要检测在逆变器有没有连接上云 |
| | | HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() { |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("在线升级--->", true); |
| | | HdlLogLogic.print("在线升级---", true); |
| | | //远程升级需要检测在逆变器有没有连接上云 |
| | | HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() { |
| | | @Override |
| | |
| | | @Override |
| | | public void onSuccess(Boolean b) { |
| | | if (b) { |
| | | HdlLogLogic.print("本地升级--->", true); |
| | | HdlLogLogic.print("本地升级---", true); |
| | | //本地 |
| | | //1,建立本地服务; |
| | | // 2,告诉网关手机ip和端口; |
| | |
| | | } |
| | | }); |
| | | } else { |
| | | HdlLogLogic.print("在线升级--->", true); |
| | | HdlLogLogic.print("在线升级---", true); |
| | | //远程升级需要【检测】在逆变器有没有连接上云 |
| | | HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() { |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("在线升级--->", true); |
| | | HdlLogLogic.print("在线升级---", true); |
| | | //远程升级需要【检测】在逆变器有没有连接上云 |
| | | HdlDeviceLogic.getInstance().checkInverterConnectedCloud(homeId, deviceMac, new CloudCallBeak<CloudInverterDeviceBean>() { |
| | | @Override |
| | |
| | | String tempData = getKeyValue("data", data); |
| | | if (TextUtils.isEmpty(tempData)) { |
| | | uniCallbackData(type, null, -2, "data内容为空", callback); |
| | | //HdlLogLogic.print("data内容为空--->", false); |
| | | //HdlLogLogic.print("data内容为空---", false); |
| | | return; |
| | | } |
| | | ModBusBean modBusBean = new Gson().fromJson(tempData, ModBusBean.class); |
| | |
| | | // } |
| | | if (modBusBean.getMac() == null || modBusBean.getData() == null) { |
| | | uniCallbackData(type, null, -2, "发送失败,(mac或者oid)为空", callback); |
| | | //HdlLogLogic.print("uni--->发送--->ModBus--->发送失败,(mac或者oid)为空." + Arrays.toString(modBusBean.getData()), true); |
| | | //HdlLogLogic.print("uni---发送---ModBus---发送失败,(mac或者oid)为空." + Arrays.toString(modBusBean.getData()), true); |
| | | return; |
| | | } |
| | | |
| | | //HdlLogLogic.print("uni--->发送--->ModBus--->" + Arrays.toString(modBusBean.getData()), true); |
| | | //HdlLogLogic.print("uni---发送---ModBus---" + Arrays.toString(modBusBean.getData()), true); |
| | | //发送modbus协议 |
| | | HDLModBusConnect.getInstance().Send(modBusBean.getMac(), modBusBean.getData(), new ModbusCallBack() { |
| | | @Override |
| | | public void onSuccess(int[] data) { |
| | | uniCallbackData(type, data, callback); |
| | | // HdlLogLogic.print("uni--->接收--->ModBus--->" + Arrays.toString(data), true); |
| | | // HdlLogLogic.print("uni---接收---ModBus---" + Arrays.toString(data), true); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onError(HDLLinkException e) { |
| | | uniCallbackData(type, null, e.getCode(), e.getMsg(), callback); |
| | | // HdlLogLogic.print("uni--->接收--->ModBus--->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | // HdlLogLogic.print("uni---接收---ModBus---" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | } |
| | | }); |
| | | } |
| | |
| | | uniCallBackBaseBean.setData(data); |
| | | return getJSONObject(uniCallBackBaseBean); |
| | | } catch (Exception e) { |
| | | HdlLogLogic.print("uni--->组装发送给uni数据格式有异常--->" + e.getMessage(), false); |
| | | HdlLogLogic.print("uni---组装发送给uni数据格式有异常---" + e.getMessage(), false); |
| | | } |
| | | return new JSONObject(); |
| | | } |
| | |
| | | if (callback != null) { |
| | | callback.invoke(getJSONObject(uniCallBackBaseBean)); |
| | | // callback.invoke(uniCallBackBaseBean); |
| | | HdlLogLogic.print("uni--->回复--->" + type + "--->" + new Gson().toJson(uniCallBackBaseBean), true); |
| | | HdlLogLogic.print("uni---回复---" + type + "---" + new Gson().toJson(uniCallBackBaseBean), true); |
| | | } |
| | | } catch (Exception e) { |
| | | HdlLogLogic.print("uni--->回复--->" + type + "--->" + e.getMessage(), true); |
| | | HdlLogLogic.print("uni---回复---" + type + "---" + e.getMessage(), true); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.appcompat.content.res.AppCompatResources; |
| | | import androidx.fragment.app.Fragment; |
| | | import androidx.fragment.app.FragmentManager; |
| | | import androidx.fragment.app.FragmentTransaction; |
| | | |
| | | import android.Manifest; |
| | | import android.content.Context; |
| | |
| | | import com.hdl.photovoltaic.other.HdlUniLogic; |
| | | import com.hdl.photovoltaic.ui.bean.DeviceRemoteInfo; |
| | | import com.hdl.photovoltaic.ui.bean.OidBean; |
| | | import com.hdl.photovoltaic.ui.home.HomePageFragment; |
| | | import com.hdl.photovoltaic.ui.me.MeFragment; |
| | | import com.hdl.photovoltaic.ui.message.MessageFragment; |
| | | import com.hdl.photovoltaic.ui.powerstation.HouseListFragment; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.utils.AppManagerUtils; |
| | | import com.hdl.photovoltaic.utils.GPSManagerUtils; |
| | |
| | | import org.greenrobot.eventbus.ThreadMode; |
| | | |
| | | import java.lang.reflect.Type; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import cn.jpush.android.api.JPushInterface; |
| | |
| | | */ |
| | | public class BPowerStationActivity extends CustomBaseActivity { |
| | | |
| | | private static final String CURRENT_FRAGMENT = "state_fragment_show"; |
| | | private FragmentManager mFragmentManager; |
| | | private Fragment currentFragment = new Fragment(); |
| | | private final List<Fragment> fragmentList = new ArrayList<>(); |
| | | private int currentFragmentIndex = 0; |
| | | |
| | | private ActivityMyPowerStationBinding viewBinding; |
| | | private int currentFragmentIndex = 0; |
| | | private EventListener allTopicsListener; |
| | | private int backPressTimes; |
| | | |
| | |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | // setNotificationBarBackgroundColor(CustomColor.blue); |
| | | setStatusBarTranslucent(); |
| | | //初始化碎片 |
| | | initFragment(savedInstanceState); |
| | | //初始化 |
| | | this.initView(); |
| | | //初始化界面监听器 |
| | |
| | | this.clickJpushNotificationMessage(); |
| | | //初始化权限 |
| | | this.requestPermissions(); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 初始化Fragment |
| | | * |
| | | * @param savedInstanceState - |
| | | */ |
| | | private void initFragment(Bundle savedInstanceState) { |
| | | mFragmentManager = getSupportFragmentManager(); |
| | | //碎片初始化 |
| | | HomePageFragment mHomePageFragment = new HomePageFragment(); |
| | | HouseListFragment mHouseListFragment = new HouseListFragment(); |
| | | MessageFragment mMessageFragment = new MessageFragment(); |
| | | MeFragment mMeFragment = new MeFragment(); |
| | | if (savedInstanceState != null) { |
| | | //“内存重启”时调用 获取“内存重启”时保存的索引下标 |
| | | currentFragmentIndex = savedInstanceState.getInt(CURRENT_FRAGMENT, 0); |
| | | if (fragmentList.size() != 0) { |
| | | fragmentList.clear(); |
| | | } |
| | | fragmentList.add(mFragmentManager.findFragmentByTag(0 + "")); |
| | | fragmentList.add(mFragmentManager.findFragmentByTag(1 + "")); |
| | | fragmentList.add(mFragmentManager.findFragmentByTag(2 + "")); |
| | | fragmentList.add(mFragmentManager.findFragmentByTag(3 + "")); |
| | | restoreFragment();//恢复fragment页面 |
| | | } else { |
| | | //正常启动时调用 |
| | | fragmentList.add(mHomePageFragment); |
| | | fragmentList.add(mHouseListFragment); |
| | | fragmentList.add(mMessageFragment); |
| | | fragmentList.add(mMeFragment); |
| | | showFragment(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 使用show() hide()切换页面 |
| | | * 显示fragment |
| | | */ |
| | | private void showFragment() { |
| | | FragmentTransaction ft = mFragmentManager.beginTransaction(); |
| | | //如果之前没有添加过 |
| | | if (!fragmentList.get(currentFragmentIndex).isAdded()) { |
| | | //第三个参数为添加当前的fragment时绑定一个tag |
| | | ft.hide(currentFragment).add(R.id.module_fcv, fragmentList.get(currentFragmentIndex), currentFragmentIndex + ""); |
| | | } else { |
| | | ft.hide(currentFragment).show(fragmentList.get(currentFragmentIndex)); |
| | | } |
| | | currentFragment = fragmentList.get(currentFragmentIndex); |
| | | ft.commit(); |
| | | //把当前显示的fragment记录下来 |
| | | currentFragment = fragmentList.get(currentFragmentIndex); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 恢复fragment |
| | | */ |
| | | private void restoreFragment() { |
| | | FragmentTransaction ft = mFragmentManager.beginTransaction(); |
| | | for (int i = 0; i < fragmentList.size(); i++) { |
| | | if (i == currentFragmentIndex) { |
| | | ft.show(fragmentList.get(i)); |
| | | } else { |
| | | ft.hide(fragmentList.get(i)); |
| | | } |
| | | } |
| | | ft.commit(); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | currentFragmentIndex = 0; |
| | | bottomViewChangeOfStyle(); |
| | | showFragment(); |
| | | postEventBus(HomepageTitleTabSwitch.homepage); |
| | | } |
| | | }); |
| | |
| | | } |
| | | currentFragmentIndex = 1; |
| | | bottomViewChangeOfStyle(); |
| | | showFragment(); |
| | | postEventBus(HomepageTitleTabSwitch.powerstation); |
| | | } |
| | | }); |
| | |
| | | } |
| | | currentFragmentIndex = 2; |
| | | bottomViewChangeOfStyle(); |
| | | showFragment(); |
| | | postEventBus(HomepageTitleTabSwitch.message); |
| | | } |
| | | }); |
| | |
| | | } |
| | | currentFragmentIndex = 3; |
| | | bottomViewChangeOfStyle(); |
| | | showFragment(); |
| | | postEventBus(HomepageTitleTabSwitch.me); |
| | | } |
| | | }); |
| | |
| | | |
| | | private void bottomViewChangeOfStyle() { |
| | | if (this.currentFragmentIndex == 0) { |
| | | viewBinding.myHomePageFcv0.setVisibility(View.VISIBLE);//显示首页界面 |
| | | viewBinding.myPowerStationFcv1.setVisibility(View.GONE);//显示电站界面 |
| | | viewBinding.myMessageFcv2.setVisibility(View.GONE);//隐藏消息界面 |
| | | viewBinding.myMeFcv3.setVisibility(View.GONE);//隐藏我的界面 |
| | | //首页界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_selected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_90000000)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected)); |
| | |
| | | viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | } else if (this.currentFragmentIndex == 1) { |
| | | viewBinding.myHomePageFcv0.setVisibility(View.GONE);//隐藏首页界面 |
| | | viewBinding.myPowerStationFcv1.setVisibility(View.VISIBLE);//显示电站界面 |
| | | viewBinding.myMessageFcv2.setVisibility(View.GONE);//隐藏消息界面 |
| | | viewBinding.myMeFcv3.setVisibility(View.GONE);//隐藏我的界面 |
| | | //电站界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_selected)); |
| | |
| | | viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | } else if (this.currentFragmentIndex == 2) { |
| | | viewBinding.myHomePageFcv0.setVisibility(View.GONE);//隐藏首页界面 |
| | | viewBinding.myPowerStationFcv1.setVisibility(View.GONE);//隐藏电站界面 |
| | | viewBinding.myMessageFcv2.setVisibility(View.VISIBLE);//显示消息界面 |
| | | viewBinding.myMeFcv3.setVisibility(View.GONE);//隐藏我的界面 |
| | | //消息界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected)); |
| | |
| | | viewBinding.myMeBottomIl3.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.me_unselected)); |
| | | viewBinding.myMeBottomIl3.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | } else if (this.currentFragmentIndex == 3) { |
| | | viewBinding.myHomePageFcv0.setVisibility(View.GONE);//隐藏首页界面 |
| | | viewBinding.myPowerStationFcv1.setVisibility(View.GONE);//隐藏电站界面 |
| | | viewBinding.myMessageFcv2.setVisibility(View.GONE);//隐藏消息界面 |
| | | viewBinding.myMeFcv3.setVisibility(View.VISIBLE);//显示我的界面 |
| | | //我的界面 |
| | | viewBinding.myPowerStationBottomIl0.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.home_page_unselected)); |
| | | viewBinding.myPowerStationBottomIl0.titleTv.setTextColor(getColor(R.color.text_65000000)); |
| | | viewBinding.myPowerStationBottomIl1.iconIv.setImageDrawable(AppCompatResources.getDrawable(_mActivity, R.drawable.power_station_unselected)); |
| | |
| | | } |
| | | |
| | | |
| | | } else if (linkResponse.getTopic().endsWith("custom/wifi/notify")) { |
| | | //逆变器连接路由状态通知 |
| | | HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean(); |
| | | uniCallBackBaseBean.setType(linkResponse.getTopic()); |
| | | uniCallBackBaseBean.setData(linkResponse.getData()); |
| | | HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean); |
| | | HdlLogLogic.print(linkResponse.getTopic() + new Gson().toJson(linkResponse.getData()), true); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | |
| | | /** |
| | | * App启动页(目的是为了让用户点击APP图标的时候有一个瞬间响应的交互体验。) |
| | | */ |
| | |
| | | intent.setClass(this, LoginActivity.class); |
| | | openActivity(intent); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | super.onDestroy(); |
| | | overridePendingTransition(0, 0); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.hdl.photovoltaic.ui.home; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.util.AttributeSet; |
| | | |
| | | import com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView; |
| | | |
| | | import me.jessyan.autosize.AutoSize; |
| | | |
| | | public class AutoSizeMyAAChart extends AAChartView { |
| | | |
| | | public AutoSizeMyAAChart(Context context) { |
| | | super(context); |
| | | } |
| | | |
| | | public AutoSizeMyAAChart(Context context, AttributeSet attrs) { |
| | | super(context, attrs); |
| | | } |
| | | |
| | | public AutoSizeMyAAChart(Context context, AttributeSet attrs, int defStyleAttr) { |
| | | super(context, attrs, defStyleAttr); |
| | | } |
| | | |
| | | @Override |
| | | public void setOverScrollMode(int mode) { |
| | | super.setOverScrollMode(mode); |
| | | //图表屏幕适配 |
| | | AutoSize.autoConvertDensityOfGlobal((Activity) getContext()); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.hdl.photovoltaic.ui.home; |
| | | |
| | | |
| | | import static com.hdl.photovoltaic.ui.powerstation.aachart.CustomStyleChartComposer.configureColorfulColumnChart; |
| | | import static com.hdl.photovoltaic.ui.home.aachart.CustomStyleChartComposer.configureColorfulColumnChart; |
| | | |
| | | import android.os.Bundle; |
| | | import android.text.TextUtils; |
| | |
| | | import com.hdl.photovoltaic.ui.bean.DataOverBean; |
| | | import com.hdl.photovoltaic.ui.bean.SocialContributionBean; |
| | | import com.hdl.photovoltaic.ui.bean.StatisticsBean; |
| | | import com.hdl.photovoltaic.ui.powerstation.aachart.BasicChartComposer; |
| | | import com.hdl.photovoltaic.ui.home.aachart.BasicChartComposer; |
| | | import com.hdl.photovoltaic.utils.TimeUtils; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | |
| | |
| | | |
| | | FragmentHomePageBinding viewBinding; |
| | | |
| | | AAChartView aaChartView; |
| | | AutoSizeMyAAChart aaChartView; |
| | | |
| | | AAChartModel aaChartModel; |
| | | |
| | |
| | | |
| | | @Override |
| | | public void onBindView(Bundle savedInstanceState) { |
| | | |
| | | //初始化 |
| | | initView(); |
| | | //初始化界面监听器 |
| | | initEvent(); |
| | | //读取数据 |
| | | readDate(); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 读取数据 |
| | |
| | | readDate(); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | * 图表加载 |
| | | */ |
| | | private void setUpAAChartView() { |
| | | aaChartView = viewBinding.AAChartView; |
| | | aaChartView = viewBinding.autoSizeMyAAChart; |
| | | aaChartView.callBack = this; |
| | | if (TimeType.day.equals(timeType)) { |
| | | aaChartModel = BasicChartComposer.configureAreaChart("Pv发电功率", fieldNames, fieldValues); |
| | |
| | | aaChartModel = configureColorfulColumnChart("Pv发电功率", fieldNames, fieldValues); |
| | | } |
| | | aaChartView.aa_drawChartWithChartModel(aaChartModel); |
| | | |
| | | } |
| | | |
| | | private void initView() { |
File was renamed from app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/AAChartSymbolConst.java |
| | |
| | | package com.hdl.photovoltaic.ui.powerstation.aachart; |
| | | package com.hdl.photovoltaic.ui.home.aachart; |
| | | |
| | | import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartSymbolType; |
| | | |
File was renamed from app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/BasicChartComposer.java |
| | |
| | | package com.hdl.photovoltaic.ui.powerstation.aachart; |
| | | package com.hdl.photovoltaic.ui.home.aachart; |
| | | |
| | | import static com.github.AAChartModel.AAChartCore.AATools.AAColor.AARgba; |
| | | |
| | |
| | | import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartSymbolStyleType; |
| | | import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartSymbolType; |
| | | import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartType; |
| | | import com.github.AAChartModel.AAChartCore.AAChartEnum.AAChartZoomType; |
| | | import com.github.AAChartModel.AAChartCore.AAOptionsModel.AAStyle; |
| | | import com.github.AAChartModel.AAChartCore.AATools.AAColor; |
| | | import com.github.AAChartModel.AAChartCore.AATools.AAGradientColor; |
| | |
| | | // .markerSymbolStyle(AAChartSymbolStyleType.Normal) |
| | | .chartType(AAChartType.Area) |
| | | .categories(categories) |
| | | // .zoomType(AAChartZoomType.None)//手势缩放 |
| | | // .yAxisMax(500) |
| | | .yAxisMin(0) |
| | | .series(new AASeriesElement[]{element1}); |
File was renamed from app/src/main/java/com/hdl/photovoltaic/ui/powerstation/aachart/CustomStyleChartComposer.java |
| | |
| | | package com.hdl.photovoltaic.ui.powerstation.aachart; |
| | | package com.hdl.photovoltaic.ui.home.aachart; |
| | | |
| | | import static com.github.AAChartModel.AAChartCore.AATools.AAColor.AARgba; |
| | | import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.base64Symbol; |
| | | import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.imageSymbol; |
| | | import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.predefinedSymbol1; |
| | | import static com.hdl.photovoltaic.ui.powerstation.aachart.AAChartSymbolConst.predefinedSymbol2; |
| | | |
| | | import com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartModel; |
| | | import com.github.AAChartModel.AAChartCore.AAChartCreator.AASeriesElement; |
| | |
| | | .name("Predefined symbol") |
| | | .data(new Object[]{0.45, 0.43, 0.50, 0.55, 0.58, 0.62, 0.83, 0.39, 0.56, 0.67, 0.50, 0.34, 0.50, 0.67, 0.58, 0.29, 0.46, 0.23, 0.47, 0.46, 0.38, 0.56, 0.48, 0.36}) |
| | | .marker(new AAMarker() |
| | | .symbol(predefinedSymbol1)); |
| | | .symbol(AAChartSymbolConst.predefinedSymbol1)); |
| | | |
| | | AASeriesElement element2 = new AASeriesElement() |
| | | .name("Image symbol") |
| | | .data(new Object[]{0.38, 0.31, 0.32, 0.32, 0.64, 0.66, 0.86, 0.47, 0.52, 0.75, 0.52, 0.56, 0.54, 0.60, 0.46, 0.63, 0.54, 0.51, 0.58, 0.64, 0.60, 0.45, 0.36, 0.67}) |
| | | .marker(new AAMarker() |
| | | .symbol(imageSymbol)); |
| | | .symbol(AAChartSymbolConst.imageSymbol)); |
| | | |
| | | AASeriesElement element3 = new AASeriesElement() |
| | | .name("Base64 symbol (*)") |
| | | .data(new Object[]{0.46, 0.32, 0.53, 0.58, 0.86, 0.68, 0.85, 0.73, 0.69, 0.71, 0.91, 0.74, 0.60, 0.50, 0.39, 0.67, 0.55, 0.49, 0.65, 0.45, 0.64, 0.47, 0.63, 0.64}) |
| | | .marker(new AAMarker() |
| | | .symbol(base64Symbol)); |
| | | .symbol(AAChartSymbolConst.base64Symbol)); |
| | | |
| | | AASeriesElement element4 = new AASeriesElement() |
| | | .name("Custom symbol") |
| | | .data(new Object[]{0.60, 0.51, 0.52, 0.53, 0.64, 0.84, 0.65, 0.68, 0.63, 0.47, 0.72, 0.60, 0.65, 0.74, 0.66, 0.65, 0.71, 0.59, 0.65, 0.77, 0.52, 0.53, 0.58, 0.53}) |
| | | .marker(new AAMarker() |
| | | .symbol(predefinedSymbol2)); |
| | | .symbol(AAChartSymbolConst.predefinedSymbol2)); |
| | | |
| | | return new AAChartModel() |
| | | .chartType(AAChartType.Scatter) |
| | |
| | | public final static String UNI_EVENT_REPLY_MINE_SETTING = "setting";//设置 |
| | | |
| | | |
| | | /*********Wifi模块*********/ //卫锦定义 |
| | | /*********Wifi模块*********/ |
| | | public final static String UNI_EVENT_REPLY_WIFI_MODEL = "uni_wifi_model";//wifi模块(大类) |
| | | public final static String UNI_EVENT_REPLY_WIFI_LIST = "list";//获取wifi列表 |
| | | public final static String UNI_EVENT_REPLY_WIFI_PHONE_INFO = "wifi_phone_info";//获取当前wifi信息 |
| | | public final static String UNI_EVENT_REPLY_WIFI_SET_DEVICE = "wifi_set_device";//设置wifi给设备 |
| | | public final static String UNI_EVENT_REPLY_OPEN_WIFI_SETTINGS = "open_wifi_settings";//调用打开手机Wifi设置界面 |
| | | public final static String UNI_EVENT_REPLY_PHONE_WIFI_LIST = "phone_wifi_list";//手机获取wifi列表 |
| | | public final static String UNI_EVENT_REPLY_PHONE_WIFI_INFO = "phone_wifi_info";//手机获取当前wifi信息 |
| | | public final static String UNI_EVENT_REPLY_PHONE_OPEN_WIFI_SETTINGS = "phone_open_wifi_settings";//调用打开手机Wifi设置界面 |
| | | public final static String UNI_EVENT_REPLY_DEVICE_WIFI_SET = "device_wifi_set";//逆变器WiFi信息配置 |
| | | public final static String UNI_EVENT_REPLY_DEVICE_WIFI_GET = "device_wifi_get";//逆变器WiFi信息获取 |
| | | public final static String UNI_EVENT_REPLY_DEVICE_HOTSPOT_SET = "device_hotspot_set";//逆变器热点配置 |
| | | public final static String UNI_EVENT_REPLY_DEVICE_HOTSPOT_GET = "device_hotspot_get";//逆变器热点获取 |
| | | public final static String UNI_EVENT_REPLY_DEVICE_ETHERNET_SET = "device_ethernet_set";//逆变器以太网配置 |
| | | public final static String UNI_EVENT_REPLY_DEVICE_ETHERNET_GET = "device_ethernet_get";//逆变器以太网获取 |
| | | |
| | | //endregion |
| | | |
| | | //region --------【原生】主动发送到【小程序】-------- |
| | |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_ADD = "add";//设备添加 |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_DEL = "del";//设备删除 |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_OID = "oid";//设备【包括下挂设备】oid列表Remove interface |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_CONNECTION_STATUS = "connection_status";//逆变器连接路由器状态 |
| | | //endregion |
| | | |
| | | //region --------【原生】打开【小程序】-------- |
| | |
| | | android:background="@drawable/bj" |
| | | tools:context="com.hdl.photovoltaic.ui.BPowerStationActivity"> |
| | | |
| | | <!--首页-Fragment--> |
| | | <!--(首页-电站-消息-我的)-Fragment--> |
| | | <androidx.fragment.app.FragmentContainerView |
| | | android:id="@+id/module_fcv" |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | |
| | | android:id="@+id/my_home_page_fcv0" |
| | | android:name="com.hdl.photovoltaic.ui.home.HomePageFragment" |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:visibility="gone" |
| | | app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | <!--电站-Fragment--> |
| | | <androidx.fragment.app.FragmentContainerView |
| | | android:id="@+id/my_power_station_fcv1" |
| | | android:name="com.hdl.photovoltaic.ui.powerstation.HouseListFragment" |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:visibility="gone" |
| | | app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | <!--报警-Fragment--> |
| | | <androidx.fragment.app.FragmentContainerView |
| | | android:id="@+id/my_message_fcv2" |
| | | android:name="com.hdl.photovoltaic.ui.message.MessageFragment" |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:visibility="gone" |
| | | app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | <!--我的-Fragment--> |
| | | <androidx.fragment.app.FragmentContainerView |
| | | android:id="@+id/my_me_fcv3" |
| | | android:name="com.hdl.photovoltaic.ui.me.MeFragment" |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:visibility="gone" |
| | | app:layout_constraintBottom_toTopOf="@+id/my_power_station_bottom_ll" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toTopOf="parent" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/my_power_station_bottom_ll" |
| | |
| | | |
| | | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout |
| | | android:id="@+id/srl" |
| | | android:layout_width="0dp" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_marginTop="@dimen/dp_26" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | |
| | | |
| | | <ScrollView |
| | | android:id="@+id/sl" |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:layout_marginTop="@dimen/dp_26" |
| | | app:layout_constraintBottom_toBottomOf="parent" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@+id/home_page_title_tv"> |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_marginTop="@dimen/dp_26"> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:layout_width="match_parent" |
| | |
| | | |
| | | </RelativeLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <!--日期--> |
| | | <androidx.constraintlayout.widget.ConstraintLayout |
| | | android:id="@+id/home_page_station_data_cl" |
| | | android:layout_width="match_parent" |
| | |
| | | |
| | | </RelativeLayout> |
| | | |
| | | <com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView |
| | | android:id="@+id/AAChartView" |
| | | <FrameLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="284dp" |
| | | android:layout_marginTop="@dimen/dp_18" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@+id/chart_title_rl" /> |
| | | app:layout_constraintTop_toBottomOf="@+id/chart_title_rl"> |
| | | |
| | | <com.hdl.photovoltaic.ui.home.AutoSizeMyAAChart |
| | | android:id="@+id/autoSizeMyAAChart" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | |
| | | /> |
| | | </FrameLayout> |
| | | </androidx.constraintlayout.widget.ConstraintLayout> |
| | | |
| | | <androidx.constraintlayout.widget.ConstraintLayout |