Skip to content

Commit

Permalink
theme
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLichtenstein committed Sep 23, 2023
1 parent be0fda1 commit 54906b1
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ Anyone keen to dive into modern Android development—Dogiz is your guide!

## Screenshots

![breeds](./art/screenshots/breeds.png)
![images](./art/screenshots/images.png)
![favorites](./art/screenshots/favorites.png)
![screenshots](./art/screenshots.png)

## 🧱 Clean Architecture in Android with Kotlin

Expand Down
Binary file added art/screenshots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed art/screenshots/breeds.png
Binary file not shown.
Binary file removed art/screenshots/favorites.png
Binary file not shown.
Binary file removed art/screenshots/images.png
Binary file not shown.
13 changes: 7 additions & 6 deletions ui/src/main/java/com/rubylichtenstein/ui/breeds/BreedsScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ package com.rubylichtenstein.ui.breeds

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.Card
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LargeTopAppBar
import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
Expand Down Expand Up @@ -57,13 +57,12 @@ fun BreedsScreen(
Scaffold(
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
CenterAlignedTopAppBar(
LargeTopAppBar(
title = {
Text(
"Dogiz",
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.headlineMedium,
)
},
scrollBehavior = scrollBehavior
Expand All @@ -83,7 +82,9 @@ fun BreedsScreen(

@Composable
fun BreedList(breeds: List<BreedEntity>, onItemClick: (BreedEntity) -> Unit) {
LazyColumn {
LazyColumn(
contentPadding = PaddingValues(horizontal = 16.dp, vertical = 8.dp),
) {
items(breeds) { breed ->
BreedListItem(breed = breed, onClick = { onItemClick(breed) })
}
Expand All @@ -94,7 +95,7 @@ fun BreedList(breeds: List<BreedEntity>, onItemClick: (BreedEntity) -> Unit) {
fun BreedListItem(breed: BreedEntity, onClick: () -> Unit) {
Card(
modifier = Modifier
.padding(horizontal = 16.dp, vertical = 4.dp)
.padding(bottom = 4.dp)
) {
ListItem(
headlineContent = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private fun BreedFilter(
Row(
modifier = Modifier
.horizontalScroll(rememberScrollState())
.padding(top = 8.dp, start = 16.dp, end = 16.dp, bottom = 8.dp)
.padding(top = 0.dp, start = 16.dp, end = 16.dp, bottom = 0.dp)
) {
breeds.forEach { breed ->
FilterChip(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fun DogImagesGrid(
) {
LazyVerticalGrid(
columns = GridCells.Fixed(2),
contentPadding = PaddingValues(horizontal = 16.dp, vertical = 4.dp),
contentPadding = PaddingValues(horizontal = 16.dp, vertical = 8.dp),
verticalArrangement = Arrangement.spacedBy(16.dp),
horizontalArrangement = Arrangement.spacedBy(16.dp)
) {
Expand Down

0 comments on commit 54906b1

Please sign in to comment.