From 7dfea78c8778d89655b88de40943f33f5d400b0e Mon Sep 17 00:00:00 2001 From: darken Date: Tue, 13 Sep 2022 21:42:08 +0200 Subject: [PATCH] Simplify WearOS app because this is such a cluster fuck and I've ran out of motivation. --- .../capod/monitor/core/PodDeviceCache.kt | 3 +- app-wear/src/main/AndroidManifest.xml | 17 - .../capod/wear/core/CAPodTileService.kt | 50 -- .../capod/wear/ui/overview/OverviewAdapter.kt | 6 +- .../wear/ui/overview/OverviewFragment.kt | 1 - .../wear/ui/overview/OverviewFragmentVM.kt | 91 +-- .../wear/ui/overview/cards/AppTitleVH.kt | 37 -- .../ui/overview/cards/PermissionCardVH.kt | 9 - .../ui/overview/cards/SettingsButtonVH.kt | 36 -- .../ui/overview/cards/pods/DualPodsCardVH.kt | 18 - .../src/main/res/layout/main_fragment.xml | 4 +- .../res/layout/overview_apptitle_item.xml | 36 -- .../overview_bluetooth_disabled_item.xml | 57 +- .../res/layout/overview_nomaindevice_item.xml | 54 +- .../res/layout/overview_permission_item.xml | 104 ++-- .../res/layout/overview_pods_dual_item.xml | 532 +++++++++--------- .../res/layout/overview_pods_single_item.xml | 256 ++++----- .../res/layout/overview_settings_item.xml | 23 - .../main/res/layout/wear_tile_pods_dual.xml | 278 --------- .../main/res/layout/wear_tile_pods_single.xml | 146 ----- .../src/main/res/layout/wear_tile_preview.xml | 278 --------- app-wear/src/main/res/values/strings.xml | 3 +- 22 files changed, 540 insertions(+), 1499 deletions(-) delete mode 100644 app-wear/src/main/java/eu/darken/capod/wear/core/CAPodTileService.kt delete mode 100644 app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/AppTitleVH.kt delete mode 100644 app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/SettingsButtonVH.kt delete mode 100644 app-wear/src/main/res/layout/overview_apptitle_item.xml delete mode 100644 app-wear/src/main/res/layout/overview_settings_item.xml delete mode 100644 app-wear/src/main/res/layout/wear_tile_pods_dual.xml delete mode 100644 app-wear/src/main/res/layout/wear_tile_pods_single.xml delete mode 100644 app-wear/src/main/res/layout/wear_tile_preview.xml diff --git a/app-common/src/main/java/eu/darken/capod/monitor/core/PodDeviceCache.kt b/app-common/src/main/java/eu/darken/capod/monitor/core/PodDeviceCache.kt index da4269bf..f7975c56 100644 --- a/app-common/src/main/java/eu/darken/capod/monitor/core/PodDeviceCache.kt +++ b/app-common/src/main/java/eu/darken/capod/monitor/core/PodDeviceCache.kt @@ -49,8 +49,9 @@ class PodDeviceCache @Inject constructor( } suspend fun loadMainDevice(): BleScanResult? = withContext(dispatcherProvider.IO) { - log(TAG) { "loadMainDevice()" } + log(TAG, VERBOSE) { "loadMainDevice()" } lock.withLock { + if (!mainDeviceCacheFile.exists()) return@withLock null try { val raw = mainDeviceCacheFile.readText() jsonAdapter.fromJson(raw) diff --git a/app-wear/src/main/AndroidManifest.xml b/app-wear/src/main/AndroidManifest.xml index f1b3083e..28d1698f 100644 --- a/app-wear/src/main/AndroidManifest.xml +++ b/app-wear/src/main/AndroidManifest.xml @@ -54,23 +54,6 @@ - - - - - - - - - \ No newline at end of file diff --git a/app-wear/src/main/java/eu/darken/capod/wear/core/CAPodTileService.kt b/app-wear/src/main/java/eu/darken/capod/wear/core/CAPodTileService.kt deleted file mode 100644 index 873d26f0..00000000 --- a/app-wear/src/main/java/eu/darken/capod/wear/core/CAPodTileService.kt +++ /dev/null @@ -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" - } -} \ No newline at end of file diff --git a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewAdapter.kt b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewAdapter.kt index 7b6ee75a..74cfea64 100644 --- a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewAdapter.kt +++ b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewAdapter.kt @@ -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.mods.DataBinderMod 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.SinglePodsCardVH import javax.inject.Inject @@ -24,8 +26,6 @@ class OverviewAdapter @Inject constructor() : init { 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 DualPodsCardVH.Item }) { DualPodsCardVH(it) }) modules.add(TypedVHCreatorMod({ data[it] is SinglePodsCardVH.Item }) { SinglePodsCardVH(it) }) diff --git a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragment.kt b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragment.kt index f5c537b9..168d5383 100644 --- a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragment.kt +++ b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragment.kt @@ -44,7 +44,6 @@ class OverviewFragment : Fragment3(R.layout.main_fragment) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { ui.list.apply { - isEdgeItemsCenteringEnabled = true layoutManager = LinearLayoutManager(context) this.adapter = overviewAdapter } diff --git a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragmentVM.kt b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragmentVM.kt index bd6f4eff..37b516ec 100644 --- a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragmentVM.kt +++ b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/OverviewFragmentVM.kt @@ -6,18 +6,23 @@ import dagger.hilt.android.lifecycle.HiltViewModel import eu.darken.capod.common.bluetooth.BluetoothManager2 import eu.darken.capod.common.coroutine.DispatcherProvider 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.livedata.SingleLiveEvent -import eu.darken.capod.common.navigation.navVia import eu.darken.capod.common.permissions.Permission import eu.darken.capod.common.uix.ViewModel3 import eu.darken.capod.main.core.GeneralSettings 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.pods.core.DualPodDevice 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.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.SinglePodsCardVH import kotlinx.coroutines.delay @@ -35,6 +40,8 @@ class OverviewFragmentVM @Inject constructor( private val generalSettings: GeneralSettings, debugSettings: DebugSettings, private val bluetoothManager: BluetoothManager2, + private val podDeviceCache: PodDeviceCache, + private val podFactory: PodFactory ) : ViewModel3(dispatcherProvider = dispatcherProvider) { private val updateTicker = channelFlow { @@ -67,59 +74,53 @@ class OverviewFragmentVM @Inject constructor( val listItems: LiveData> = combine( updateTicker, permissionTool.missingPermissions, - pods, debugSettings.isDebugModeEnabled.flow, - generalSettings.showAll.flow, bluetoothManager.isBluetoothEnabled, podMonitor.mainDevice, - ) { _, permissions, pods, isDebugMode, showAll, isBluetoothEnabled, mainPod -> + ) { _, permissions, isDebugMode, isBluetoothEnabled, mainPod -> val items = mutableListOf() - permissions - .map { perm -> - PermissionCardVH.Item( - 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, + if (permissions.isNotEmpty()) { + permissions + .map { perm -> + PermissionCardVH.Item( + permission = perm, + onRequest = { requestPermissionEvent.postValue(it) }, ) - 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( - onClick = { - OverviewFragmentDirections.actionOverviewFragmentToSettingsFragment().navVia(this@OverviewFragmentVM) - } - ).run { items.add(this) } + if (!isBluetoothEnabled) { + items.add(0, BluetoothDisabledVH.Item) + return@combine items + } - 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 } diff --git a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/AppTitleVH.kt b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/AppTitleVH.kt deleted file mode 100644 index e7ad1f63..00000000 --- a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/AppTitleVH.kt +++ /dev/null @@ -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( - R.layout.overview_apptitle_item, - parent - ) { - - override val viewBinding = lazy { - OverviewApptitleItemBinding.bind(itemView) - } - - override val onBindData: OverviewApptitleItemBinding.( - item: Item, - payloads: List - ) -> 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 } - } -} \ No newline at end of file diff --git a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/PermissionCardVH.kt b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/PermissionCardVH.kt index be2345c6..8db86018 100644 --- a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/PermissionCardVH.kt +++ b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/PermissionCardVH.kt @@ -1,10 +1,7 @@ package eu.darken.capod.wear.ui.overview.cards -import android.text.Html -import android.text.method.LinkMovementMethod import android.view.ViewGroup import eu.darken.capod.R -import eu.darken.capod.common.PrivacyPolicy import eu.darken.capod.common.lists.binding import eu.darken.capod.common.lists.differ.DifferItem import eu.darken.capod.common.permissions.Permission @@ -28,12 +25,6 @@ class PermissionCardVH(parent: ViewGroup) : permissionLabel.setText(item.permission.labelRes) permissionDescription.setText(item.permission.descriptionRes) 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("$ppText", 0) - } } data class Item( diff --git a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/SettingsButtonVH.kt b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/SettingsButtonVH.kt deleted file mode 100644 index 196c91d0..00000000 --- a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/SettingsButtonVH.kt +++ /dev/null @@ -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( - R.layout.overview_settings_item, - parent - ) { - - override val viewBinding = lazy { - OverviewSettingsItemBinding.bind(itemView) - } - - override val onBindData: OverviewSettingsItemBinding.( - item: Item, - payloads: List - ) -> 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 } - } -} \ No newline at end of file diff --git a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/pods/DualPodsCardVH.kt b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/pods/DualPodsCardVH.kt index 1b910912..23194004 100644 --- a/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/pods/DualPodsCardVH.kt +++ b/app-wear/src/main/java/eu/darken/capod/wear/ui/overview/cards/pods/DualPodsCardVH.kt @@ -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 device.apply { val sb = StringBuilder() diff --git a/app-wear/src/main/res/layout/main_fragment.xml b/app-wear/src/main/res/layout/main_fragment.xml index c4c217f0..5b6ae034 100644 --- a/app-wear/src/main/res/layout/main_fragment.xml +++ b/app-wear/src/main/res/layout/main_fragment.xml @@ -5,13 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - diff --git a/app-wear/src/main/res/layout/overview_apptitle_item.xml b/app-wear/src/main/res/layout/overview_apptitle_item.xml deleted file mode 100644 index 9be883c4..00000000 --- a/app-wear/src/main/res/layout/overview_apptitle_item.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - diff --git a/app-wear/src/main/res/layout/overview_bluetooth_disabled_item.xml b/app-wear/src/main/res/layout/overview_bluetooth_disabled_item.xml index 964ed9fe..5bf7f0cd 100644 --- a/app-wear/src/main/res/layout/overview_bluetooth_disabled_item.xml +++ b/app-wear/src/main/res/layout/overview_bluetooth_disabled_item.xml @@ -1,37 +1,34 @@ - + android:layout_height="wrap_content" + android:layout_margin="16dp"> - + 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" /> - + - - - - + diff --git a/app-wear/src/main/res/layout/overview_nomaindevice_item.xml b/app-wear/src/main/res/layout/overview_nomaindevice_item.xml index bda1a29c..59c68ec3 100644 --- a/app-wear/src/main/res/layout/overview_nomaindevice_item.xml +++ b/app-wear/src/main/res/layout/overview_nomaindevice_item.xml @@ -1,36 +1,34 @@ - + android:layout_margin="16dp"> - + android:layout_marginTop="32dp" + 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" /> - + - - - - + diff --git a/app-wear/src/main/res/layout/overview_permission_item.xml b/app-wear/src/main/res/layout/overview_permission_item.xml index 522a570e..ceeaf42d 100644 --- a/app-wear/src/main/res/layout/overview_permission_item.xml +++ b/app-wear/src/main/res/layout/overview_permission_item.xml @@ -1,70 +1,56 @@ - + android:layout_margin="16dp"> - + 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" /> - + - + - + - - - - - - + diff --git a/app-wear/src/main/res/layout/overview_pods_dual_item.xml b/app-wear/src/main/res/layout/overview_pods_dual_item.xml index 817d1104..21e5a46f 100644 --- a/app-wear/src/main/res/layout/overview_pods_dual_item.xml +++ b/app-wear/src/main/res/layout/overview_pods_dual_item.xml @@ -1,286 +1,282 @@ - + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_margin="8dp" + tools:context=".wear.ui.MainActivity"> + + + + + + + + + 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"> + app:layout_constraintTop_toTopOf="parent" /> + + + + + + - - + android:layout_marginTop="1dp" + 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" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + app:layout_constraintTop_toBottomOf="@id/pod_left_battery_label" /> + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app-wear/src/main/res/layout/overview_pods_single_item.xml b/app-wear/src/main/res/layout/overview_pods_single_item.xml index 7972f1b2..14fc0c97 100644 --- a/app-wear/src/main/res/layout/overview_pods_single_item.xml +++ b/app-wear/src/main/res/layout/overview_pods_single_item.xml @@ -1,155 +1,147 @@ - + android:layout_height="match_parent" + android:layout_margin="8dp" + tools:context=".wear.ui.MainActivity"> + + + + + + + + + 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"> + app:layout_constraintTop_toTopOf="@id/battery_label" /> - - + + - - - - - - - - - - - - - - - - - - - - + app:layout_constraintTop_toTopOf="@id/charging_label" /> + + + app:layout_constraintTop_toTopOf="@id/wear_label" /> + + - \ No newline at end of file + + + + + + diff --git a/app-wear/src/main/res/layout/overview_settings_item.xml b/app-wear/src/main/res/layout/overview_settings_item.xml deleted file mode 100644 index e6eef54a..00000000 --- a/app-wear/src/main/res/layout/overview_settings_item.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - diff --git a/app-wear/src/main/res/layout/wear_tile_pods_dual.xml b/app-wear/src/main/res/layout/wear_tile_pods_dual.xml deleted file mode 100644 index 8160f0f6..00000000 --- a/app-wear/src/main/res/layout/wear_tile_pods_dual.xml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app-wear/src/main/res/layout/wear_tile_pods_single.xml b/app-wear/src/main/res/layout/wear_tile_pods_single.xml deleted file mode 100644 index 3340ac4e..00000000 --- a/app-wear/src/main/res/layout/wear_tile_pods_single.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app-wear/src/main/res/layout/wear_tile_preview.xml b/app-wear/src/main/res/layout/wear_tile_preview.xml deleted file mode 100644 index 8160f0f6..00000000 --- a/app-wear/src/main/res/layout/wear_tile_preview.xml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app-wear/src/main/res/values/strings.xml b/app-wear/src/main/res/values/strings.xml index eab66534..d5dac5f6 100644 --- a/app-wear/src/main/res/values/strings.xml +++ b/app-wear/src/main/res/values/strings.xml @@ -1,4 +1,3 @@ - CAPod for WearOS - Details about AirPods + \ No newline at end of file