From 4968ea4284cbe8d3e959c6f4abffdbed5382a775 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Tue, 24 Sep 2019 00:29:49 -0700 Subject: [PATCH] Introduce 6 sample thumbnail graphics locally and a lesson thumbnails proto (#175) --- .../lesson_thumbnail_graphic_baker.xml | 551 ++++++++++++++++++ ...sson_thumbnail_graphic_child_with_book.xml | 79 +++ ..._thumbnail_graphic_child_with_cupcakes.xml | 171 ++++++ ..._graphic_child_with_fractions_homework.xml | 344 +++++++++++ ...son_thumbnail_graphic_duck_and_chicken.xml | 134 +++++ ...humbnail_graphic_person_with_pie_chart.xml | 100 ++++ model/src/main/proto/thumbnail.proto | 40 ++ 7 files changed, 1419 insertions(+) create mode 100644 app/src/main/res/drawable/lesson_thumbnail_graphic_baker.xml create mode 100644 app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_book.xml create mode 100644 app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_cupcakes.xml create mode 100644 app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_fractions_homework.xml create mode 100644 app/src/main/res/drawable/lesson_thumbnail_graphic_duck_and_chicken.xml create mode 100644 app/src/main/res/drawable/lesson_thumbnail_graphic_person_with_pie_chart.xml create mode 100644 model/src/main/proto/thumbnail.proto diff --git a/app/src/main/res/drawable/lesson_thumbnail_graphic_baker.xml b/app/src/main/res/drawable/lesson_thumbnail_graphic_baker.xml new file mode 100644 index 00000000000..0f1813c6e44 --- /dev/null +++ b/app/src/main/res/drawable/lesson_thumbnail_graphic_baker.xml @@ -0,0 +1,551 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_book.xml b/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_book.xml new file mode 100644 index 00000000000..efdefc0bebc --- /dev/null +++ b/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_book.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_cupcakes.xml b/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_cupcakes.xml new file mode 100644 index 00000000000..48a0fcd37c7 --- /dev/null +++ b/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_cupcakes.xml @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_fractions_homework.xml b/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_fractions_homework.xml new file mode 100644 index 00000000000..e5bd078ac52 --- /dev/null +++ b/app/src/main/res/drawable/lesson_thumbnail_graphic_child_with_fractions_homework.xml @@ -0,0 +1,344 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/lesson_thumbnail_graphic_duck_and_chicken.xml b/app/src/main/res/drawable/lesson_thumbnail_graphic_duck_and_chicken.xml new file mode 100644 index 00000000000..f8a60005128 --- /dev/null +++ b/app/src/main/res/drawable/lesson_thumbnail_graphic_duck_and_chicken.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/lesson_thumbnail_graphic_person_with_pie_chart.xml b/app/src/main/res/drawable/lesson_thumbnail_graphic_person_with_pie_chart.xml new file mode 100644 index 00000000000..48b5b8b553b --- /dev/null +++ b/app/src/main/res/drawable/lesson_thumbnail_graphic_person_with_pie_chart.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/model/src/main/proto/thumbnail.proto b/model/src/main/proto/thumbnail.proto new file mode 100644 index 00000000000..b2acda16257 --- /dev/null +++ b/model/src/main/proto/thumbnail.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package model; + +option java_package = "org.oppia.app.model"; +option java_multiple_files = true; + +// Represents the thumbnail that should be rendered for a lesson. +message LessonThumbnail { + // The graphic corresponding to this thumbnail. + LessonThumbnailGraphic thumbnail_graphic = 1; + + // The background color for this thumbnail, in RGB (no alpha channel). + int32 background_color_rgb = 2; +} + +// Corresponds to different types of thumbnails that may be used by a topic, story, or chapter. These currently only +// correspond to in-app thumbnails, but may later indicate that a lesson has a downloadable thumbnail to use, instead. +enum LessonThumbnailGraphic { + // An unknown thumbnail type. The UI should pick a reasonable default. + LESSON_THUMBNAIL_GRAPHIC_UNSPECIFIED = 0; + + // Corresponds to an in-app image of a baker. + BAKER = 1; + + // Corresponds to an in-app image of a child with a book. + CHILD_WITH_BOOK = 2; + + // Corresponds to an in-app image of a child with cupcakes. + CHILD_WITH_CUPCAKES = 3; + + // Corresponds to an in-app image of a child holding a homework paper with fractions. + CHILD_WITH_FRACTIONS_HOMEWORK = 4; + + // Corresponds to an in-app image of a duck and a chicken. + DUCK_AND_CHICKEN = 5; + + // Corresponds to an in-app image of a person next to a pie chart. + PERSON_WITH_PIE_CHART = 6; +}