mirror of
https://github.com/flutter/samples.git
synced 2026-05-31 19:39:15 +00:00
add thumbnails to the books example to make memory leaks easier to test (#1353)
* add thumbnails to the books example to make memory leaks easier to test
* also add profile build
* migrate material 3 demo code to avoid warning
* Revert "migrate material 3 demo code to avoid warning"
This reverts commit 7df37d9f65.
* fix lints in various packages
* DoNothingAndStopPropagationIntent const conflicts between stable and beta, add lint ignore for now
This commit is contained in:
@@ -94,6 +94,9 @@ class MainActivity : AppCompatActivity() {
|
||||
book.summary = volumeInfoJson.get("description").asString
|
||||
book.publishDate = volumeInfoJson.get("publishedDate").asString
|
||||
book.pageCount = volumeInfoJson.get("pageCount").asLong
|
||||
val thumbnail = Api.Thumbnail()
|
||||
thumbnail.url = volumeInfoJson.getAsJsonObject("imageLinks").get("thumbnail").asString
|
||||
book.thumbnail = thumbnail
|
||||
books.add(book)
|
||||
} catch (e: Exception) {
|
||||
println("Failed to parse book:")
|
||||
|
||||
Reference in New Issue
Block a user