Skip to content

Commit 1ab9de2

Browse files
authored
Merge pull request #470 from c5inco/ui-polish
[UI Polish] Adjusted spacing based on design spec
2 parents 2388d4e + 93c01ad commit 1ab9de2

File tree

5 files changed

+12
-7
lines changed
  • core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui
  • feature

5 files changed

+12
-7
lines changed

core/ui/src/main/java/com/google/samples/apps/nowinandroid/core/ui/NewsFeed.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import android.net.Uri
2121
import androidx.annotation.ColorInt
2222
import androidx.browser.customtabs.CustomTabColorSchemeParams
2323
import androidx.browser.customtabs.CustomTabsIntent
24+
import androidx.compose.foundation.layout.padding
2425
import androidx.compose.foundation.lazy.LazyListScope
2526
import androidx.compose.foundation.lazy.grid.GridCells
2627
import androidx.compose.foundation.lazy.grid.LazyGridScope
@@ -31,6 +32,7 @@ import androidx.compose.runtime.Composable
3132
import androidx.compose.runtime.getValue
3233
import androidx.compose.runtime.mutableStateOf
3334
import androidx.compose.runtime.remember
35+
import androidx.compose.ui.Modifier
3436
import androidx.compose.ui.graphics.toArgb
3537
import androidx.compose.ui.platform.LocalContext
3638
import androidx.compose.ui.tooling.preview.Devices
@@ -78,6 +80,7 @@ fun LazyGridScope.newsFeed(
7880
)
7981
},
8082
onTopicClick = onTopicClick,
83+
modifier = Modifier.padding(horizontal = 8.dp),
8184
)
8285
}
8386
}

feature/bookmarks/src/main/java/com/google/samples/apps/nowinandroid/feature/bookmarks/BookmarksScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private fun EmptyState(modifier: Modifier = Modifier) {
159159
contentDescription = null,
160160
)
161161

162-
Spacer(modifier = Modifier.height(16.dp))
162+
Spacer(modifier = Modifier.height(48.dp))
163163

164164
Text(
165165
text = stringResource(id = R.string.bookmarks_empty_error),

feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import androidx.compose.foundation.layout.padding
3838
import androidx.compose.foundation.layout.safeDrawing
3939
import androidx.compose.foundation.layout.size
4040
import androidx.compose.foundation.layout.width
41+
import androidx.compose.foundation.layout.widthIn
4142
import androidx.compose.foundation.layout.windowInsetsBottomHeight
4243
import androidx.compose.foundation.lazy.LazyListScope
4344
import androidx.compose.foundation.lazy.grid.GridCells
@@ -247,7 +248,7 @@ private fun LazyGridScope.onboarding(
247248
text = stringResource(R.string.onboarding_guidance_subtitle),
248249
modifier = Modifier
249250
.fillMaxWidth()
250-
.padding(top = 8.dp, start = 16.dp, end = 16.dp),
251+
.padding(top = 8.dp, start = 24.dp, end = 24.dp),
251252
textAlign = TextAlign.Center,
252253
style = MaterialTheme.typography.bodyMedium,
253254
)
@@ -265,8 +266,9 @@ private fun LazyGridScope.onboarding(
265266
onClick = saveFollowedTopics,
266267
enabled = onboardingUiState.isDismissable,
267268
modifier = Modifier
268-
.padding(horizontal = 40.dp)
269-
.width(364.dp),
269+
.padding(horizontal = 24.dp)
270+
.widthIn(364.dp)
271+
.fillMaxWidth(),
270272
) {
271273
Text(
272274
text = stringResource(R.string.done),

feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/InterestsItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fun InterestsItem(
6565
.padding(vertical = itemSeparation),
6666
) {
6767
InterestsIcon(topicImageUrl, iconModifier.size(64.dp))
68-
Spacer(modifier = Modifier.width(16.dp))
68+
Spacer(modifier = Modifier.width(24.dp))
6969
InterestContent(name, description)
7070
}
7171
NiaIconToggleButton(

feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests/TabContent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ fun TopicsTabContent(
3838
) {
3939
LazyColumn(
4040
modifier = modifier
41-
.padding(horizontal = 16.dp)
41+
.padding(horizontal = 24.dp)
4242
.testTag("interests:topics"),
43-
contentPadding = PaddingValues(top = 8.dp),
43+
contentPadding = PaddingValues(vertical = 16.dp),
4444
) {
4545
topics.forEach { followableTopic ->
4646
val topicId = followableTopic.topic.id

0 commit comments

Comments
 (0)