[go: nahoru, domu]

Skip to content

Commit

Permalink
Updated imagery on preview images.
Browse files Browse the repository at this point in the history
  • Loading branch information
secondsun committed May 10, 2024
1 parent df75d2f commit ae39c55
Show file tree
Hide file tree
Showing 24 changed files with 153 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,68 +115,69 @@ class FakeImageGridDataRepository {
val supportingText: String? = null,
)

companion object {
private val repositories = mutableMapOf<GlanceId, FakeImageGridDataRepository>()

private val demoItems = listOf(
ImageGridItemBackendData(
key = "1",
imageUrl = "https://images.unsplash.com/photo-1444464666168-49d633b86797",
imageContentDescription = "Perched blue and orange bird",
title = "Perched blue and orange bird",
supportingText = "2000 views"
),
ImageGridItemBackendData(
key = "2",
imageUrl = "https://images.unsplash.com/photo-1500349812227-3264f5f54181",
imageContentDescription = "Orange Lacewing butterfly",
title = "Orange Lacewing butterfly",
supportingText = "1900 views"
),
ImageGridItemBackendData(
key = "3",
imageUrl = "https://images.unsplash.com/photo-1578326457399-3b34dbbf23b8",
imageContentDescription = "Zebra",
title = "Zebra in African safari",
supportingText = "7000 views"
),
ImageGridItemBackendData(
key = "4",
imageUrl = "https://images.unsplash.com/photo-1564349683136-77e08dba1ef7",
imageContentDescription = "Panda",
title = "The hungry panda",
supportingText = "1100 views"
),
ImageGridItemBackendData(
key = "5",
imageUrl = "https://images.unsplash.com/photo-1585256262155-c044dc6ad38e",
imageContentDescription = "Humming bird",
title = "Beautiful humming bird",
supportingText = "700 views"
),
ImageGridItemBackendData(
key = "6",
imageUrl = "https://images.unsplash.com/photo-1497752531616-c3afd9760a11",
imageContentDescription = "Racoon",
title = "Racoon on lawn grass",
supportingText = "1500 views"
),
ImageGridItemBackendData(
key = "7",
imageUrl = "https://images.unsplash.com/photo-1425082661705-1834bfd09dca",
imageContentDescription = "Brown hamster",
title = "Brown hamster",
supportingText = "800 views"
),
ImageGridItemBackendData(
key = "8",
imageUrl = "https://images.unsplash.com/reserve/RFDKkrvXSHqBaWMMl4W5_Heavy_company",
imageContentDescription = "Elephant in afternoon sun",
title = "Elephant in afternoon sun",
supportingText = "1200 views"
)
)

companion object {
private val repositories = mutableMapOf<GlanceId, FakeImageGridDataRepository>()

// Courtesy of https://unsplash.com/@iamliam
// 16:9 images
private val demoItems = listOf(
ImageGridItemBackendData(
key = "1",
imageUrl = "https://images.unsplash.com/photo-1531306760863-7fb02a41db12",
imageContentDescription = "Flowers at a wedding reception",
title = "Flowers at a wedding reception",
supportingText = "33,822 views"
),
ImageGridItemBackendData(
key = "2",
imageUrl = "https://images.unsplash.com/photo-1566964423430-3e52903303a5",
imageContentDescription = "An up-close look at a Blushing Bride Protea flower.",
title = "An up-close look at a Blushing Bride Protea flower.",
supportingText = "31,072 views"
),
ImageGridItemBackendData(
key = "3",
imageUrl = "https://images.unsplash.com/photo-1685540466252-8c21e7c37624",
imageContentDescription = "A single water droplet rests in a budding red pansy.",
title = "A single water droplet rests in a budding red pansy.",
supportingText = "193 views"
),
ImageGridItemBackendData(
key = "4",
imageUrl = "https://images.unsplash.com/photo-1582817954171-c3533fffde89",
imageContentDescription = "Blossom, petal, flower",
title = "Blossom, petal, flower",
supportingText = "23,815 views",
),
ImageGridItemBackendData(
key = "5",
imageUrl = "https://images.unsplash.com/photo-1565314912546-0d18918fdc8f",
imageContentDescription = "Green plant, sky and flowers",
title = "Green plant, sky and flowers",
supportingText = "99,467 views"
),
ImageGridItemBackendData(
key = "6",
imageUrl = "https://images.unsplash.com/photo-1671525784444-392a8f8daa3f",
imageContentDescription = "A snow-shoer walking up Strelapass",
title = "A snow-shoer walking up Strelapass",
supportingText = "3,033 views",
),
ImageGridItemBackendData(
key = "7",
imageUrl = "https://images.unsplash.com/photo-1671525737370-1d490286372e",
imageContentDescription = "Davos at sunrise, viewed from Schatzalp",
title = "Davos at sunrise, viewed from Schatzalp",
supportingText = "4,054 views",
),
ImageGridItemBackendData(
key = "8",
imageUrl = "https://images.unsplash.com/photo-1629027272726-2eed15f90e8e",
imageContentDescription = "Nasturtium plants",
title = "Nasturtium plants",
supportingText = "975 views",
)
)
/**
* Returns the repository instance for the given widget represented by [glanceId].
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FakeImageTextListDataRepository {
val showData = Random.nextInt(50) < 5

items = if (showData) {
items.shuffled()
demoItems.take(MAX_ITEMS).shuffled()
} else {
listOf()
}
Expand Down Expand Up @@ -130,56 +130,57 @@ class FakeImageTextListDataRepository {
private const val MAX_ITEMS = 10
private const val TAG = "FITLDR"

private val demoItems = listOf(
DemoDataItem(
key = "1",
supportingImageUrl = "https://images.unsplash.com/photo-1563379926898-05f4575a45d8",
title = "Seafood pasta with shrimps and tomatoes in a pan",
supportingText = "45 min",
),
DemoDataItem(
key = "2",
title = "Oat pancakes with honey and bananas",
supportingText = "15 min",
supportingImageUrl = "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445",
),
DemoDataItem(
key = "3",
title = "The ultimate barbeque platter",
supportingText = "1 hr",
supportingImageUrl = "https://images.unsplash.com/photo-1555939594-58d7cb561ad1"
),
DemoDataItem(
key = "4",
title = "Kale olive salad with onions and pecans",
supportingText = "15 min",
supportingImageUrl = "https://images.unsplash.com/photo-1540189549336-e6e99c3679fe",
),
DemoDataItem(
key = "5",
title = "Indulging strawberry cheesecake",
supportingText = "1 hr",
supportingImageUrl = "https://images.unsplash.com/photo-1565958011703-44f9829ba187",
),
DemoDataItem(
key = "6",
title = "Devil eggs with avacado toast",
supportingText = "30 min",
supportingImageUrl = "https://images.unsplash.com/photo-1482049016688-2d3e1b311543",
),
DemoDataItem(
key = "7",
title = "Salmon and cucumbers!",
supportingText = "1 hr",
supportingImageUrl = "https://images.unsplash.com/photo-1467003909585-2f8a72700288",
),
DemoDataItem(
key = "8",
title = "Salad: the path to a healthier, happier you",
supportingText = "30 min",
supportingImageUrl = "https://images.unsplash.com/photo-1512621776951-a57141f2eefd",
),
)
// Courtesy of https://unsplash.com/@iamliam
private val demoItems = listOf(
DemoDataItem(
key = "1",
title = "Flowers at a wedding reception",
supportingText = "33,822 views",
supportingImageUrl = "https://images.unsplash.com/photo-1531306760863-7fb02a41db12"
),
DemoDataItem(
key = "2",
title = "An up-close look at a Blushing Bride Protea flower.",
supportingText = "31,072 views",
supportingImageUrl = "https://images.unsplash.com/photo-1566964423430-3e52903303a5",
),
DemoDataItem(
key = "3",
supportingImageUrl = "https://images.unsplash.com/photo-1685540466252-8c21e7c37624",
title = "A single water droplet rests in a budding red pansy.",
supportingText = "193 views",
),
DemoDataItem(
key = "4",
title = "Blossom, petal, flower",
supportingText = "23,815 views",
supportingImageUrl = "https://images.unsplash.com/photo-1582817954171-c3533fffde89",
),
DemoDataItem(
key = "5",
title = "Orchids at New York Botanical Garden",
supportingText = "205,481 views",
supportingImageUrl = "https://images.unsplash.com/photo-1565357153781-98bf8686488a",
),
DemoDataItem(
key = "6",
title = "Tabletop composition with flower",
supportingText = "85,060 views",
supportingImageUrl = "https://images.unsplash.com/photo-1591404789216-d03646c78f73",
),
DemoDataItem(
key = "7",
title = "Wild bee on flower",
supportingText = "6,692 views",
supportingImageUrl = "https://images.unsplash.com/photo-1653927050791-5fc981435d12",
),
DemoDataItem(
key = "8",
title = "Flowers on a vine",
supportingText = "31,862 views",
supportingImageUrl = "https://images.unsplash.com/photo-1531307119710-accdb402fe03",
),
)

private val repositories = mutableMapOf<GlanceId, FakeImageTextListDataRepository>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,35 +118,43 @@ class FakeTextWithImageRepository {
val caption: String,
)

val demoItems = listOf(
DemoData(
primary = "Seafood pasta with shrimps and tomatoes in a pan",
secondary = "Savor the taste of the ocean with this simple, one-pan seafood pasta.",
caption = "45 min",
url = "https://images.unsplash.com/photo-1563379926898-05f4575a45d8",
imageContentDescription = "image of seafood pasta",
),
DemoData(
primary = "Ramen noodles with soft boiled egg, shrimp and snow peas.",
secondary = "Slurp up comfort with this simple ramen noodle bowl, brimming with fresh flavors",
caption = "50 min",
url = "https://images.unsplash.com/photo-1569718212165-3a8278d5f624",
imageContentDescription = "image of ramen noodles",
),
DemoData(
primary = "a platter of crackers, strawberries, and fruit",
secondary = "Wine, cheese, crackers and berries. What more could a party ask for?",
caption = "15 min",
url = "https://images.unsplash.com/photo-1496412705862-e0088f16f791",
imageContentDescription = "image of a platter of crackers, strawberries, and fruit",
),
DemoData(
primary = "Salted egg chicken rice for lunch",
secondary = "Treat yourself to this umami-packed lunchtime delight.",
caption = "15 min",
url = "https://images.unsplash.com/photo-1564671165093-20688ff1fffa",
imageContentDescription = "image of a salted egg chicken rice",
// Courtesy of https://unsplash.com/@iamliam
val demoItems = listOf(
DemoData(
primary = "Davos at sunrise, viewed from Schatzalp",
secondary = "Golden light washes over the alpine village of Davos, a breathtaking view unfolding from Schatzalp's vantage point.",
caption = "33,822 views",
url = "https://images.unsplash.com/photo-1671525737370-1d490286372e",
imageContentDescription = "Davos at sunrise, viewed from Schatzalp",
),
DemoData(
primary = "Flowers at a wedding reception",
secondary = "I took this photo at a wedding reception. The flowers were in a vase next to a window",
caption = "33,822 views",
url = "https://images.unsplash.com/photo-1531306760863-7fb02a41db12",
imageContentDescription = "Flowers at a wedding reception",
),
DemoData(
primary = "Blushing Bride",
secondary = "An up-close look at a Blushing Bride Protea flower, native to South Africa",
caption = "31,072 views",
url = "https://images.unsplash.com/photo-1566964423430-3e52903303a5",
imageContentDescription = "Blushing Bride flower",
),
DemoData(
primary = "Winter in Switzerland",
secondary = "A snow-shoer walking up Strelapass on snow lined with deep trails from skiiers",
caption = "15 min",
url = "https://images.unsplash.com/photo-1671525784444-392a8f8daa3f",
imageContentDescription = "A snow-shoer walking up Strelapass on snow lined with deep trails from skiiers",
),
DemoData(
primary = "A single water droplet rests in a budding red pansy.",
secondary = "Secrets held within a drop: A microcosm of beauty in a world of red.",
caption = "193 views",
url = "https://images.unsplash.com/photo-1685540466252-8c21e7c37624",
imageContentDescription = "A single water droplet rests in a budding red pansy.",
)
)
)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/glance_default_loading_layout"
android:previewImage="@drawable/sample_image_text_list"
android:previewImage="@drawable/sample_image_text_list_preview"
android:maxResizeHeight="@dimen/sample_text_with_image_list_widget_max_resize_height"
android:maxResizeWidth="@dimen/sample_text_with_image_list_widget_max_resize_width"
android:targetCellWidth="@integer/sample_text_with_image_list_target_cell_width"
Expand Down

0 comments on commit ae39c55

Please sign in to comment.