Compare commits
2 Commits
16956f1086
...
20ff76b933
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20ff76b933 | ||
|
|
862c9c9a06 |
@@ -1 +1 @@
|
|||||||
#Thu Mar 19 17:33:53 CST 2026
|
#Wed Apr 08 14:56:42 CST 2026
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ android {
|
|||||||
applicationId "com.abbidot.tracker"
|
applicationId "com.abbidot.tracker"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion 35
|
targetSdkVersion 35
|
||||||
versionCode 2112
|
versionCode 2113
|
||||||
versionName "2.1.12"
|
// versionName "2.1.13"
|
||||||
// versionName "2.1.12-Beta4"
|
versionName "2.1.13-Beta3"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ data class MapDeviceBean(
|
|||||||
var startTime: String,
|
var startTime: String,
|
||||||
var endTime: String,
|
var endTime: String,
|
||||||
var deviceType: Int,
|
var deviceType: Int,
|
||||||
|
var wifiZoneName: String,
|
||||||
var notifyLocationFail: Boolean,
|
var notifyLocationFail: Boolean,
|
||||||
var canShowBattery: Boolean,//是否可以显示电池提示布局
|
var canShowBattery: Boolean,//是否可以显示电池提示布局
|
||||||
var isCloseBattery: Boolean,//是否关闭电池提示
|
var isCloseBattery: Boolean,//是否关闭电池提示
|
||||||
@@ -72,6 +73,7 @@ data class MapDeviceBean(
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
1,
|
1,
|
||||||
|
"",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
|||||||
@@ -18,8 +18,9 @@ data class PayResultBean(
|
|||||||
var expirationTime: String,
|
var expirationTime: String,
|
||||||
var deviceOutId: String,
|
var deviceOutId: String,
|
||||||
var deviceId: String,
|
var deviceId: String,
|
||||||
|
var deviceType: Int,
|
||||||
//设备充值类型,0=首次设备充值激活,1=已添加设备再次添加设备充值,2=给当前的设备续费或者升级套餐
|
//设备充值类型,0=首次设备充值激活,1=已添加设备再次添加设备充值,2=给当前的设备续费或者升级套餐
|
||||||
var rechargeType: Int
|
var rechargeType: Int
|
||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
constructor() : this("", "", "", 0L, "", "", "", ConstantInt.Type1)
|
constructor() : this("", "", "", 0L, "", "", "", 1, ConstantInt.Type1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ import androidx.annotation.IntDef
|
|||||||
ConstantInt.BasicPackage,
|
ConstantInt.BasicPackage,
|
||||||
ConstantInt.PremiumPackage,
|
ConstantInt.PremiumPackage,
|
||||||
ConstantInt.MinSportGoal,
|
ConstantInt.MinSportGoal,
|
||||||
|
ConstantInt.PetSpecialType,
|
||||||
|
ConstantInt.DefaultType,
|
||||||
ConstantInt.NoShare,
|
ConstantInt.NoShare,
|
||||||
ConstantInt.ReportTimeOutTime,
|
ConstantInt.ReportTimeOutTime,
|
||||||
ConstantInt.PetLocationType
|
ConstantInt.PetLocationType
|
||||||
@@ -100,6 +102,8 @@ annotation class ConstantInt {
|
|||||||
const val OtherLocationType = 2
|
const val OtherLocationType = 2
|
||||||
const val UserLocationType = 1
|
const val UserLocationType = 1
|
||||||
const val PetLocationType = 0
|
const val PetLocationType = 0
|
||||||
|
const val PetSpecialType = 3
|
||||||
|
const val DefaultType = 4
|
||||||
|
|
||||||
//默认的运动目标时间(min)
|
//默认的运动目标时间(min)
|
||||||
const val DefaultSportGoal = 60
|
const val DefaultSportGoal = 60
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.abbidot.tracker.constant
|
||||||
|
|
||||||
|
/**
|
||||||
|
*Created by .yzq on 2026/4/8/周三.
|
||||||
|
* @link
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
interface LinkMapCallback {
|
||||||
|
fun onCameraListener(type:Int)
|
||||||
|
}
|
||||||
@@ -96,6 +96,7 @@ class AddNewTracker3Activity :
|
|||||||
//接收蓝牙连接状态
|
//接收蓝牙连接状态
|
||||||
XEventBus.observe(this, EventName.ConnectDeviceState) { ble: BleTrackDeviceBean ->
|
XEventBus.observe(this, EventName.ConnectDeviceState) { ble: BleTrackDeviceBean ->
|
||||||
if (mConBleMac == ble.mac) {
|
if (mConBleMac == ble.mac) {
|
||||||
|
mViewBinding.ivAddNewTracker3RefreshBtn.isEnabled = true
|
||||||
if (ble.conState == ConState.CONNECTED) {
|
if (ble.conState == ConState.CONNECTED) {
|
||||||
setNoConnectState()
|
setNoConnectState()
|
||||||
val intent = Intent(mContext, AddPairedSuccessActivity::class.java)
|
val intent = Intent(mContext, AddPairedSuccessActivity::class.java)
|
||||||
@@ -107,9 +108,6 @@ class AddNewTracker3Activity :
|
|||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} else if (ble.conState == ConState.CONNECTION_FAIL) {
|
} else if (ble.conState == ConState.CONNECTION_FAIL) {
|
||||||
setNoConnectState()
|
setNoConnectState()
|
||||||
mViewBinding.ivAddNewTracker3RefreshBtn.isEnabled = true
|
|
||||||
} else {
|
|
||||||
mViewBinding.ivAddNewTracker3RefreshBtn.isEnabled = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ class AddPairedSuccessActivity :
|
|||||||
private var mDeviceOutId = ""
|
private var mDeviceOutId = ""
|
||||||
private var mDeviceId = ""
|
private var mDeviceId = ""
|
||||||
private var mMac = ""
|
private var mMac = ""
|
||||||
|
|
||||||
|
//设备类型
|
||||||
private var mType = ConstantInt.Type1
|
private var mType = ConstantInt.Type1
|
||||||
private var mPetBean: PetBean? = null
|
private var mPetBean: PetBean? = null
|
||||||
|
|
||||||
@@ -136,6 +138,7 @@ class AddPairedSuccessActivity :
|
|||||||
|
|
||||||
val intent = Intent(mContext, SubscriptionPlanActivity::class.java)
|
val intent = Intent(mContext, SubscriptionPlanActivity::class.java)
|
||||||
intent.putExtra(ConstantString.LkSetMeal, mSubscriptionsOrderBean)
|
intent.putExtra(ConstantString.LkSetMeal, mSubscriptionsOrderBean)
|
||||||
|
intent.putExtra(ConstantString.Type, mType)
|
||||||
intent.putExtra(ConstantString.isFirstBind, isFirstBind)
|
intent.putExtra(ConstantString.isFirstBind, isFirstBind)
|
||||||
startActivityFinish(intent)
|
startActivityFinish(intent)
|
||||||
}
|
}
|
||||||
@@ -187,6 +190,7 @@ class AddPairedSuccessActivity :
|
|||||||
pet.petType = ConstantInt.DogPetType
|
pet.petType = ConstantInt.DogPetType
|
||||||
pet.gender = ConstantInt.WoMan
|
pet.gender = ConstantInt.WoMan
|
||||||
pet.macID = mMac
|
pet.macID = mMac
|
||||||
|
pet.deviceType = mType
|
||||||
pet.birthdayDate = "2024-01-01"
|
pet.birthdayDate = "2024-01-01"
|
||||||
pet.height = Utils.formatDecimal(Util.inToCm(20.0), 1).toFloat()
|
pet.height = Utils.formatDecimal(Util.inToCm(20.0), 1).toFloat()
|
||||||
pet.weight = Utils.formatDecimal(Util.lbsToKg(25.0), 1).toFloat()
|
pet.weight = Utils.formatDecimal(Util.lbsToKg(25.0), 1).toFloat()
|
||||||
@@ -348,6 +352,13 @@ class AddPairedSuccessActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun leftBackOnClick() {
|
||||||
|
if (!TextUtils.isEmpty(mMac)) {
|
||||||
|
SRBleUtil.instance.disconnectToMac(mMac)
|
||||||
|
}
|
||||||
|
super.leftBackOnClick()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onClick(v: View?) {
|
override fun onClick(v: View?) {
|
||||||
mViewBinding.apply {
|
mViewBinding.apply {
|
||||||
when (v!!) {
|
when (v!!) {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.abbidot.tracker.ui.activity.device.wifi
|
package com.abbidot.tracker.ui.activity.device.wifi
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.net.wifi.WifiManager
|
||||||
|
import android.provider.Settings
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.commit
|
import androidx.fragment.app.commit
|
||||||
@@ -9,6 +12,7 @@ import com.abbidot.baselibrary.eventbus.XEventBus
|
|||||||
import com.abbidot.tracker.R
|
import com.abbidot.tracker.R
|
||||||
import com.abbidot.tracker.base.BaseActivity
|
import com.abbidot.tracker.base.BaseActivity
|
||||||
import com.abbidot.tracker.bean.PetBean
|
import com.abbidot.tracker.bean.PetBean
|
||||||
|
import com.abbidot.tracker.constant.ConstantInt
|
||||||
import com.abbidot.tracker.constant.ConstantString
|
import com.abbidot.tracker.constant.ConstantString
|
||||||
import com.abbidot.tracker.databinding.ActivityAddWifiPowerZone2Binding
|
import com.abbidot.tracker.databinding.ActivityAddWifiPowerZone2Binding
|
||||||
import com.abbidot.tracker.ui.activity.HomeV2Activity
|
import com.abbidot.tracker.ui.activity.HomeV2Activity
|
||||||
@@ -73,15 +77,24 @@ class AddWifiPowerZone2Activity :
|
|||||||
val petAddressData = mWifiZone2MapCommon.getDecWiFiAddressData()
|
val petAddressData = mWifiZone2MapCommon.getDecWiFiAddressData()
|
||||||
if (null == petAddressData || petAddressData.latitude == 0.0 || petAddressData.longitude == 0.0) {
|
if (null == petAddressData || petAddressData.latitude == 0.0 || petAddressData.longitude == 0.0) {
|
||||||
} else {
|
} else {
|
||||||
val intent = Intent(mContext, AddWifiPowerZone3Activity::class.java)
|
mPetBean?.let {
|
||||||
mPetBean?.let { pet ->
|
if (it.deviceType == ConstantInt.Type2) {
|
||||||
intent.putExtra(ConstantString.Pet, pet)
|
val wifiManager =
|
||||||
|
applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||||
|
if (!wifiManager.isWifiEnabled) {
|
||||||
|
val intent = Intent(Settings.ACTION_WIFI_SETTINGS)
|
||||||
|
startActivity(intent)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val intent = Intent(mContext, AddWifiPowerZone3Activity::class.java)
|
||||||
|
intent.putExtra(ConstantString.Pet, it)
|
||||||
|
intent.putExtra(ConstantString.Latitude, mPetCurrentLat)
|
||||||
|
intent.putExtra(ConstantString.Longitude, mPetCurrentLon)
|
||||||
|
intent.putExtra(ConstantString.isFirstBind, isFirstBind)
|
||||||
|
intent.putExtra(ConstantString.HistoryDataBean, petAddressData)
|
||||||
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
intent.putExtra(ConstantString.Latitude, mPetCurrentLat)
|
|
||||||
intent.putExtra(ConstantString.Longitude, mPetCurrentLon)
|
|
||||||
intent.putExtra(ConstantString.isFirstBind, isFirstBind)
|
|
||||||
intent.putExtra(ConstantString.HistoryDataBean, petAddressData)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
package com.abbidot.tracker.ui.activity.device.wifi
|
package com.abbidot.tracker.ui.activity.device.wifi
|
||||||
|
|
||||||
import android.animation.AnimatorSet
|
import android.animation.AnimatorSet
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.net.wifi.ScanResult
|
||||||
|
import android.net.wifi.WifiManager
|
||||||
|
import android.os.Build
|
||||||
|
import android.provider.Settings
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
|
import androidx.activity.viewModels
|
||||||
import com.abbidot.baselibrary.constant.ConState
|
import com.abbidot.baselibrary.constant.ConState
|
||||||
import com.abbidot.baselibrary.constant.EventName
|
import com.abbidot.baselibrary.constant.EventName
|
||||||
import com.abbidot.baselibrary.eventbus.XEventBus
|
import com.abbidot.baselibrary.eventbus.XEventBus
|
||||||
@@ -16,21 +24,27 @@ import com.abbidot.tracker.bean.BleTrackDeviceBean
|
|||||||
import com.abbidot.tracker.bean.HistoryDataBean
|
import com.abbidot.tracker.bean.HistoryDataBean
|
||||||
import com.abbidot.tracker.bean.PetBean
|
import com.abbidot.tracker.bean.PetBean
|
||||||
import com.abbidot.tracker.bean.ReceiveDeviceData
|
import com.abbidot.tracker.bean.ReceiveDeviceData
|
||||||
|
import com.abbidot.tracker.bean.WiFiBean
|
||||||
import com.abbidot.tracker.bean.WiFiBleListBean
|
import com.abbidot.tracker.bean.WiFiBleListBean
|
||||||
|
import com.abbidot.tracker.constant.ConstantInt
|
||||||
import com.abbidot.tracker.constant.ConstantString
|
import com.abbidot.tracker.constant.ConstantString
|
||||||
import com.abbidot.tracker.databinding.ActivityAddWifiPowerZone3Binding
|
import com.abbidot.tracker.databinding.ActivityAddWifiPowerZone3Binding
|
||||||
import com.abbidot.tracker.util.Util
|
import com.abbidot.tracker.util.Util
|
||||||
import com.abbidot.tracker.util.ViewUtil
|
import com.abbidot.tracker.util.ViewUtil
|
||||||
import com.abbidot.tracker.util.bluetooth.SRBleCmdUtil
|
import com.abbidot.tracker.util.bluetooth.SRBleCmdUtil
|
||||||
import com.abbidot.tracker.util.bluetooth.SRBleUtil
|
import com.abbidot.tracker.util.bluetooth.SRBleUtil
|
||||||
|
import com.abbidot.tracker.vm.CountDownTimerViewModel
|
||||||
import com.clj.fastble.BleManager
|
import com.clj.fastble.BleManager
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
import com.hjq.permissions.permission.PermissionLists
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
|
|
||||||
class AddWifiPowerZone3Activity :
|
class AddWifiPowerZone3Activity :
|
||||||
BaseActivity<ActivityAddWifiPowerZone3Binding>(ActivityAddWifiPowerZone3Binding::inflate) {
|
BaseActivity<ActivityAddWifiPowerZone3Binding>(ActivityAddWifiPowerZone3Binding::inflate) {
|
||||||
|
|
||||||
// private lateinit var mWifiManager: WifiManager
|
private val mCountDownTimerViewModel: CountDownTimerViewModel by viewModels()
|
||||||
|
private lateinit var mWifiManager: WifiManager
|
||||||
private lateinit var mWiFiListAdapter: WiFiListAdapter
|
private lateinit var mWiFiListAdapter: WiFiListAdapter
|
||||||
|
|
||||||
//解析后json数据
|
//解析后json数据
|
||||||
@@ -47,6 +61,7 @@ class AddWifiPowerZone3Activity :
|
|||||||
private var mPetCurrentLon = 0.0
|
private var mPetCurrentLon = 0.0
|
||||||
|
|
||||||
private var mAnimatorSet: AnimatorSet? = null
|
private var mAnimatorSet: AnimatorSet? = null
|
||||||
|
private var mWifiList = mutableListOf<WiFiBean>()
|
||||||
|
|
||||||
override fun getTopBar() = mViewBinding.ilAddWifiZone3TopBar.titleTopBar
|
override fun getTopBar() = mViewBinding.ilAddWifiZone3TopBar.titleTopBar
|
||||||
|
|
||||||
@@ -69,7 +84,7 @@ class AddWifiPowerZone3Activity :
|
|||||||
if (null == mPetBean) finish()
|
if (null == mPetBean) finish()
|
||||||
|
|
||||||
mGson = Gson()
|
mGson = Gson()
|
||||||
// mWifiManager = applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
mWifiManager = applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
|
||||||
|
|
||||||
mViewBinding.apply {
|
mViewBinding.apply {
|
||||||
mWiFiListAdapter = WiFiListAdapter(mContext, null).apply {
|
mWiFiListAdapter = WiFiListAdapter(mContext, null).apply {
|
||||||
@@ -108,6 +123,8 @@ class AddWifiPowerZone3Activity :
|
|||||||
showLoading(true, R.string.txt_please_wait)
|
showLoading(true, R.string.txt_please_wait)
|
||||||
mRightImageButton?.let {
|
mRightImageButton?.let {
|
||||||
it.isEnabled = false
|
it.isEnabled = false
|
||||||
|
mCountDownTimerViewModel.stopCountDown()
|
||||||
|
mCountDownTimerViewModel.startCountDown(15)
|
||||||
mAnimatorSet = ViewUtil.instance.viewRotationAnimator(it, true)
|
mAnimatorSet = ViewUtil.instance.viewRotationAnimator(it, true)
|
||||||
mViewBinding.rvAddWifiZone3WifiNetwork.visibility = View.GONE
|
mViewBinding.rvAddWifiZone3WifiNetwork.visibility = View.GONE
|
||||||
mViewBinding.lavAddWifiZone3Anim.playAnimation()
|
mViewBinding.lavAddWifiZone3Anim.playAnimation()
|
||||||
@@ -122,6 +139,9 @@ class AddWifiPowerZone3Activity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun liveDataObserve() {
|
override fun liveDataObserve() {
|
||||||
|
mCountDownTimerViewModel.mCountDownEndLiveData.observe(this) {
|
||||||
|
showToast(R.string.txt_time_out_try_again, true)
|
||||||
|
}
|
||||||
//添加成功结束页面
|
//添加成功结束页面
|
||||||
XEventBus.observe(this, EventName.RefreshWiFiZone) {
|
XEventBus.observe(this, EventName.RefreshWiFiZone) {
|
||||||
finish()
|
finish()
|
||||||
@@ -206,12 +226,15 @@ class AddWifiPowerZone3Activity :
|
|||||||
val wifiList = mGson.fromJson(
|
val wifiList = mGson.fromJson(
|
||||||
mReceiveWifiJsonData, WiFiBleListBean::class.java
|
mReceiveWifiJsonData, WiFiBleListBean::class.java
|
||||||
)
|
)
|
||||||
mWiFiListAdapter.setData(wifiList.wifi, true)
|
mPetBean?.let {
|
||||||
|
mWifiList = wifiList.wifi
|
||||||
|
if (it.deviceType == ConstantInt.Type2) {
|
||||||
|
checkPermission()
|
||||||
|
} else {
|
||||||
|
showWifiData(mWifiList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
showLoading(false)
|
|
||||||
mViewBinding.rvAddWifiZone3WifiNetwork.visibility = View.VISIBLE
|
|
||||||
mViewBinding.lavAddWifiZone3Anim.cancelAnimation()
|
|
||||||
mViewBinding.lavAddWifiZone3Anim.visibility = View.GONE
|
|
||||||
} catch (_: Exception) {
|
} catch (_: Exception) {
|
||||||
sendWiFiCmd()
|
sendWiFiCmd()
|
||||||
}
|
}
|
||||||
@@ -219,12 +242,21 @@ class AddWifiPowerZone3Activity :
|
|||||||
} else {
|
} else {
|
||||||
mAnimatorSet?.cancel()
|
mAnimatorSet?.cancel()
|
||||||
mRightImageButton?.isEnabled = true
|
mRightImageButton?.isEnabled = true
|
||||||
showToast(R.string.no_data)
|
showToast(R.string.txt_time_out_try_again, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showWifiData(list: MutableList<WiFiBean>) {
|
||||||
|
mCountDownTimerViewModel.stopCountDown()
|
||||||
|
mWiFiListAdapter.setData(list, true)
|
||||||
|
showLoading(false)
|
||||||
|
mViewBinding.rvAddWifiZone3WifiNetwork.visibility = View.VISIBLE
|
||||||
|
mViewBinding.lavAddWifiZone3Anim.cancelAnimation()
|
||||||
|
mViewBinding.lavAddWifiZone3Anim.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新设备连接状态
|
* 更新设备连接状态
|
||||||
*/
|
*/
|
||||||
@@ -237,25 +269,48 @@ class AddWifiPowerZone3Activity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private fun checkPermission() {
|
private fun checkPermission() {
|
||||||
// //从 Android 6.0(API 23)开始,定位权限现在被用于 Wi-Fi 扫描
|
//从 Android 6.0(API 23)开始,定位权限现在被用于 Wi-Fi 扫描
|
||||||
// Util.checkPermissions(mContext, object : Util.RequestPermissionCallback {
|
Util.checkPermissions(
|
||||||
// override fun onRequestPermissionSuccess() {
|
mContext, object : Util.RequestPermissionCallback {
|
||||||
// addListData()
|
override fun onRequestPermissionSuccess() {
|
||||||
// }
|
addListData()
|
||||||
//
|
}
|
||||||
// override fun onRequestPermissionFail() {
|
|
||||||
// showToast(R.string.txt_wifi_permission)
|
override fun onRequestPermissionFail() {
|
||||||
// }
|
showToast(R.string.permissions_die_easy_photos)
|
||||||
// }, getString(R.string.txt_wifi_permission), Manifest.permission.ACCESS_FINE_LOCATION)
|
}
|
||||||
// }
|
}, "wifi", PermissionLists.getAccessFineLocationPermission()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun addListData() {
|
||||||
|
val list = getConnectedWifiSSID()
|
||||||
|
val wifiList = mutableListOf<WiFiBean>()
|
||||||
|
if (!list.isNullOrEmpty()) {
|
||||||
|
for (bleWifi in mWifiList) {
|
||||||
|
for (wifi in list) {
|
||||||
|
if (bleWifi.mac.uppercase(Locale.getDefault()) == wifi.BSSID.uppercase(Locale.getDefault())) {
|
||||||
|
val wifiName = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
wifi.wifiSsid.toString()
|
||||||
|
} else {
|
||||||
|
wifi.SSID
|
||||||
|
}
|
||||||
|
bleWifi.name = wifiName.replace("\"", "")
|
||||||
|
wifiList.add(bleWifi)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (wifiList.size > 0) {
|
||||||
|
showWifiData(wifiList)
|
||||||
|
} else {
|
||||||
|
showToast(R.string.txt_time_out_try_again, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// private fun addListData() {
|
|
||||||
// val list = getConnectedWifiSSID()
|
|
||||||
// mWiFiListAdapter.setData(list, true)
|
|
||||||
// }
|
|
||||||
|
|
||||||
/*
|
|
||||||
/**
|
/**
|
||||||
* 接收开启wifi操作
|
* 接收开启wifi操作
|
||||||
*/
|
*/
|
||||||
@@ -276,7 +331,6 @@ class AddWifiPowerZone3Activity :
|
|||||||
// val intent = Intent(Settings.Panel.ACTION_WIFI)
|
// val intent = Intent(Settings.Panel.ACTION_WIFI)
|
||||||
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||||
// startActivity(intent)
|
// startActivity(intent)
|
||||||
|
|
||||||
val intent = Intent(Settings.Panel.ACTION_WIFI)
|
val intent = Intent(Settings.Panel.ACTION_WIFI)
|
||||||
launchActivity(mActivityResultLauncher, intent)
|
launchActivity(mActivityResultLauncher, intent)
|
||||||
} else {
|
} else {
|
||||||
@@ -285,7 +339,7 @@ class AddWifiPowerZone3Activity :
|
|||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
override fun onClick(v: View?) {
|
override fun onClick(v: View?) {
|
||||||
when (v!!) {
|
when (v!!) {
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ class ChoosePlanActivity :
|
|||||||
|
|
||||||
//是否是升级套餐
|
//是否是升级套餐
|
||||||
private var isUpgrade = false
|
private var isUpgrade = false
|
||||||
|
//设备类型
|
||||||
|
private var mType = ConstantInt.Type1
|
||||||
|
|
||||||
//设备充值类型,0=首次设备充值激活,1=已添加设备再次添加设备充值,2=给当前的设备续费或者升级套餐
|
//设备充值类型,0=首次设备充值激活,1=已添加设备再次添加设备充值,2=给当前的设备续费或者升级套餐
|
||||||
private var mRechargeType = ConstantInt.Type1
|
private var mRechargeType = ConstantInt.Type1
|
||||||
@@ -45,6 +47,7 @@ class ChoosePlanActivity :
|
|||||||
mOrderBean = Util.getParcelableAdaptive(
|
mOrderBean = Util.getParcelableAdaptive(
|
||||||
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
||||||
)
|
)
|
||||||
|
mType = getInt(ConstantString.Type, ConstantInt.Type1)
|
||||||
isUpgrade = getBoolean(ConstantString.Upgrade, false)
|
isUpgrade = getBoolean(ConstantString.Upgrade, false)
|
||||||
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
||||||
}
|
}
|
||||||
@@ -149,6 +152,7 @@ class ChoosePlanActivity :
|
|||||||
it.putExtra(ConstantString.SetMeal, cPlan)
|
it.putExtra(ConstantString.SetMeal, cPlan)
|
||||||
it.putExtra(ConstantString.Upgrade, isUpgrade)
|
it.putExtra(ConstantString.Upgrade, isUpgrade)
|
||||||
it.putExtra(ConstantString.LkSetMeal, mOrderBean)
|
it.putExtra(ConstantString.LkSetMeal, mOrderBean)
|
||||||
|
it.putExtra(ConstantString.Type, mType)
|
||||||
it.putExtra(ConstantString.RechargeType, mRechargeType)
|
it.putExtra(ConstantString.RechargeType, mRechargeType)
|
||||||
startActivity(it)
|
startActivity(it)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ class PaymentMethodActivity :
|
|||||||
var mRechargeType = ConstantInt.Type1
|
var mRechargeType = ConstantInt.Type1
|
||||||
lateinit var mFragments: MutableList<Fragment>
|
lateinit var mFragments: MutableList<Fragment>
|
||||||
|
|
||||||
|
//设备类型
|
||||||
|
var mType = ConstantInt.Type1
|
||||||
|
|
||||||
override fun getTopBar() = mViewBinding.ilPaymentMethodTopBar.titleTopBar
|
override fun getTopBar() = mViewBinding.ilPaymentMethodTopBar.titleTopBar
|
||||||
|
|
||||||
override fun initData() {
|
override fun initData() {
|
||||||
@@ -36,6 +39,7 @@ class PaymentMethodActivity :
|
|||||||
mOrderBean = Util.getParcelableAdaptive(
|
mOrderBean = Util.getParcelableAdaptive(
|
||||||
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
||||||
)
|
)
|
||||||
|
mType = getInt(ConstantString.Type, ConstantInt.Type1)
|
||||||
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,8 +58,8 @@ class PaymentMethodActivity :
|
|||||||
|
|
||||||
vp2SwitchPaymentMethod.let {
|
vp2SwitchPaymentMethod.let {
|
||||||
it.adapter = ViewPagerAdapter(mFragments, this@PaymentMethodActivity)
|
it.adapter = ViewPagerAdapter(mFragments, this@PaymentMethodActivity)
|
||||||
ViewUtil.instance.setViewPager2Config(it,
|
ViewUtil.instance.setViewPager2Config(
|
||||||
object : ViewPager2.OnPageChangeCallback() {
|
it, object : ViewPager2.OnPageChangeCallback() {
|
||||||
override fun onPageSelected(position: Int) {
|
override fun onPageSelected(position: Int) {
|
||||||
super.onPageSelected(position)
|
super.onPageSelected(position)
|
||||||
when (position) {
|
when (position) {
|
||||||
|
|||||||
@@ -184,6 +184,9 @@ class PaymentSuccessActivity :
|
|||||||
pet.petType = ConstantInt.DogPetType
|
pet.petType = ConstantInt.DogPetType
|
||||||
pet.gender = ConstantInt.WoMan
|
pet.gender = ConstantInt.WoMan
|
||||||
pet.macID = mMac
|
pet.macID = mMac
|
||||||
|
mPayResult?.let { p ->
|
||||||
|
pet.deviceType = p.deviceType
|
||||||
|
}
|
||||||
pet.birthdayDate = "2024-01-01"
|
pet.birthdayDate = "2024-01-01"
|
||||||
pet.height = Utils.formatDecimal(Util.inToCm(20.0), 1).toFloat()
|
pet.height = Utils.formatDecimal(Util.inToCm(20.0), 1).toFloat()
|
||||||
pet.weight = Utils.formatDecimal(Util.lbsToKg(25.0), 1).toFloat()
|
pet.weight = Utils.formatDecimal(Util.lbsToKg(25.0), 1).toFloat()
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ class SubscriptionPlanActivity :
|
|||||||
//设备充值类型,0=首次设备充值激活,1=已添加设备再次添加设备充值,2=给当前的设备续费或者升级套餐
|
//设备充值类型,0=首次设备充值激活,1=已添加设备再次添加设备充值,2=给当前的设备续费或者升级套餐
|
||||||
private var mRechargeType = ConstantInt.Type1
|
private var mRechargeType = ConstantInt.Type1
|
||||||
|
|
||||||
|
//设备类型
|
||||||
|
private var mType = ConstantInt.Type1
|
||||||
|
|
||||||
override fun getTopBar() = mViewBinding.subscribePlanTopBar.titleTopBar
|
override fun getTopBar() = mViewBinding.subscribePlanTopBar.titleTopBar
|
||||||
|
|
||||||
override fun initData() {
|
override fun initData() {
|
||||||
@@ -49,6 +52,7 @@ class SubscriptionPlanActivity :
|
|||||||
mOrderBean = Util.getParcelableAdaptive(
|
mOrderBean = Util.getParcelableAdaptive(
|
||||||
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
||||||
)
|
)
|
||||||
|
mType = getInt(ConstantString.Type, ConstantInt.Type1)
|
||||||
val isFirstBind = getBoolean(ConstantString.isFirstBind, false)
|
val isFirstBind = getBoolean(ConstantString.isFirstBind, false)
|
||||||
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
||||||
if (isFirstBind) mRechargeType = ConstantInt.Type0
|
if (isFirstBind) mRechargeType = ConstantInt.Type0
|
||||||
@@ -131,6 +135,7 @@ class SubscriptionPlanActivity :
|
|||||||
ConstantString.Title, mPlanAdapter.getData()[mSelectPlanIndex].name
|
ConstantString.Title, mPlanAdapter.getData()[mSelectPlanIndex].name
|
||||||
)
|
)
|
||||||
it.putExtra(ConstantString.LkSetMeal, mOrderBean)
|
it.putExtra(ConstantString.LkSetMeal, mOrderBean)
|
||||||
|
it.putExtra(ConstantString.Type, mType)
|
||||||
it.putExtra(ConstantString.RechargeType, mRechargeType)
|
it.putExtra(ConstantString.RechargeType, mRechargeType)
|
||||||
startActivity(it)
|
startActivity(it)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ class SureSubscriptionPlanActivity :
|
|||||||
|
|
||||||
//升级套餐还剩下多少差价
|
//升级套餐还剩下多少差价
|
||||||
private var mResidualMoney = 0.0
|
private var mResidualMoney = 0.0
|
||||||
|
//设备类型
|
||||||
|
private var mType = ConstantInt.Type1
|
||||||
|
|
||||||
private lateinit var mSummaryAdapter: SureSubscribeSummaryAdapter
|
private lateinit var mSummaryAdapter: SureSubscribeSummaryAdapter
|
||||||
|
|
||||||
@@ -78,6 +80,7 @@ class SureSubscriptionPlanActivity :
|
|||||||
mOrderBean = Util.getParcelableAdaptive(
|
mOrderBean = Util.getParcelableAdaptive(
|
||||||
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
intent, ConstantString.LkSetMeal, SubscriptionsOrderBean::class.java
|
||||||
)
|
)
|
||||||
|
mType = getInt(ConstantString.Type, ConstantInt.Type1)
|
||||||
isUpgrade = getBoolean(ConstantString.Upgrade, false)
|
isUpgrade = getBoolean(ConstantString.Upgrade, false)
|
||||||
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
mRechargeType = getInt(ConstantString.RechargeType, ConstantInt.Type1)
|
||||||
}
|
}
|
||||||
@@ -467,6 +470,7 @@ class SureSubscriptionPlanActivity :
|
|||||||
totalAmountWithTax = Utils.formatDecimal(mTotalWithTaxMoney, 2).toDouble()
|
totalAmountWithTax = Utils.formatDecimal(mTotalWithTaxMoney, 2).toDouble()
|
||||||
Intent(mContext, PaymentMethodActivity::class.java).let {
|
Intent(mContext, PaymentMethodActivity::class.java).let {
|
||||||
it.putExtra(ConstantString.LkSetMeal, this)
|
it.putExtra(ConstantString.LkSetMeal, this)
|
||||||
|
it.putExtra(ConstantString.Type, mType)
|
||||||
it.putExtra(ConstantString.RechargeType, mRechargeType)
|
it.putExtra(ConstantString.RechargeType, mRechargeType)
|
||||||
startActivity(it)
|
startActivity(it)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.abbidot.tracker.base.BaseMapCommon
|
|||||||
import com.abbidot.tracker.bean.HistoryDataBean
|
import com.abbidot.tracker.bean.HistoryDataBean
|
||||||
import com.abbidot.tracker.bean.MapDeviceBean
|
import com.abbidot.tracker.bean.MapDeviceBean
|
||||||
import com.abbidot.tracker.constant.ConstantInt
|
import com.abbidot.tracker.constant.ConstantInt
|
||||||
|
import com.abbidot.tracker.constant.LinkMapCallback
|
||||||
import com.abbidot.tracker.databinding.LayoutPetLocationInfoBinding
|
import com.abbidot.tracker.databinding.LayoutPetLocationInfoBinding
|
||||||
import com.abbidot.tracker.ui.fragment.map.baidumap.HomeMapBaiduMapFragment
|
import com.abbidot.tracker.ui.fragment.map.baidumap.HomeMapBaiduMapFragment
|
||||||
import com.abbidot.tracker.ui.fragment.map.googlemap.HomeMapGoogleMapFragmentV3
|
import com.abbidot.tracker.ui.fragment.map.googlemap.HomeMapGoogleMapFragmentV3
|
||||||
|
|||||||
@@ -448,7 +448,6 @@ class HomeTrackFragment :
|
|||||||
getHomeV2Activity()?.let {
|
getHomeV2Activity()?.let {
|
||||||
it.getPet()?.apply {
|
it.getPet()?.apply {
|
||||||
if (isSwitchPet) {
|
if (isSwitchPet) {
|
||||||
|
|
||||||
isSwitchPet = false
|
isSwitchPet = false
|
||||||
mTrackStateList[5].apply {
|
mTrackStateList[5].apply {
|
||||||
state = ConstantInt.Type0
|
state = ConstantInt.Type0
|
||||||
@@ -575,7 +574,15 @@ class HomeTrackFragment :
|
|||||||
ble.bleDevice, SRBleCmdUtil.instance.getFirmwareVersion()
|
ble.bleDevice, SRBleCmdUtil.instance.getFirmwareVersion()
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
findItem(
|
||||||
|
mTrackMenuList, getString(R.string.txt_firmware_version)
|
||||||
|
)?.let { m ->
|
||||||
|
if (TextUtils.isEmpty(m.menuValue)) {
|
||||||
|
SRBleUtil.instance.writeData(
|
||||||
|
ble.bleDevice, SRBleCmdUtil.instance.getFirmwareVersion()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import android.view.Gravity
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.net.toUri
|
||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.commit
|
import androidx.fragment.app.commit
|
||||||
@@ -123,7 +124,7 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
|
|
||||||
mViewBinding.apply {
|
mViewBinding.apply {
|
||||||
getHomeV2Activity()?.edgeToEdgeAdapterBars(
|
getHomeV2Activity()?.edgeToEdgeAdapterBars(
|
||||||
rlHomeMapTopLayout, WindowInsetsCompat.Type.statusBars()
|
root, WindowInsetsCompat.Type.statusBars()
|
||||||
)
|
)
|
||||||
mFragment = mHomeMapCommon.getMapFragment(
|
mFragment = mHomeMapCommon.getMapFragment(
|
||||||
mContext!!,
|
mContext!!,
|
||||||
@@ -151,6 +152,17 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
// mContext!!, rvHomeMapDeviceMsg, mDeviceMsgAdapter, bottom = 10
|
// mContext!!, rvHomeMapDeviceMsg, mDeviceMsgAdapter, bottom = 10
|
||||||
// )
|
// )
|
||||||
|
|
||||||
|
|
||||||
|
// rlHomeMapTopLayout.setOnTouchListener { _, _ ->
|
||||||
|
// if (mShowCenterLocationType == ConstantInt.PetLocationType) {
|
||||||
|
// mShowCenterLocationType = ConstantInt.PetSpecialType
|
||||||
|
// ViewUtil.instance.setMapSwitchLocationButtonImage(
|
||||||
|
// homeMapRefreshBtn, mShowCenterLocationType
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
// false
|
||||||
|
// }
|
||||||
|
|
||||||
setOnClickListenerViews(
|
setOnClickListenerViews(
|
||||||
homeMapRefreshBtn,
|
homeMapRefreshBtn,
|
||||||
homeMapBluetoothBtn,
|
homeMapBluetoothBtn,
|
||||||
@@ -160,7 +172,8 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
llHomeMapTopPet.homeDataPetNameSmall,
|
llHomeMapTopPet.homeDataPetNameSmall,
|
||||||
llHomeMapTopPet.homeDataPetHeadSmall.root,
|
llHomeMapTopPet.homeDataPetHeadSmall.root,
|
||||||
ilHomeMapDeviceBatteryLayout.ivDeviceCloseBtn,
|
ilHomeMapDeviceBatteryLayout.ivDeviceCloseBtn,
|
||||||
ilHomeMapDeviceMsg.ivDeviceMsgCloseBtn
|
ilHomeMapDeviceMsg.ivDeviceMsgCloseBtn,
|
||||||
|
ilHomeMapPetLocation.ivPetLocationNavigationBtn
|
||||||
)
|
)
|
||||||
|
|
||||||
if (AppUtils.isDebug()) {
|
if (AppUtils.isDebug()) {
|
||||||
@@ -185,7 +198,9 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (mShowCenterLocationType == ConstantInt.PetLocationType) isMoveCamera = true
|
if (mShowCenterLocationType == ConstantInt.PetLocationType) {
|
||||||
|
isMoveCamera = true
|
||||||
|
}
|
||||||
getHomeV2Activity()?.apply {
|
getHomeV2Activity()?.apply {
|
||||||
//其他页面是否选择了宠物
|
//其他页面是否选择了宠物
|
||||||
if (mCurrentShowPetPos != mSelectPetPosition) {
|
if (mCurrentShowPetPos != mSelectPetPosition) {
|
||||||
@@ -863,6 +878,9 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停止一键定位
|
||||||
|
*/
|
||||||
private fun stopRefreshLocation() {
|
private fun stopRefreshLocation() {
|
||||||
getHomeV2Activity()?.apply {
|
getHomeV2Activity()?.apply {
|
||||||
if (isNotifyRefreshLocation) {
|
if (isNotifyRefreshLocation) {
|
||||||
@@ -891,6 +909,26 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun goNavigation() {
|
||||||
|
mMapDeviceBean?.let { m ->
|
||||||
|
try {
|
||||||
|
//自动弹出手机中已经有安装地图的应用
|
||||||
|
val uri = if (MMKVUtil.getBoolean(MMKVKey.isGpsToGCJ02)) {
|
||||||
|
val convertLatLon =
|
||||||
|
LonAndLatUtil.convertFromWGS84ToGCJ02(m.latitude, m.longitude)
|
||||||
|
"google.navigation:q=${convertLatLon[0]},${convertLatLon[1]}&mode=w".toUri()
|
||||||
|
} else {
|
||||||
|
"google.navigation:q=${m.latitude},${m.longitude}&mode=w".toUri()
|
||||||
|
}
|
||||||
|
val intent = Intent(Intent.ACTION_VIEW, uri)
|
||||||
|
intent.setPackage("com.google.android.apps.maps")
|
||||||
|
startActivity(intent)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
showToast(getString(R.string.txt_no_install))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onClick(v: View?) {
|
override fun onClick(v: View?) {
|
||||||
if (isLimitClick()) return
|
if (isLimitClick()) return
|
||||||
mViewBinding.apply {
|
mViewBinding.apply {
|
||||||
@@ -901,13 +939,23 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
showToast(R.string.no_bind_pet)
|
showToast(R.string.no_bind_pet)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (mShowCenterLocationType == ConstantInt.PetLocationType) {
|
when (mShowCenterLocationType) {
|
||||||
mShowCenterLocationType = ConstantInt.UserLocationType
|
// ConstantInt.PetSpecialType -> {
|
||||||
mHomeMapCommon.switchShowLocation(mShowCenterLocationType)
|
// mShowCenterLocationType = ConstantInt.PetLocationType
|
||||||
} else {
|
// mHomeMapCommon.switchShowLocation(mShowCenterLocationType)
|
||||||
mShowCenterLocationType = ConstantInt.PetLocationType
|
// }
|
||||||
isMoveCamera = true
|
|
||||||
updateMapDeviceStatus(useBleLocation = false)
|
ConstantInt.PetLocationType -> {
|
||||||
|
mShowCenterLocationType = ConstantInt.UserLocationType
|
||||||
|
mHomeMapCommon.switchShowLocation(mShowCenterLocationType)
|
||||||
|
}
|
||||||
|
|
||||||
|
ConstantInt.UserLocationType -> {
|
||||||
|
mShowCenterLocationType = ConstantInt.PetLocationType
|
||||||
|
// isMoveCamera = true
|
||||||
|
// updateMapDeviceStatus(useBleLocation = false)
|
||||||
|
mHomeMapCommon.switchShowLocation(mShowCenterLocationType)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ViewUtil.instance.setMapSwitchLocationButtonImage(
|
ViewUtil.instance.setMapSwitchLocationButtonImage(
|
||||||
homeMapRefreshBtn, mShowCenterLocationType
|
homeMapRefreshBtn, mShowCenterLocationType
|
||||||
@@ -944,8 +992,10 @@ class MapV3Fragment : BaseFragment<FragmentMapV3Binding>(FragmentMapV3Binding::i
|
|||||||
mMapDeviceBean?.isCloseMsg = true
|
mMapDeviceBean?.isCloseMsg = true
|
||||||
ilHomeMapDeviceMsg.root.visibility = View.GONE
|
ilHomeMapDeviceMsg.root.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
ilHomeMapPetLocation.ivPetLocationNavigationBtn -> goNavigation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -304,15 +304,40 @@ abstract class BaseGoogleMapFragment :
|
|||||||
* 切换用户和宠物的位置居中显示,移动摄像头中心
|
* 切换用户和宠物的位置居中显示,移动摄像头中心
|
||||||
*/
|
*/
|
||||||
fun switchShowLocation(@ConstantInt type: Int) {
|
fun switchShowLocation(@ConstantInt type: Int) {
|
||||||
val latLng = if (type == ConstantInt.PetLocationType) {
|
when (type) {
|
||||||
//刷新下用户当前的位置
|
ConstantInt.PetLocationType -> {
|
||||||
getLastLocation()
|
//刷新下用户当前的位置
|
||||||
mPetLatLng
|
getLastLocation()
|
||||||
} else {
|
mPetLatLng?.let {
|
||||||
mUserLatLng
|
mGoogleMapZoom = 17f
|
||||||
}
|
refreshPetCurrentLocation(it, true)
|
||||||
latLng?.let {
|
}
|
||||||
moveCameraLocation(it)
|
}
|
||||||
|
|
||||||
|
ConstantInt.UserLocationType -> {
|
||||||
|
mPetLatLng?.let {
|
||||||
|
mUserLatLng?.apply {
|
||||||
|
setLatLngZoom(mContext!!, 250, it, this)
|
||||||
|
cameraUpdateMove()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else->{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ConstantInt.DefaultType -> {
|
||||||
|
// mPetLatLng?.let {
|
||||||
|
// mGoogleMapZoom = 17f
|
||||||
|
// refreshPetCurrentLocation(it, true)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// else -> {
|
||||||
|
// mUserLatLng?.let {
|
||||||
|
// moveCameraLocation(it)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -948,10 +973,9 @@ abstract class BaseGoogleMapFragment :
|
|||||||
it.isMyLocationButtonEnabled = false
|
it.isMyLocationButtonEnabled = false
|
||||||
//用于设置是启用还是停用倾斜手势的偏好设置。
|
//用于设置是启用还是停用倾斜手势的偏好设置。
|
||||||
// https://developers.google.cn/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/UiSettings?hl=zh-cn
|
// https://developers.google.cn/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/UiSettings?hl=zh-cn
|
||||||
it.isTiltGesturesEnabled = false
|
|
||||||
it.isMapToolbarEnabled = false
|
it.isMapToolbarEnabled = false
|
||||||
it.isTiltGesturesEnabled = false
|
it.isTiltGesturesEnabled = false
|
||||||
it.isCompassEnabled = false
|
it.isCompassEnabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
onMapLoadOk(googleMap)
|
onMapLoadOk(googleMap)
|
||||||
@@ -1052,6 +1076,14 @@ abstract class BaseGoogleMapFragment :
|
|||||||
mCameraUpdate = CameraUpdateFactory.newLatLngBounds(builder.build(), screenPaddingPx)
|
mCameraUpdate = CameraUpdateFactory.newLatLngBounds(builder.build(), screenPaddingPx)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun cameraUpdateMove() {
|
||||||
|
mGoogleMap?.apply {
|
||||||
|
mCameraUpdate?.let {
|
||||||
|
animateCamera(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun getMyZoom1(distance: Double): Float {
|
fun getMyZoom1(distance: Double): Float {
|
||||||
val scale = intArrayOf(
|
val scale = intArrayOf(
|
||||||
3,//21
|
3,//21
|
||||||
|
|||||||
@@ -115,8 +115,6 @@ class HistoryDataGoogleMapFragment : BaseGoogleMapFragment() {
|
|||||||
true
|
true
|
||||||
} else false
|
} else false
|
||||||
}
|
}
|
||||||
|
|
||||||
uiSettings.isCompassEnabled = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getLastLocation()
|
getLastLocation()
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.abbidot.tracker.ui.fragment.map.googlemap
|
|||||||
|
|
||||||
import android.animation.ValueAnimator
|
import android.animation.ValueAnimator
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.text.TextUtils
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.animation.LinearInterpolator
|
import android.view.animation.LinearInterpolator
|
||||||
@@ -100,11 +101,12 @@ class HomeMapGoogleMapFragmentV3 : BaseGoogleMapFragment() {
|
|||||||
// mMarker?.tag = history
|
// mMarker?.tag = history
|
||||||
|
|
||||||
// showMarkerInfoWindow(history)
|
// showMarkerInfoWindow(history)
|
||||||
val address = if (inWifiZone == ConstantInt.Type1) {
|
val address =
|
||||||
mContext!!.getString(R.string.txt_home) + " · $it"
|
if (inWifiZone == ConstantInt.Type1 && !TextUtils.isEmpty(wifiZoneName)) {
|
||||||
} else {
|
"$wifiZoneName · $it"
|
||||||
String.format(mContext!!.getString(R.string.txt_near), it)
|
} else {
|
||||||
}
|
String.format(mContext!!.getString(R.string.txt_near), it)
|
||||||
|
}
|
||||||
ViewUtil.instance.viewShow(mPetLocationLayoutBinding.root)
|
ViewUtil.instance.viewShow(mPetLocationLayoutBinding.root)
|
||||||
mPetLocationLayoutBinding.let { layout ->
|
mPetLocationLayoutBinding.let { layout ->
|
||||||
layout.tvPetLocationReverseGeocode.text = address
|
layout.tvPetLocationReverseGeocode.text = address
|
||||||
|
|||||||
@@ -133,10 +133,11 @@ class CreditCardPaymentFragment : BaseFragment<FragmentCreditCardPaymentBinding>
|
|||||||
override fun onResult(any: Any) {
|
override fun onResult(any: Any) {
|
||||||
it.getOrNull()?.apply {
|
it.getOrNull()?.apply {
|
||||||
val intent = Intent(mContext, PaymentSuccessActivity::class.java)
|
val intent = Intent(mContext, PaymentSuccessActivity::class.java)
|
||||||
this.rechargeType = mPaymentMethodActivity.mRechargeType
|
rechargeType = mPaymentMethodActivity.mRechargeType
|
||||||
mPaymentMethodActivity.mOrderBean?.let { o ->
|
mPaymentMethodActivity.mOrderBean?.let { o ->
|
||||||
this.deviceId = o.deviceId
|
deviceId = o.deviceId
|
||||||
}
|
}
|
||||||
|
deviceType = mPaymentMethodActivity.mType
|
||||||
intent.putExtra(ConstantString.Amount, this)
|
intent.putExtra(ConstantString.Amount, this)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,13 @@ class PaypalPaymentFragment :
|
|||||||
ConstantString.Title, getString(R.string.txt_pay_order_payment_title)
|
ConstantString.Title, getString(R.string.txt_pay_order_payment_title)
|
||||||
)
|
)
|
||||||
intent.putExtra(ConstantString.Url, url)
|
intent.putExtra(ConstantString.Url, url)
|
||||||
this.rechargeType = mPaymentMethodActivity.mRechargeType
|
rechargeType = mPaymentMethodActivity.mRechargeType
|
||||||
|
deviceType = mPaymentMethodActivity.mType
|
||||||
mPaymentMethodActivity.mOrderBean?.let { o ->
|
mPaymentMethodActivity.mOrderBean?.let { o ->
|
||||||
this.deviceId = o.deviceId
|
deviceId = o.deviceId
|
||||||
}
|
}
|
||||||
intent.putExtra(ConstantString.Amount, this)
|
intent.putExtra(ConstantString.Amount, this)
|
||||||
|
|
||||||
mPaymentMethodActivity.startActivity(intent)
|
mPaymentMethodActivity.startActivity(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import androidx.core.animation.doOnCancel
|
|||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.isGone
|
import androidx.core.view.isGone
|
||||||
import androidx.core.view.isInvisible
|
import androidx.core.view.isInvisible
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.core.view.setPadding
|
import androidx.core.view.setPadding
|
||||||
import androidx.core.widget.addTextChangedListener
|
import androidx.core.widget.addTextChangedListener
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
@@ -89,7 +90,6 @@ import com.qmuiteam.qmui.util.QMUIDisplayHelper
|
|||||||
import com.qmuiteam.qmui.widget.dialog.QMUIBottomSheet.BottomListSheetBuilder
|
import com.qmuiteam.qmui.widget.dialog.QMUIBottomSheet.BottomListSheetBuilder
|
||||||
import com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView
|
import com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import androidx.core.view.isVisible
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -892,6 +892,12 @@ class ViewUtil private constructor() {
|
|||||||
fun setMapSwitchLocationButtonImage(iv: ImageView, locationType: Int) {
|
fun setMapSwitchLocationButtonImage(iv: ImageView, locationType: Int) {
|
||||||
viewShowFadeInAnimation(iv, 600)
|
viewShowFadeInAnimation(iv, 600)
|
||||||
when (locationType) {
|
when (locationType) {
|
||||||
|
ConstantInt.PetSpecialType -> {
|
||||||
|
iv.setBackgroundResource(R.drawable.shape_white_circle_bg)
|
||||||
|
iv.setImageResource(R.drawable.icon_pet_foot_svg)
|
||||||
|
iv.setPadding(AppUtils.dpToPx(14))
|
||||||
|
}
|
||||||
|
|
||||||
ConstantInt.PetLocationType -> {
|
ConstantInt.PetLocationType -> {
|
||||||
iv.setBackgroundResource(R.drawable.shape_yellow_circle_bg)
|
iv.setBackgroundResource(R.drawable.shape_yellow_circle_bg)
|
||||||
iv.setImageResource(R.drawable.icon_pet_foot_svg)
|
iv.setImageResource(R.drawable.icon_pet_foot_svg)
|
||||||
@@ -909,6 +915,12 @@ class ViewUtil private constructor() {
|
|||||||
iv.setImageResource(R.drawable.icon_pet_fence_svg)
|
iv.setImageResource(R.drawable.icon_pet_fence_svg)
|
||||||
iv.setPadding(AppUtils.dpToPx(13))
|
iv.setPadding(AppUtils.dpToPx(13))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConstantInt.DefaultType -> {
|
||||||
|
iv.setBackgroundResource(R.drawable.shape_white_circle_bg)
|
||||||
|
iv.setImageResource(R.drawable.icon_map_gps)
|
||||||
|
iv.setPadding(AppUtils.dpToPx(13))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class SRBleUtil private constructor() {
|
|||||||
UUID.fromString("6e400005-b5a3-f393-e0a9-e50e24dcca9e").toString()
|
UUID.fromString("6e400005-b5a3-f393-e0a9-e50e24dcca9e").toString()
|
||||||
|
|
||||||
//保存已连接成功设备的全局变量
|
//保存已连接成功设备的全局变量
|
||||||
lateinit var mTrackDeviceList: MutableList<BleTrackDeviceBean>
|
private val mTrackDeviceList = mutableListOf<BleTrackDeviceBean>()
|
||||||
private var mContext: Context? = null
|
private var mContext: Context? = null
|
||||||
|
|
||||||
//SRBleUtil单例模式
|
//SRBleUtil单例模式
|
||||||
@@ -102,7 +102,6 @@ class SRBleUtil private constructor() {
|
|||||||
BleManager.getInstance().init(app)
|
BleManager.getInstance().init(app)
|
||||||
//是否显示框架内部日志,重连次数和重连时间间隔,以及操作超时时间。
|
//是否显示框架内部日志,重连次数和重连时间间隔,以及操作超时时间。
|
||||||
BleManager.getInstance().enableLog(AppUtils.isDebug()).operateTimeout = 5000
|
BleManager.getInstance().enableLog(AppUtils.isDebug()).operateTimeout = 5000
|
||||||
mTrackDeviceList = mutableListOf()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -235,7 +234,9 @@ class SRBleUtil private constructor() {
|
|||||||
} else if (data0 == 0x24) {
|
} else if (data0 == 0x24) {
|
||||||
LogUtil.e("${bleDevice.mac},蓝牙透传消息")
|
LogUtil.e("${bleDevice.mac},蓝牙透传消息")
|
||||||
if (null == mSocketUtilManage) mSocketUtilManage = SocketUtilManageV2()
|
if (null == mSocketUtilManage) mSocketUtilManage = SocketUtilManageV2()
|
||||||
mSocketUtilManage?.initEasySocket(mContext!!, bleDevice.mac, data)
|
mContext?.let {
|
||||||
|
mSocketUtilManage?.initEasySocket(it, bleDevice.mac, data)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
val deviceData = ReceiveDeviceData(bleDevice, data, bleDevice.mac)
|
val deviceData = ReceiveDeviceData(bleDevice, data, bleDevice.mac)
|
||||||
XEventBus.post(EventName.DeviceReceiveData, deviceData)
|
XEventBus.post(EventName.DeviceReceiveData, deviceData)
|
||||||
|
|||||||
BIN
app/src/main/res/drawable-xhdpi/ico_map_navigati_image.png
Normal file
|
After Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 386 B |
BIN
app/src/main/res/drawable-xxhdpi/ico_map_navigati_image.png
Normal file
|
After Width: | Height: | Size: 762 B |
|
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 520 B |
BIN
app/src/main/res/drawable-xxxhdpi/ico_map_navigati_image.png
Normal file
|
After Width: | Height: | Size: 1011 B |
|
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 704 B |
@@ -1,130 +1,134 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
tools:context=".ui.fragment.map.MapV3Fragment">
|
tools:context=".ui.fragment.map.MapV3Fragment">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<include
|
||||||
android:id="@+id/fc_home_map_fragment"
|
android:id="@+id/ll_home_map_top_pet"
|
||||||
|
layout="@layout/layout_top_pet_data_small"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
|
||||||
android:id="@+id/ll_home_map_device_battery_layout"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="invisible">
|
android:layout_margin="@dimen/dp_8" />
|
||||||
|
|
||||||
<include
|
<FrameLayout
|
||||||
android:id="@+id/il_home_map_device_battery_layout"
|
|
||||||
layout="@layout/layout_map_device_battery" />
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/rl_home_map_top_layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:layout_marginHorizontal="@dimen/dp_8">
|
|
||||||
|
|
||||||
<include
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/ll_home_map_top_pet"
|
android:id="@+id/fc_home_map_fragment"
|
||||||
layout="@layout/layout_top_pet_data_small"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent" />
|
||||||
android:layout_marginTop="@dimen/dp_8" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/il_home_map_device_msg"
|
|
||||||
layout="@layout/item_home_map_device_msg"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/ll_home_map_top_pet"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_marginTop="@dimen/dp_6"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<com.abbidot.tracker.widget.NonSwipeRecyclerView
|
|
||||||
android:id="@+id/rv_home_map_device_state"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/ll_home_map_top_pet"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginTop="@dimen/dp_60"
|
|
||||||
android:layout_marginEnd="@dimen/dp_2"
|
|
||||||
android:layoutDirection="rtl" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/il_home_map_pet_location"
|
|
||||||
layout="@layout/layout_pet_location_info"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_marginBottom="@dimen/dp_38"
|
|
||||||
android:visibility="invisible" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_home_map_refresh_location"
|
|
||||||
style="@style/map_image_yellow_btn_style"
|
|
||||||
android:layout_above="@id/il_home_map_pet_location"
|
|
||||||
android:layout_alignEnd="@id/rv_home_map_device_state"
|
|
||||||
android:layout_marginBottom="@dimen/dp_18"
|
|
||||||
android:tint="@color/grey_color" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/home_map_refresh_btn"
|
|
||||||
style="@style/map_image_yellow_btn_style"
|
|
||||||
android:layout_above="@id/iv_home_map_refresh_location"
|
|
||||||
android:layout_alignEnd="@id/iv_home_map_refresh_location"
|
|
||||||
android:layout_marginBottom="@dimen/dp_8" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/home_map_bluetooth_btn"
|
|
||||||
style="@style/map_image_white_btn_style"
|
|
||||||
android:layout_alignBottom="@id/iv_home_map_refresh_location"
|
|
||||||
android:padding="@dimen/dp_8"
|
|
||||||
android:src="@drawable/icon_map_bluetooth" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_home_map_ble_con_state"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignTop="@id/home_map_bluetooth_btn"
|
|
||||||
android:layout_alignEnd="@id/home_map_bluetooth_btn"
|
|
||||||
android:src="@drawable/icon_map_offline" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:id="@+id/home_map_live_btn"
|
android:id="@+id/ll_home_map_device_battery_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@id/home_map_bluetooth_btn"
|
android:visibility="invisible">
|
||||||
android:layout_marginBottom="@dimen/dp_8"
|
|
||||||
android:background="@drawable/shape38_gray_alpha_circle_bg"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingHorizontal="@dimen/dp_14"
|
|
||||||
android:paddingVertical="@dimen/dp_16"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<include
|
||||||
android:id="@+id/iv_home_map_live_image"
|
android:id="@+id/il_home_map_device_battery_layout"
|
||||||
android:layout_width="wrap_content"
|
layout="@layout/layout_map_device_battery" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/icon_gray_cir_ring"
|
|
||||||
android:padding="@dimen/dp_6"
|
|
||||||
android:src="@drawable/icon_red_dot"
|
|
||||||
android:tint="@color/grey_color" />
|
|
||||||
|
|
||||||
<com.abbidot.tracker.widget.TypefaceTextView
|
|
||||||
android:id="@+id/tv_home_map_live_title"
|
|
||||||
style="@style/my_TextView_style_v2"
|
|
||||||
android:layout_marginTop="@dimen/dp_2"
|
|
||||||
android:text="@string/txt_live"
|
|
||||||
android:textColor="@color/grey_color"
|
|
||||||
android:textSize="@dimen/textSize12"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</FrameLayout>
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_home_map_top_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_8">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/il_home_map_device_msg"
|
||||||
|
layout="@layout/item_home_map_device_msg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<com.abbidot.tracker.widget.NonSwipeRecyclerView
|
||||||
|
android:id="@+id/rv_home_map_device_state"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="@dimen/dp_60"
|
||||||
|
android:layout_marginEnd="@dimen/dp_2"
|
||||||
|
android:layoutDirection="rtl" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/il_home_map_pet_location"
|
||||||
|
layout="@layout/layout_pet_location_info"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginBottom="@dimen/dp_38"
|
||||||
|
android:visibility="invisible" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_home_map_refresh_location"
|
||||||
|
style="@style/map_image_yellow_btn_style"
|
||||||
|
android:layout_above="@id/il_home_map_pet_location"
|
||||||
|
android:layout_alignEnd="@id/rv_home_map_device_state"
|
||||||
|
android:layout_marginBottom="@dimen/dp_18"
|
||||||
|
android:tint="@color/grey_color" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/home_map_refresh_btn"
|
||||||
|
style="@style/map_image_yellow_btn_style"
|
||||||
|
android:layout_above="@id/iv_home_map_refresh_location"
|
||||||
|
android:layout_alignEnd="@id/iv_home_map_refresh_location"
|
||||||
|
android:layout_marginBottom="@dimen/dp_8" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/home_map_bluetooth_btn"
|
||||||
|
style="@style/map_image_white_btn_style"
|
||||||
|
android:layout_alignBottom="@id/iv_home_map_refresh_location"
|
||||||
|
android:padding="@dimen/dp_8"
|
||||||
|
android:src="@drawable/icon_map_bluetooth" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_home_map_ble_con_state"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignTop="@id/home_map_bluetooth_btn"
|
||||||
|
android:layout_alignEnd="@id/home_map_bluetooth_btn"
|
||||||
|
android:src="@drawable/icon_map_offline" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/home_map_live_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_above="@id/home_map_bluetooth_btn"
|
||||||
|
android:layout_marginBottom="@dimen/dp_8"
|
||||||
|
android:background="@drawable/shape38_gray_alpha_circle_bg"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingHorizontal="@dimen/dp_14"
|
||||||
|
android:paddingVertical="@dimen/dp_16"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_home_map_live_image"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/icon_gray_cir_ring"
|
||||||
|
android:padding="@dimen/dp_6"
|
||||||
|
android:src="@drawable/icon_red_dot"
|
||||||
|
android:tint="@color/grey_color" />
|
||||||
|
|
||||||
|
<com.abbidot.tracker.widget.TypefaceTextView
|
||||||
|
android:id="@+id/tv_home_map_live_title"
|
||||||
|
style="@style/my_TextView_style_v2"
|
||||||
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
|
android:text="@string/txt_live"
|
||||||
|
android:textColor="@color/grey_color"
|
||||||
|
android:textSize="@dimen/textSize12"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
<com.abbidot.tracker.widget.VerticalTopToBottomSeekBar
|
<com.abbidot.tracker.widget.VerticalTopToBottomSeekBar
|
||||||
android:id="@+id/vsb_map_route_line"
|
android:id="@+id/vsb_map_route_line"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_height="320dp"
|
android:layout_height="320dp"
|
||||||
android:layout_gravity="center_vertical|end"
|
android:layout_gravity="center_vertical|end"
|
||||||
android:layout_marginBottom="@dimen/dp_18"
|
android:layout_marginBottom="@dimen/dp_18"
|
||||||
@@ -49,7 +48,8 @@
|
|||||||
android:maxHeight="@dimen/dp_12"
|
android:maxHeight="@dimen/dp_12"
|
||||||
android:progress="0"
|
android:progress="0"
|
||||||
android:progressDrawable="@drawable/shape_seek_bar_style"
|
android:progressDrawable="@drawable/shape_seek_bar_style"
|
||||||
android:thumb="@drawable/shape_black_circle_bg" />
|
android:thumb="@drawable/shape_black_circle_bg"
|
||||||
|
android:visibility="gone" />
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
<com.abbidot.tracker.widget.TypefaceTextView
|
<com.abbidot.tracker.widget.TypefaceTextView
|
||||||
android:id="@+id/tv_pet_location_reverse_geocode"
|
android:id="@+id/tv_pet_location_reverse_geocode"
|
||||||
style="@style/my_TextView_style_v2"
|
style="@style/my_TextView_style_v2"
|
||||||
android:layout_marginTop="@dimen/dp_28"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_marginEnd="@dimen/dp_42"
|
||||||
android:drawablePadding="@dimen/dp_2"
|
android:drawablePadding="@dimen/dp_2"
|
||||||
android:textSize="@dimen/textSize16"
|
android:textSize="@dimen/textSize16"
|
||||||
app:typeface="@string/roboto_regular_font" />
|
app:typeface="@string/roboto_regular_font" />
|
||||||
@@ -21,9 +22,18 @@
|
|||||||
android:id="@+id/tv_pet_location_update_time"
|
android:id="@+id/tv_pet_location_update_time"
|
||||||
style="@style/my_TextView_style_v2"
|
style="@style/my_TextView_style_v2"
|
||||||
android:layout_below="@id/tv_pet_location_reverse_geocode"
|
android:layout_below="@id/tv_pet_location_reverse_geocode"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
android:layout_marginBottom="@dimen/dp_12"
|
android:layout_marginBottom="@dimen/dp_12"
|
||||||
android:textColor="@color/select_color3"
|
android:textColor="@color/select_color3"
|
||||||
android:textSize="@dimen/textSize12"
|
android:textSize="@dimen/textSize12"
|
||||||
app:typeface="@string/roboto_regular_font" />
|
app:typeface="@string/roboto_regular_font" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_pet_location_navigation_btn"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:background="@drawable/selector_transparent_pressed"
|
||||||
|
android:src="@drawable/ico_map_navigati_image" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||