mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-16 19:26:12 -04:00
Simplify WearOS app because this is such a cluster fuck and I've ran out of motivation.
This commit is contained in:
@@ -49,8 +49,9 @@ class PodDeviceCache @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun loadMainDevice(): BleScanResult? = withContext(dispatcherProvider.IO) {
|
suspend fun loadMainDevice(): BleScanResult? = withContext(dispatcherProvider.IO) {
|
||||||
log(TAG) { "loadMainDevice()" }
|
log(TAG, VERBOSE) { "loadMainDevice()" }
|
||||||
lock.withLock {
|
lock.withLock {
|
||||||
|
if (!mainDeviceCacheFile.exists()) return@withLock null
|
||||||
try {
|
try {
|
||||||
val raw = mainDeviceCacheFile.readText()
|
val raw = mainDeviceCacheFile.readText()
|
||||||
jsonAdapter.fromJson(raw)
|
jsonAdapter.fromJson(raw)
|
||||||
|
|||||||
@@ -54,23 +54,6 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<service
|
|
||||||
android:name=".wear.core.CAPodTileService"
|
|
||||||
android:description="@string/wear_service_description"
|
|
||||||
android:exported="true"
|
|
||||||
android:icon="@drawable/common_full_open_on_phone"
|
|
||||||
android:label="@string/wear_service_label"
|
|
||||||
android:permission="com.google.android.wearable.permission.BIND_TILE_PROVIDER">
|
|
||||||
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="androidx.wear.tiles.action.BIND_TILE_PROVIDER" />
|
|
||||||
</intent-filter>
|
|
||||||
|
|
||||||
<!-- The tile preview shown when configuring tiles on your phone -->
|
|
||||||
<meta-data
|
|
||||||
android:name="androidx.wear.tiles.PREVIEW"
|
|
||||||
android:resource="@layout/wear_tile_preview" />
|
|
||||||
</service>
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
package eu.darken.capod.wear.core
|
|
||||||
|
|
||||||
import androidx.wear.tiles.*
|
|
||||||
import com.google.android.horologist.tiles.CoroutinesTileService
|
|
||||||
import eu.darken.capod.R
|
|
||||||
|
|
||||||
class CAPodTileService : CoroutinesTileService() {
|
|
||||||
|
|
||||||
override suspend fun resourcesRequest(
|
|
||||||
requestParams: RequestBuilders.ResourcesRequest
|
|
||||||
): ResourceBuilders.Resources = ResourceBuilders.Resources.Builder().apply {
|
|
||||||
setVersion(RESOURCES_VERSION)
|
|
||||||
}.build()
|
|
||||||
|
|
||||||
override suspend fun tileRequest(
|
|
||||||
requestParams: RequestBuilders.TileRequest
|
|
||||||
): TileBuilders.Tile = TileBuilders.Tile.Builder().apply {
|
|
||||||
val singleTileTimeline = TimelineBuilders.Timeline.Builder()
|
|
||||||
.addTimelineEntry(
|
|
||||||
TimelineBuilders.TimelineEntry.Builder().apply {
|
|
||||||
setLayout(
|
|
||||||
LayoutElementBuilders.Layout.Builder().apply {
|
|
||||||
setRoot(tileLayout())
|
|
||||||
}.build()
|
|
||||||
)
|
|
||||||
}.build()
|
|
||||||
)
|
|
||||||
.build()
|
|
||||||
setResourcesVersion(RESOURCES_VERSION)
|
|
||||||
setTimeline(singleTileTimeline)
|
|
||||||
}.build()
|
|
||||||
|
|
||||||
private fun tileLayout(): LayoutElementBuilders.LayoutElement {
|
|
||||||
val text = getString(R.string.app_name)
|
|
||||||
return LayoutElementBuilders.Box.Builder()
|
|
||||||
.setVerticalAlignment(LayoutElementBuilders.VERTICAL_ALIGN_CENTER)
|
|
||||||
.setWidth(DimensionBuilders.expand())
|
|
||||||
.setHeight(DimensionBuilders.expand())
|
|
||||||
.addContent(
|
|
||||||
LayoutElementBuilders.Text.Builder()
|
|
||||||
.setText(text)
|
|
||||||
.build()
|
|
||||||
)
|
|
||||||
.build()
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val RESOURCES_VERSION = "0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,9 @@ import eu.darken.capod.common.lists.differ.setupDiffer
|
|||||||
import eu.darken.capod.common.lists.modular.ModularAdapter
|
import eu.darken.capod.common.lists.modular.ModularAdapter
|
||||||
import eu.darken.capod.common.lists.modular.mods.DataBinderMod
|
import eu.darken.capod.common.lists.modular.mods.DataBinderMod
|
||||||
import eu.darken.capod.common.lists.modular.mods.TypedVHCreatorMod
|
import eu.darken.capod.common.lists.modular.mods.TypedVHCreatorMod
|
||||||
import eu.darken.capod.wear.ui.overview.cards.*
|
import eu.darken.capod.wear.ui.overview.cards.BluetoothDisabledVH
|
||||||
|
import eu.darken.capod.wear.ui.overview.cards.MissingMainDeviceVH
|
||||||
|
import eu.darken.capod.wear.ui.overview.cards.PermissionCardVH
|
||||||
import eu.darken.capod.wear.ui.overview.cards.pods.DualPodsCardVH
|
import eu.darken.capod.wear.ui.overview.cards.pods.DualPodsCardVH
|
||||||
import eu.darken.capod.wear.ui.overview.cards.pods.SinglePodsCardVH
|
import eu.darken.capod.wear.ui.overview.cards.pods.SinglePodsCardVH
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
@@ -24,8 +26,6 @@ class OverviewAdapter @Inject constructor() :
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
modules.add(DataBinderMod(data))
|
modules.add(DataBinderMod(data))
|
||||||
modules.add(TypedVHCreatorMod({ data[it] is AppTitleVH.Item }) { AppTitleVH(it) })
|
|
||||||
modules.add(TypedVHCreatorMod({ data[it] is SettingsButtonVH.Item }) { SettingsButtonVH(it) })
|
|
||||||
modules.add(TypedVHCreatorMod({ data[it] is PermissionCardVH.Item }) { PermissionCardVH(it) })
|
modules.add(TypedVHCreatorMod({ data[it] is PermissionCardVH.Item }) { PermissionCardVH(it) })
|
||||||
modules.add(TypedVHCreatorMod({ data[it] is DualPodsCardVH.Item }) { DualPodsCardVH(it) })
|
modules.add(TypedVHCreatorMod({ data[it] is DualPodsCardVH.Item }) { DualPodsCardVH(it) })
|
||||||
modules.add(TypedVHCreatorMod({ data[it] is SinglePodsCardVH.Item }) { SinglePodsCardVH(it) })
|
modules.add(TypedVHCreatorMod({ data[it] is SinglePodsCardVH.Item }) { SinglePodsCardVH(it) })
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ class OverviewFragment : Fragment3(R.layout.main_fragment) {
|
|||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
ui.list.apply {
|
ui.list.apply {
|
||||||
isEdgeItemsCenteringEnabled = true
|
|
||||||
layoutManager = LinearLayoutManager(context)
|
layoutManager = LinearLayoutManager(context)
|
||||||
this.adapter = overviewAdapter
|
this.adapter = overviewAdapter
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,18 +6,23 @@ import dagger.hilt.android.lifecycle.HiltViewModel
|
|||||||
import eu.darken.capod.common.bluetooth.BluetoothManager2
|
import eu.darken.capod.common.bluetooth.BluetoothManager2
|
||||||
import eu.darken.capod.common.coroutine.DispatcherProvider
|
import eu.darken.capod.common.coroutine.DispatcherProvider
|
||||||
import eu.darken.capod.common.debug.autoreport.DebugSettings
|
import eu.darken.capod.common.debug.autoreport.DebugSettings
|
||||||
|
import eu.darken.capod.common.debug.logging.Logging.Priority.VERBOSE
|
||||||
|
import eu.darken.capod.common.debug.logging.log
|
||||||
import eu.darken.capod.common.flow.combine
|
import eu.darken.capod.common.flow.combine
|
||||||
import eu.darken.capod.common.livedata.SingleLiveEvent
|
import eu.darken.capod.common.livedata.SingleLiveEvent
|
||||||
import eu.darken.capod.common.navigation.navVia
|
|
||||||
import eu.darken.capod.common.permissions.Permission
|
import eu.darken.capod.common.permissions.Permission
|
||||||
import eu.darken.capod.common.uix.ViewModel3
|
import eu.darken.capod.common.uix.ViewModel3
|
||||||
import eu.darken.capod.main.core.GeneralSettings
|
import eu.darken.capod.main.core.GeneralSettings
|
||||||
import eu.darken.capod.main.core.PermissionTool
|
import eu.darken.capod.main.core.PermissionTool
|
||||||
|
import eu.darken.capod.monitor.core.PodDeviceCache
|
||||||
import eu.darken.capod.monitor.core.PodMonitor
|
import eu.darken.capod.monitor.core.PodMonitor
|
||||||
import eu.darken.capod.pods.core.DualPodDevice
|
import eu.darken.capod.pods.core.DualPodDevice
|
||||||
import eu.darken.capod.pods.core.PodDevice
|
import eu.darken.capod.pods.core.PodDevice
|
||||||
|
import eu.darken.capod.pods.core.PodFactory
|
||||||
import eu.darken.capod.pods.core.SinglePodDevice
|
import eu.darken.capod.pods.core.SinglePodDevice
|
||||||
import eu.darken.capod.wear.ui.overview.cards.*
|
import eu.darken.capod.wear.ui.overview.cards.BluetoothDisabledVH
|
||||||
|
import eu.darken.capod.wear.ui.overview.cards.MissingMainDeviceVH
|
||||||
|
import eu.darken.capod.wear.ui.overview.cards.PermissionCardVH
|
||||||
import eu.darken.capod.wear.ui.overview.cards.pods.DualPodsCardVH
|
import eu.darken.capod.wear.ui.overview.cards.pods.DualPodsCardVH
|
||||||
import eu.darken.capod.wear.ui.overview.cards.pods.SinglePodsCardVH
|
import eu.darken.capod.wear.ui.overview.cards.pods.SinglePodsCardVH
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
@@ -35,6 +40,8 @@ class OverviewFragmentVM @Inject constructor(
|
|||||||
private val generalSettings: GeneralSettings,
|
private val generalSettings: GeneralSettings,
|
||||||
debugSettings: DebugSettings,
|
debugSettings: DebugSettings,
|
||||||
private val bluetoothManager: BluetoothManager2,
|
private val bluetoothManager: BluetoothManager2,
|
||||||
|
private val podDeviceCache: PodDeviceCache,
|
||||||
|
private val podFactory: PodFactory
|
||||||
) : ViewModel3(dispatcherProvider = dispatcherProvider) {
|
) : ViewModel3(dispatcherProvider = dispatcherProvider) {
|
||||||
|
|
||||||
private val updateTicker = channelFlow<Unit> {
|
private val updateTicker = channelFlow<Unit> {
|
||||||
@@ -67,59 +74,53 @@ class OverviewFragmentVM @Inject constructor(
|
|||||||
val listItems: LiveData<List<OverviewAdapter.Item>> = combine(
|
val listItems: LiveData<List<OverviewAdapter.Item>> = combine(
|
||||||
updateTicker,
|
updateTicker,
|
||||||
permissionTool.missingPermissions,
|
permissionTool.missingPermissions,
|
||||||
pods,
|
|
||||||
debugSettings.isDebugModeEnabled.flow,
|
debugSettings.isDebugModeEnabled.flow,
|
||||||
generalSettings.showAll.flow,
|
|
||||||
bluetoothManager.isBluetoothEnabled,
|
bluetoothManager.isBluetoothEnabled,
|
||||||
podMonitor.mainDevice,
|
podMonitor.mainDevice,
|
||||||
) { _, permissions, pods, isDebugMode, showAll, isBluetoothEnabled, mainPod ->
|
) { _, permissions, isDebugMode, isBluetoothEnabled, mainPod ->
|
||||||
val items = mutableListOf<OverviewAdapter.Item>()
|
val items = mutableListOf<OverviewAdapter.Item>()
|
||||||
|
|
||||||
permissions
|
if (permissions.isNotEmpty()) {
|
||||||
.map { perm ->
|
permissions
|
||||||
PermissionCardVH.Item(
|
.map { perm ->
|
||||||
permission = perm,
|
PermissionCardVH.Item(
|
||||||
onRequest = { requestPermissionEvent.postValue(it) },
|
permission = perm,
|
||||||
)
|
onRequest = { requestPermissionEvent.postValue(it) },
|
||||||
}
|
|
||||||
.run { items.addAll(this) }
|
|
||||||
|
|
||||||
if (permissions.isEmpty()) {
|
|
||||||
if (!isBluetoothEnabled) {
|
|
||||||
items.add(0, BluetoothDisabledVH.Item)
|
|
||||||
} else if (mainPod == null) {
|
|
||||||
items.add(0, MissingMainDeviceVH.Item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (permissions.isEmpty() && isBluetoothEnabled) {
|
|
||||||
pods.mapNotNull {
|
|
||||||
val now = Instant.now()
|
|
||||||
when (it) {
|
|
||||||
is DualPodDevice -> DualPodsCardVH.Item(
|
|
||||||
now = now,
|
|
||||||
device = it,
|
|
||||||
showDebug = isDebugMode,
|
|
||||||
isMainPod = it == mainPod,
|
|
||||||
)
|
)
|
||||||
is SinglePodDevice -> SinglePodsCardVH.Item(
|
|
||||||
now = now,
|
|
||||||
device = it,
|
|
||||||
showDebug = isDebugMode,
|
|
||||||
isMainPod = it == mainPod,
|
|
||||||
)
|
|
||||||
else -> null
|
|
||||||
}
|
}
|
||||||
}.run { items.addAll(this) }
|
.run { items.addAll(this) }
|
||||||
|
return@combine items
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsButtonVH.Item(
|
if (!isBluetoothEnabled) {
|
||||||
onClick = {
|
items.add(0, BluetoothDisabledVH.Item)
|
||||||
OverviewFragmentDirections.actionOverviewFragmentToSettingsFragment().navVia(this@OverviewFragmentVM)
|
return@combine items
|
||||||
}
|
}
|
||||||
).run { items.add(this) }
|
|
||||||
|
|
||||||
items.add(AppTitleVH.Item())
|
val podToShow = mainPod ?: podDeviceCache.loadMainDevice()?.let {
|
||||||
|
log(TAG, VERBOSE) { "Using podDeviceCache" }
|
||||||
|
podFactory.createPod(it)?.device
|
||||||
|
}
|
||||||
|
log(TAG, VERBOSE) { "Showing $podToShow" }
|
||||||
|
|
||||||
|
val now = Instant.now()
|
||||||
|
|
||||||
|
val pod = when (podToShow) {
|
||||||
|
is DualPodDevice -> DualPodsCardVH.Item(
|
||||||
|
now = now,
|
||||||
|
device = podToShow,
|
||||||
|
showDebug = isDebugMode,
|
||||||
|
isMainPod = true,
|
||||||
|
)
|
||||||
|
is SinglePodDevice -> SinglePodsCardVH.Item(
|
||||||
|
now = now,
|
||||||
|
device = podToShow,
|
||||||
|
showDebug = isDebugMode,
|
||||||
|
isMainPod = true,
|
||||||
|
)
|
||||||
|
else -> MissingMainDeviceVH.Item
|
||||||
|
}
|
||||||
|
items.add(pod)
|
||||||
|
|
||||||
items
|
items
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
package eu.darken.capod.wear.ui.overview.cards
|
|
||||||
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import eu.darken.capod.R
|
|
||||||
import eu.darken.capod.common.BuildConfigWrap
|
|
||||||
import eu.darken.capod.common.lists.binding
|
|
||||||
import eu.darken.capod.common.lists.differ.DifferItem
|
|
||||||
import eu.darken.capod.common.upgrade.UpgradeRepo
|
|
||||||
import eu.darken.capod.databinding.OverviewApptitleItemBinding
|
|
||||||
import eu.darken.capod.wear.ui.overview.OverviewAdapter
|
|
||||||
|
|
||||||
class AppTitleVH(parent: ViewGroup) :
|
|
||||||
OverviewAdapter.BaseVH<AppTitleVH.Item, OverviewApptitleItemBinding>(
|
|
||||||
R.layout.overview_apptitle_item,
|
|
||||||
parent
|
|
||||||
) {
|
|
||||||
|
|
||||||
override val viewBinding = lazy {
|
|
||||||
OverviewApptitleItemBinding.bind(itemView)
|
|
||||||
}
|
|
||||||
|
|
||||||
override val onBindData: OverviewApptitleItemBinding.(
|
|
||||||
item: Item,
|
|
||||||
payloads: List<Any>
|
|
||||||
) -> Unit = binding(payload = true) { item ->
|
|
||||||
appVersion.text = BuildConfigWrap.VERSION_DESCRIPTION_TINY
|
|
||||||
}
|
|
||||||
|
|
||||||
data class Item(
|
|
||||||
val upgradeInfo: UpgradeRepo.Info? = null
|
|
||||||
) : OverviewAdapter.Item {
|
|
||||||
override val stableId: Long = Item::class.hashCode().toLong()
|
|
||||||
|
|
||||||
override val payloadProvider: ((DifferItem, DifferItem) -> DifferItem?)
|
|
||||||
get() = { old, new -> if (new::class.isInstance(old)) new else null }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
package eu.darken.capod.wear.ui.overview.cards
|
package eu.darken.capod.wear.ui.overview.cards
|
||||||
|
|
||||||
import android.text.Html
|
|
||||||
import android.text.method.LinkMovementMethod
|
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import eu.darken.capod.R
|
import eu.darken.capod.R
|
||||||
import eu.darken.capod.common.PrivacyPolicy
|
|
||||||
import eu.darken.capod.common.lists.binding
|
import eu.darken.capod.common.lists.binding
|
||||||
import eu.darken.capod.common.lists.differ.DifferItem
|
import eu.darken.capod.common.lists.differ.DifferItem
|
||||||
import eu.darken.capod.common.permissions.Permission
|
import eu.darken.capod.common.permissions.Permission
|
||||||
@@ -28,12 +25,6 @@ class PermissionCardVH(parent: ViewGroup) :
|
|||||||
permissionLabel.setText(item.permission.labelRes)
|
permissionLabel.setText(item.permission.labelRes)
|
||||||
permissionDescription.setText(item.permission.descriptionRes)
|
permissionDescription.setText(item.permission.descriptionRes)
|
||||||
grantAction.setOnClickListener { item.onRequest(item.permission) }
|
grantAction.setOnClickListener { item.onRequest(item.permission) }
|
||||||
privacyPolicy.apply {
|
|
||||||
movementMethod = LinkMovementMethod.getInstance()
|
|
||||||
val ppText = getString(R.string.settings_privacy_policy_label)
|
|
||||||
val ppLink = PrivacyPolicy.URL
|
|
||||||
text = Html.fromHtml("<html><a href=\"$ppLink\">$ppText</a></html>", 0)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Item(
|
data class Item(
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
package eu.darken.capod.wear.ui.overview.cards
|
|
||||||
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import eu.darken.capod.R
|
|
||||||
import eu.darken.capod.common.lists.binding
|
|
||||||
import eu.darken.capod.common.lists.differ.DifferItem
|
|
||||||
import eu.darken.capod.databinding.OverviewSettingsItemBinding
|
|
||||||
import eu.darken.capod.wear.ui.overview.OverviewAdapter
|
|
||||||
|
|
||||||
class SettingsButtonVH(parent: ViewGroup) :
|
|
||||||
OverviewAdapter.BaseVH<SettingsButtonVH.Item, OverviewSettingsItemBinding>(
|
|
||||||
R.layout.overview_settings_item,
|
|
||||||
parent
|
|
||||||
) {
|
|
||||||
|
|
||||||
override val viewBinding = lazy {
|
|
||||||
OverviewSettingsItemBinding.bind(itemView)
|
|
||||||
}
|
|
||||||
|
|
||||||
override val onBindData: OverviewSettingsItemBinding.(
|
|
||||||
item: Item,
|
|
||||||
payloads: List<Any>
|
|
||||||
) -> Unit = binding(payload = true) { item ->
|
|
||||||
settingsButton.setOnClickListener { item.onClick() }
|
|
||||||
}
|
|
||||||
|
|
||||||
data class Item(
|
|
||||||
val isEnabled: Boolean = true,
|
|
||||||
val onClick: () -> Unit,
|
|
||||||
) : OverviewAdapter.Item {
|
|
||||||
override val stableId: Long = Item::class.hashCode().toLong()
|
|
||||||
|
|
||||||
override val payloadProvider: ((DifferItem, DifferItem) -> DifferItem?)
|
|
||||||
get() = { old, new -> if (new::class.isInstance(old)) new else null }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -105,24 +105,6 @@ class DualPodsCardVH(parent: ViewGroup) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// // Case lid state
|
|
||||||
// device.apply {
|
|
||||||
// if (this is DualAirPods) {
|
|
||||||
// podCaseLidLabel.text = when (caseLidState) {
|
|
||||||
// LidState.OPEN -> context.getString(R.string.pods_case_status_open_label)
|
|
||||||
// LidState.CLOSED -> context.getString(R.string.pods_case_status_closed_label)
|
|
||||||
// else -> context.getString(R.string.pods_case_unknown_state)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// val hideInfo = !listOf(LidState.OPEN, LidState.CLOSED).contains(caseLidState)
|
|
||||||
// podCaseLidIcon.isInvisible = hideInfo
|
|
||||||
// podCaseLidLabel.isInvisible = hideInfo
|
|
||||||
// } else {
|
|
||||||
// podCaseLidIcon.isGone = true
|
|
||||||
// podCaseLidLabel.isGone = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Connection state
|
// Connection state
|
||||||
device.apply {
|
device.apply {
|
||||||
val sb = StringBuilder()
|
val sb = StringBuilder()
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.wear.widget.WearableRecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/list"
|
android:id="@+id/list"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:scrollbars="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:scrollbars="vertical"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:listitem="@layout/overview_pods_dual_item" />
|
tools:listitem="@layout/overview_pods_dual_item" />
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?colorPrimary">
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/title"
|
|
||||||
style="@style/TextAppearance.Material3.HeadlineMedium"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/app_name"
|
|
||||||
android:textColor="?colorOnPrimary"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/app_version"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/app_version"
|
|
||||||
style="@style/TextAppearance.Material3.LabelMedium"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="?colorOnPrimary"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/title"
|
|
||||||
tools:text="v1.0.0" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -1,37 +1,34 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_margin="8dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/container"
|
android:id="@+id/bluetooth_label"
|
||||||
android:layout_margin="8dp"
|
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:text="@string/overview_bluetooth_disabled_label"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/bluetooth_description"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/bluetooth_label"
|
android:id="@+id/bluetooth_description"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/overview_bluetooth_disabled_label"
|
android:layout_marginTop="4dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:layout_marginBottom="32dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:text="@string/overview_bluetooth_disabled_description"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/bluetooth_label" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/bluetooth_description"
|
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/overview_bluetooth_disabled_description"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/bluetooth_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|||||||
@@ -1,36 +1,34 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp">
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/permission_label"
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_margin="8dp"
|
android:layout_marginTop="32dp"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/overview_nomaindevice_label"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/permission_description"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_chainStyle="packed" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/permission_label"
|
android:id="@+id/permission_description"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/overview_nomaindevice_label"
|
android:layout_marginBottom="32dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:layout_marginTop="4dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:text="@string/overview_nomaindevice_description"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/permission_label" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/permission_description"
|
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/overview_nomaindevice_description"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/permission_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|||||||
@@ -1,70 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
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="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp">
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/container"
|
android:id="@+id/request_description"
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Caption"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_margin="8dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_marginTop="32dp"
|
||||||
|
android:text="@string/permission_required_title"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/permission_label"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/request_description"
|
android:id="@+id/permission_label"
|
||||||
style="@style/TextAppearance.MaterialComponents.Caption"
|
style="@style/TextAppearance.MaterialComponents.Body1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/permission_required_title"
|
android:layout_marginTop="8dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toTopOf="@+id/permission_description"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/request_description"
|
||||||
|
tools:text="BLUETOOTH_CONNECT" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/permission_label"
|
android:id="@+id/permission_description"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body1"
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="4dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toTopOf="@+id/grant_action"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/request_description"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:text="BLUETOOTH_CONNECT" />
|
app:layout_constraintTop_toBottomOf="@id/permission_label"
|
||||||
|
tools:text="Lorem Ipsum" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/permission_description"
|
android:id="@+id/grant_action"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
style="@style/Widget.MaterialComponents.Button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginBottom="32dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:text="@string/general_grant_permission_action"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/permission_label"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:text="Lorem Ipsum" />
|
app:layout_constraintTop_toBottomOf="@id/permission_description" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:id="@+id/privacy_policy"
|
|
||||||
style="@style/TextAppearance.MaterialComponents.Tooltip"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:text="@string/settings_privacy_policy_label"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/permission_description" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/grant_action"
|
|
||||||
style="@style/Widget.MaterialComponents.Button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:text="@string/general_grant_permission_action"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/privacy_policy" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|||||||
@@ -1,286 +1,282 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_margin="8dp">
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
tools:context=".wear.ui.MainActivity">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/device_icon"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/name"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_airpod_both_24" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/name"
|
||||||
|
style="@style/TextAppearance.Material3.BodyMedium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/status"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/device_icon"
|
||||||
|
tools:text="Apple AirPods Pro" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/status"
|
||||||
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
app:lineHeight="14sp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:lines="2"
|
||||||
|
android:maxLines="2"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/barrier_top"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/name"
|
||||||
|
tools:text="Music Active, Case Closed" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Barrier
|
||||||
|
android:id="@+id/barrier_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:barrierDirection="bottom"
|
||||||
|
app:constraint_referenced_ids="status" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/pod_left_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp">
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/pod_case_container"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
||||||
|
app:layout_constraintVertical_bias="0.2">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/device_icon"
|
android:id="@+id/pod_left_icon"
|
||||||
android:layout_width="24dp"
|
style="@style/PodInfoItemIcon"
|
||||||
android:layout_height="24dp"
|
android:layout_marginHorizontal="2dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/name"
|
android:contentDescription="@string/pods_dual_left_label"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:src="@drawable/ic_airpod_left_24"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/pod_left_wear_icon"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="spread"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:srcCompat="@drawable/ic_airpod_both_24" />
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_left_wear_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
|
android:src="@drawable/ic_baseline_hearing_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/pod_left_icon"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/pod_left_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/pod_left_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_left_battery_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:src="@drawable/ic_baseline_battery_unknown_24"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/pod_left_battery_label"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/pod_left_charging_icon"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/pod_left_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_left_charging_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:src="@drawable/ic_baseline_power_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/pod_left_battery_icon"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/pod_left_battery_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/pod_left_battery_icon" />
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/pod_left_battery_label"
|
||||||
style="@style/TextAppearance.Material3.BodyMedium"
|
style="@style/PodInfoItemText"
|
||||||
tools:text="Apple AirPods Pro"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/status"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/device_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/status"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
tools:text="Music Active, Case Closed"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginTop="1dp"
|
||||||
android:gravity="center_horizontal"
|
android:text="@string/general_value_not_available_label"
|
||||||
android:maxLines="2"
|
app:layout_constraintEnd_toEndOf="@id/pod_left_charging_icon"
|
||||||
android:ellipsize="end"
|
app:layout_constraintStart_toStartOf="@id/pod_left_battery_icon"
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_top"
|
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_icon" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/name" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
<ImageView
|
||||||
android:id="@+id/barrier_top"
|
android:id="@+id/pod_left_microphone_icon"
|
||||||
android:layout_width="wrap_content"
|
style="@style/PodInfoItemIcon"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginHorizontal="2dp"
|
||||||
app:barrierDirection="bottom"
|
android:layout_marginTop="1dp"
|
||||||
app:constraint_referenced_ids="status" />
|
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_left_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_case_container"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:contentDescription="@string/pods_dual_left_label"
|
|
||||||
android:src="@drawable/ic_airpod_left_24"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_left_wear_icon"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="spread"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_left_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_left_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_left_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/pod_left_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_microphone_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.85"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_case_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="4dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_right_container"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintVertical_bias="0.0">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_airpod_case_24"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_case_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_case_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_case_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_case_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_case_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_case_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_case_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_case_battery_icon" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_right_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_case_container"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:contentDescription="@string/pods_dual_right_label"
|
|
||||||
android:src="@drawable/ic_airpod_right_24"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/pod_right_wear_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_right_icon"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_right_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_right_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_right_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_right_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_right_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_right_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/pod_right_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_microphone_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.15"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_bottom"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="top"
|
|
||||||
app:constraint_referenced_ids="last_seen" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/last_seen"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
tools:text="3s ago"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:gravity="center"
|
|
||||||
app:drawableStartCompat="@drawable/ic_baseline_watch_later_12"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.85"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_bottom" />
|
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_label" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/pod_case_container"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="4dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/pod_left_container"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/pod_right_container"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/pod_left_container"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/pod_left_container"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_case_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:src="@drawable/ic_airpod_case_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_case_battery_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:src="@drawable/ic_baseline_battery_unknown_24"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/pod_case_battery_label"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/pod_case_charging_icon"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/pod_case_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_case_charging_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:src="@drawable/ic_baseline_power_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/pod_case_battery_icon"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/pod_case_battery_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/pod_case_battery_icon" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/pod_case_battery_label"
|
||||||
|
style="@style/PodInfoItemText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:text="@string/general_value_not_available_label"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/pod_case_battery_icon" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/pod_right_container"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/pod_case_container"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
||||||
|
app:layout_constraintVertical_bias="0.2">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_right_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
|
android:contentDescription="@string/pods_dual_right_label"
|
||||||
|
android:src="@drawable/ic_airpod_right_24"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/pod_right_wear_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_right_wear_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
|
android:src="@drawable/ic_baseline_hearing_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/pod_right_icon"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/pod_right_icon"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/pod_right_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_right_battery_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:src="@drawable/ic_baseline_battery_unknown_24"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/pod_right_battery_label"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/pod_right_charging_icon"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/pod_right_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_right_charging_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:src="@drawable/ic_baseline_power_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/pod_right_battery_icon"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/pod_right_battery_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/pod_right_battery_icon" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/pod_right_battery_label"
|
||||||
|
style="@style/PodInfoItemText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:text="@string/general_value_not_available_label"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/pod_right_charging_icon"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/pod_right_battery_icon"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/pod_right_microphone_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:layout_marginHorizontal="2dp"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.15"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_label" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Barrier
|
||||||
|
android:id="@+id/barrier_bottom"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:barrierDirection="top"
|
||||||
|
app:constraint_referenced_ids="last_seen" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/last_seen"
|
||||||
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
app:drawableStartCompat="@drawable/ic_baseline_watch_later_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/barrier_bottom"
|
||||||
|
tools:text="3s ago" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -1,155 +1,147 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
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="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="8dp">
|
android:layout_margin="8dp"
|
||||||
|
tools:context=".wear.ui.MainActivity">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/device_icon"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/name"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/ic_device_generic_headphones" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/name"
|
||||||
|
style="@style/TextAppearance.Material3.BodyMedium"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/status"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/device_icon"
|
||||||
|
tools:text="Apple AirPods Max" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/status"
|
||||||
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="2"
|
||||||
|
android:maxLines="2"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/barrier_top"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/name"
|
||||||
|
tools:text="Music Active, Case Closed" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Barrier
|
||||||
|
android:id="@+id/barrier_top"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:barrierDirection="bottom"
|
||||||
|
app:constraint_referenced_ids="status" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/pod_case_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="8dp">
|
android:layout_marginHorizontal="16dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
||||||
|
app:layout_constraintVertical_bias="0.20">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/device_icon"
|
android:id="@+id/battery_icon"
|
||||||
android:layout_width="24dp"
|
style="@style/PodInfoItemIcon"
|
||||||
android:layout_height="24dp"
|
android:src="@drawable/ic_baseline_battery_unknown_24"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/name"
|
app:layout_constraintBottom_toBottomOf="@id/battery_label"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="@id/battery_label" />
|
||||||
app:srcCompat="@drawable/ic_device_generic_headphones" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/battery_label"
|
||||||
style="@style/TextAppearance.Material3.BodyMedium"
|
style="@style/PodInfoItemText"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/status"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/device_icon"
|
|
||||||
tools:text="Apple AirPods Max" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/status"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginTop="2dp"
|
||||||
android:ellipsize="end"
|
android:text="@string/general_value_not_available_label"
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="2"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_top"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/battery_icon"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/charging_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:src="@drawable/ic_baseline_power_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/charging_label"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/name"
|
app:layout_constraintTop_toTopOf="@id/charging_label" />
|
||||||
tools:text="Music Active, Case Closed" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_top"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="bottom"
|
|
||||||
app:constraint_referenced_ids="status" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_case_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.20">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/battery_label"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/battery_label" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/charging_label"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/charging_label" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/charging_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:text="@string/pods_charging_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/charging_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/battery_label" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/wear_label"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/wear_label" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/wear_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:text="@string/headset_being_worn_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/wear_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/charging_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_bottom"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="top"
|
|
||||||
app:constraint_referenced_ids="last_seen" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
<com.google.android.material.textview.MaterialTextView
|
||||||
android:id="@+id/last_seen"
|
android:id="@+id/charging_label"
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
style="@style/PodInfoItemText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginStart="8dp"
|
||||||
android:gravity="center"
|
android:layout_marginTop="2dp"
|
||||||
app:drawableStartCompat="@drawable/ic_baseline_watch_later_12"
|
android:text="@string/pods_charging_label"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/charging_icon"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/battery_label" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/wear_icon"
|
||||||
|
style="@style/PodInfoItemIcon"
|
||||||
|
android:src="@drawable/ic_baseline_hearing_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/wear_label"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_bottom"
|
app:layout_constraintTop_toTopOf="@id/wear_label" />
|
||||||
tools:text="3s ago" />
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/wear_label"
|
||||||
|
style="@style/PodInfoItemText"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginTop="2dp"
|
||||||
|
android:text="@string/headset_being_worn_label"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/wear_icon"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/charging_label" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
<androidx.constraintlayout.widget.Barrier
|
||||||
|
android:id="@+id/barrier_bottom"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:barrierDirection="top"
|
||||||
|
app:constraint_referenced_ids="last_seen" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:id="@+id/last_seen"
|
||||||
|
style="@style/TextAppearance.Material3.BodySmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
app:drawableStartCompat="@drawable/ic_baseline_watch_later_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
tools:text="3s ago" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="8dp">
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/settings_button"
|
|
||||||
style="@style/Widget.Material3.Button"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:text="@string/settings_label"
|
|
||||||
app:icon="@drawable/ic_baseline_settings_24"
|
|
||||||
app:iconGravity="textStart"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -1,278 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
tools:context=".wear.ui.MainActivity">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/device_icon"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/name"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_airpod_both_24" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/name"
|
|
||||||
style="@style/TextAppearance.Material3.BodyMedium"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/status"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/device_icon"
|
|
||||||
tools:text="Apple AirPods Pro" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/status"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="8dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:lines="2"
|
|
||||||
android:maxLines="2"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_top"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/name"
|
|
||||||
tools:text="Music Active, Case Closed" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_top"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="bottom"
|
|
||||||
app:constraint_referenced_ids="status" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_left_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_case_container"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:contentDescription="@string/pods_dual_left_label"
|
|
||||||
android:src="@drawable/ic_airpod_left_24"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_left_wear_icon"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="spread"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_left_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_left_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_left_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/pod_left_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_microphone_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.85"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_case_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="4dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_right_container"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintVertical_bias="0.0">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_airpod_case_24"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_case_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_case_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_case_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_case_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_case_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_case_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_case_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_case_battery_icon" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_right_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_case_container"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:contentDescription="@string/pods_dual_right_label"
|
|
||||||
android:src="@drawable/ic_airpod_right_24"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/pod_right_wear_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_right_icon"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_right_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_right_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_right_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_right_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_right_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_right_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/pod_right_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_microphone_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.15"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_bottom"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="top"
|
|
||||||
app:constraint_referenced_ids="last_seen" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/last_seen"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
app:drawableStartCompat="@drawable/ic_baseline_watch_later_12"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:text="3s ago" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -1,146 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
tools:context=".wear.ui.MainActivity">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/device_icon"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/name"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_device_generic_headphones" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/name"
|
|
||||||
style="@style/TextAppearance.Material3.BodyMedium"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/status"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/device_icon"
|
|
||||||
tools:text="Apple AirPods Max" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/status"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="8dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:lines="2"
|
|
||||||
android:maxLines="2"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_top"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/name"
|
|
||||||
tools:text="Music Active, Case Closed" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_top"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="bottom"
|
|
||||||
app:constraint_referenced_ids="status" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_case_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="16dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.20">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/battery_label"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/battery_label" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/charging_label"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/charging_label" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/charging_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:text="@string/pods_charging_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/charging_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/battery_label" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/wear_label"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/wear_label" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/wear_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:text="@string/headset_being_worn_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/wear_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/charging_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_bottom"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="top"
|
|
||||||
app:constraint_referenced_ids="last_seen" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/last_seen"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
app:drawableStartCompat="@drawable/ic_baseline_watch_later_12"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:text="3s ago" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -1,278 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
tools:context=".wear.ui.MainActivity">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/device_icon"
|
|
||||||
android:layout_width="24dp"
|
|
||||||
android:layout_height="24dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/name"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_airpod_both_24" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/name"
|
|
||||||
style="@style/TextAppearance.Material3.BodyMedium"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/status"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/device_icon"
|
|
||||||
tools:text="Apple AirPods Pro" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/status"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="8dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:lines="2"
|
|
||||||
android:maxLines="2"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_top"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/name"
|
|
||||||
tools:text="Music Active, Case Closed" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_top"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="bottom"
|
|
||||||
app:constraint_referenced_ids="status" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_left_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_case_container"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:contentDescription="@string/pods_dual_left_label"
|
|
||||||
android:src="@drawable/ic_airpod_left_24"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_left_wear_icon"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="spread"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_left_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_left_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_left_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/pod_left_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/pod_left_battery_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_left_microphone_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.85"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_left_battery_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_case_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginHorizontal="4dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_right_container"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_left_container"
|
|
||||||
app:layout_constraintVertical_bias="0.0">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_airpod_case_24"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_case_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_case_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_case_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_case_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_case_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_case_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_case_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_case_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_case_battery_icon" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/pod_right_container"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/barrier_bottom"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_case_container"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_top"
|
|
||||||
app:layout_constraintVertical_bias="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:contentDescription="@string/pods_dual_right_label"
|
|
||||||
android:src="@drawable/ic_airpod_right_24"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/pod_right_wear_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_wear_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:src="@drawable/ic_baseline_hearing_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_right_icon"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/pod_right_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_right_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_battery_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_battery_unknown_24"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/pod_right_battery_label"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/pod_right_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_charging_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:src="@drawable/ic_baseline_power_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/pod_right_battery_icon" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/pod_right_battery_label"
|
|
||||||
style="@style/PodInfoItemText"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:text="@string/general_value_not_available_label"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/pod_right_charging_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/pod_right_battery_icon"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_icon" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/pod_right_microphone_icon"
|
|
||||||
style="@style/PodInfoItemIcon"
|
|
||||||
android:layout_marginHorizontal="2dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:src="@drawable/ic_baseline_keyboard_voice_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.15"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/pod_right_battery_label" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
|
||||||
android:id="@+id/barrier_bottom"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:barrierDirection="top"
|
|
||||||
app:constraint_referenced_ids="last_seen" />
|
|
||||||
|
|
||||||
<com.google.android.material.textview.MaterialTextView
|
|
||||||
android:id="@+id/last_seen"
|
|
||||||
style="@style/TextAppearance.Material3.BodySmall"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
app:drawableStartCompat="@drawable/ic_baseline_watch_later_12"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:text="3s ago" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||||
<string name="wear_service_label">CAPod for WearOS</string>
|
|
||||||
<string name="wear_service_description">Details about AirPods</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user