Skip to content

Commit

Permalink
Set Wear theme background color to black (#3572)
Browse files Browse the repository at this point in the history
* Set Wear theme background color to black

* Remove background color in individual screens
  • Loading branch information
jpelgrom committed Jun 19, 2023
1 parent e8fae5d commit 5d1801c
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package io.homeassistant.companion.android.onboarding.phoneinstall

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
Expand Down Expand Up @@ -41,50 +39,48 @@ fun PhoneInstallView(
},
timeText = { TimeText(scalingLazyListState = scrollState) }
) {
Box(modifier = Modifier.background(MaterialTheme.colors.background)) {
ThemeLazyColumn(state = scrollState) {
item {
Image(
painter = painterResource(R.drawable.app_icon),
contentDescription = null,
modifier = Modifier.size(48.dp)
)
}
item {
Text(
text = stringResource(commonR.string.install_phone_to_continue),
style = MaterialTheme.typography.title3,
textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth().padding(vertical = 16.dp)
)
}
item {
Button(
onClick = onInstall,
modifier = Modifier.fillMaxWidth()
) {
Text(stringResource(commonR.string.install))
}
ThemeLazyColumn(state = scrollState) {
item {
Image(
painter = painterResource(R.drawable.app_icon),
contentDescription = null,
modifier = Modifier.size(48.dp)
)
}
item {
Text(
text = stringResource(commonR.string.install_phone_to_continue),
style = MaterialTheme.typography.title3,
textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth().padding(vertical = 16.dp)
)
}
item {
Button(
onClick = onInstall,
modifier = Modifier.fillMaxWidth()
) {
Text(stringResource(commonR.string.install))
}
item {
Button(
onClick = onRefresh,
modifier = Modifier.fillMaxWidth(),
colors = ButtonDefaults.secondaryButtonColors()
) {
Text(stringResource(commonR.string.refresh))
}
}
item {
Button(
onClick = onRefresh,
modifier = Modifier.fillMaxWidth(),
colors = ButtonDefaults.secondaryButtonColors()
) {
Text(stringResource(commonR.string.refresh))
}
item {
Button(
onClick = onAdvanced,
modifier = Modifier
.fillMaxWidth()
.padding(top = 16.dp),
colors = ButtonDefaults.secondaryButtonColors()
) {
Text(stringResource(commonR.string.advanced))
}
}
item {
Button(
onClick = onAdvanced,
modifier = Modifier
.fillMaxWidth()
.padding(top = 16.dp),
colors = ButtonDefaults.secondaryButtonColors()
) {
Text(stringResource(commonR.string.advanced))
}
}
}
Expand Down
1 change: 0 additions & 1 deletion wear/src/main/res/layout/activity_integration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:padding="@dimen/box_inset_layout_padding"
tools:context=".onboarding.integration.MobileAppIntegrationActivity"
tools:deviceIds="wear">
Expand Down
1 change: 0 additions & 1 deletion wear/src/main/res/layout/activity_manual_setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:padding="@dimen/box_inset_layout_padding"
tools:deviceIds="wear">

Expand Down
1 change: 0 additions & 1 deletion wear/src/main/res/layout/activity_onboarding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="@android:color/black"
android:layout_height="match_parent">

<androidx.wear.widget.WearableRecyclerView
Expand Down
3 changes: 1 addition & 2 deletions wear/src/main/res/layout/view_loading.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="@android:color/black">
android:gravity="center">

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/loading_text"
Expand Down
2 changes: 1 addition & 1 deletion wear/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<color name="colorDialogBackground">#111111</color>
<color name="colorDialogMessage">@android:color/white</color>
<color name="colorDialogTitle">@android:color/white</color>
<color name="colorActivityBackground">#1c1c1c</color>
<color name="colorActivityBackground">@android:color/black</color>
<color name="colorPrimary">#03A9F4</color>
<color name="colorPrimaryDark">#111111</color>
<color name="colorAccent">#03A9F4</color>
Expand Down

0 comments on commit 5d1801c

Please sign in to comment.