Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add sampledata to render layout previews
  • Loading branch information
etonotieno committed Oct 26, 2019
commit f0d43243807ecf97b7dd0725dfc922ac0c60af9d
82 changes: 82 additions & 0 deletions Owl/app/sampledata/courses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"data": [
{
"name": "Basic Blocks and Woodturning",
"step": "1 / 7",
"steps": "7",
"subject": "Arts & Crafts"
},
{
"name": "An Introduction To Oil Painting On Canvas",
"step": "1 / 12",
"steps": "12",
"subject": "Painting"
},
{
"name": "Understanding the Composition of Modern Cities",
"step": "1 / 18",
"steps": "18",
"subject": "Architecture"
},
{
"name": "Learning The Basics of Brand Identity",
"step": "1 / 22",
"steps": "22",
"subject": "Design"
},
{
"name": "Wooden Materials and Sculpting Machinery",
"step": "1 / 19",
"steps": "19",
"subject": "Arts & Crafts"
},
{
"name": "Advanced Potter's Wheel",
"step": "1 / 14",
"steps": "14",
"subject": "Arts & Crafts"
},
{
"name": "Advanced Abstract Shapes & 3D Printing",
"step": "1 / 17",
"steps": "17",
"subject": "Arts & Crafts"
},
{
"name": "Beginning Portraiture",
"step": "1 / 22",
"steps": "22",
"subject": "Photography"
},
{
"name": "Intermediate Knife Skills",
"step": "1 / 14",
"steps": "14",
"subject": "Culinary"
},
{
"name": "Pattern Making for Beginners",
"step": "1 / 7",
"steps": "7",
"subject": "Fashion"
},
{
"name": "Location Lighting for Beginners",
"step": "1 / 6",
"steps": "6",
"subject": "Photography"
},
{
"name": "Cinematography & Lighting",
"step": "1 / 4",
"steps": "4",
"subject": "Film"
},
{
"name": "Monuments, Buildings & Other Structures",
"step": "1 / 4",
"steps": "4",
"subject": "Photography"
}
]
}
49 changes: 49 additions & 0 deletions Owl/app/sampledata/lessons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"data": [
{
"title": "An introduction to the Landscape",
"formattedStepNumber": "01",
"length": "4:14"
},
{
"title": "Movement and Expression",
"formattedStepNumber": "02",
"length": "7:28"
},
{
"title": "Composition and the Urban Canvas",
"formattedStepNumber": "03",
"length": "3:43"
},
{
"title": "Lighting Techniques and Aesthetics",
"formattedStepNumber": "04",
"length": "4:45"
},
{
"title": "Special Effects",
"formattedStepNumber": "05",
"length": "6:19"
},
{
"title": "Techniques with Structures",
"formattedStepNumber": "06",
"length": "9:41"
},
{
"title": "Deep Focus Using a Camera Dolly",
"formattedStepNumber": "07",
"length": "4:43"
},
{
"title": "Point of View Shots with Structures",
"formattedStepNumber": "08",
"length": "9:41"
},
{
"title": "Photojournalism: Street Art",
"formattedStepNumber": "09",
"length": "9:41"
}
]
}
40 changes: 40 additions & 0 deletions Owl/app/sampledata/steps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"data": [
{
"title": "Step 1",
"body": "@string/step_0"
},
{
"title": "Step 2",
"body": "@string/step_1"
},
{
"title": "Step 3",
"body": "@string/step_2"
},
{
"title": "Step 4",
"body": "@string/step_0"
},
{
"title": "Step 5",
"body": "@string/step_1"
},
{
"title": "Step 6",
"body": "@string/step_2"
},
{
"title": "Step 7",
"body": "@string/step_0"
},
{
"title": "Step 8",
"body": "@string/step_1"
},
{
"title": "Step 9",
"body": "@string/step_2"
}
]
}
60 changes: 60 additions & 0 deletions Owl/app/sampledata/topics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"data": [
{
"name": "Architecture",
"courses": "58"
},
{
"name": "Arts & Crafts",
"courses": "121"
},
{
"name": "Business",
"courses": "78"
},
{
"name": "Culinary",
"courses": "118"
},
{
"name": "Design",
"courses": "423"
},
{
"name": "Fashion",
"courses": "92"
},
{
"name": "Film",
"courses": "165"
},
{
"name": "Gaming",
"courses": "164"
},
{
"name": "Illustration",
"courses": "326"
},
{
"name": "Lifestyle",
"courses": "305"
},
{
"name": "Music",
"courses": "212"
},
{
"name": "Painting",
"courses": "172"
},
{
"name": "Photography",
"courses": "321"
},
{
"name": "Technology",
"courses": "118"
}
]
}
6 changes: 4 additions & 2 deletions Owl/app/src/main/res/layout/course_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
android:lines="2"
android:ellipsize="end"
android:text="@{course.name}"
android:textAppearance="?attr/textAppearanceSubtitle1"/>
android:textAppearance="?attr/textAppearanceSubtitle1"
tools:text="@sample/courses.json/data/name"/>

<ImageView
android:id="@+id/course_icon"
Expand All @@ -107,7 +108,8 @@
android:paddingVertical="@dimen/grid_2"
android:textColor="?attr/colorPrimary"
android:textAppearance="?attr/textAppearanceCaption"
android:text="@{@string/course_steps(course.step, course.steps)}"/>
android:text="@{@string/course_steps(course.step, course.steps)}"
tools:text="@sample/courses.json/data/step"/>

<ImageView
android:id="@+id/course_instructor"
Expand Down
9 changes: 6 additions & 3 deletions Owl/app/src/main/res/layout/featured_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
android:text="@{course.subject}"
android:textColor="?attr/colorPrimary"
android:textAppearance="?attr/textAppearanceOverline"
android:textAllCaps="true"/>
android:textAllCaps="true"
tools:text="@sample/courses.json/data/subject"/>

<TextView
android:id="@+id/course_name"
Expand All @@ -98,7 +99,8 @@
android:paddingHorizontal="@dimen/grid_2"
android:gravity="center"
android:text="@{course.name}"
android:textAppearance="?attr/textAppearanceSubtitle1"/>
android:textAppearance="?attr/textAppearanceSubtitle1"
tools:text="@sample/courses.json/data/name"/>

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
Expand Down Expand Up @@ -128,7 +130,8 @@
android:paddingStart="@dimen/grid_0_5"
android:textColor="?attr/colorPrimary"
android:textAppearance="?attr/textAppearanceSubtitle2"
android:text="@{String.valueOf(course.steps)}"/>
android:text="@{String.valueOf(course.steps)}"
tools:text="@sample/courses.json/data/steps"/>

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
3 changes: 2 additions & 1 deletion Owl/app/src/main/res/layout/fragment_featured.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
app:spanCount="@integer/featured_grid_columns"
app:hasFixedSize="@{true}"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"/>
android:scrollbars="vertical"
tools:listitem="@layout/featured_item"/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

Expand Down
9 changes: 6 additions & 3 deletions Owl/app/src/main/res/layout/fragment_learn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@
android:paddingHorizontal="@dimen/grid_2"
android:gravity="center"
android:text="@{course.name}"
android:textAppearance="?attr/textAppearanceHeadline4"/>
android:textAppearance="?attr/textAppearanceHeadline4"
tools:text="@sample/courses.json/data/name"/>

<TextView
android:id="@+id/description"
Expand Down Expand Up @@ -207,7 +208,8 @@
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:hasFixedSize="@{true}"
android:theme="@style/ThemeOverlay.Owl.Blue"/>
android:theme="@style/ThemeOverlay.Owl.Blue"
tools:listitem="@layout/course_item"/>

</androidx.constraintlayout.widget.ConstraintLayout>

Expand All @@ -217,7 +219,8 @@
android:id="@+id/lessons_sheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.materialstudies.owl.ui.lessons.LessonsSheetFragment"/>
android:name="com.materialstudies.owl.ui.lessons.LessonsSheetFragment"
tools:layout="@layout/fragment_lessons_sheet" />

</FrameLayout>

Expand Down
6 changes: 4 additions & 2 deletions Owl/app/src/main/res/layout/fragment_lesson.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
android:paddingBottom="?attr/actionBarSize"
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:hasFixedSize="@{true}"/>
app:hasFixedSize="@{true}"
tools:listitem="@layout/step_item"/>

<SeekBar
android:id="@+id/seek"
Expand All @@ -113,7 +114,8 @@
android:id="@+id/lessons_sheet"
android:name="com.materialstudies.owl.ui.lessons.LessonsSheetFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
tools:layout="@layout/fragment_lessons_sheet" />

</FrameLayout>

Expand Down
6 changes: 4 additions & 2 deletions Owl/app/src/main/res/layout/fragment_lessons_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
android:lines="1"
android:alpha="0"
android:textAppearance="?attr/textAppearanceSubtitle1"
android:text="@{course.name}"/>
android:text="@{course.name}"
tools:text="@sample/courses.json/data/name"/>

<ImageView
android:id="@+id/collapse_playlist"
Expand Down Expand Up @@ -111,7 +112,8 @@
android:clipToPadding="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:hasFixedSize="@{true}"
android:alpha="0"/>
android:alpha="0"
tools:listitem="@layout/lesson_item"/>

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
3 changes: 2 additions & 1 deletion Owl/app/src/main/res/layout/fragment_my_courses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:hasFixedSize="@{true}"
android:scrollbars="vertical"/>
android:scrollbars="vertical"
tools:listitem="@layout/course_item"/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

Expand Down
3 changes: 2 additions & 1 deletion Owl/app/src/main/res/layout/fragment_onboarding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
app:spanCount="@integer/onboarding_topics_rows"
app:reverseLayout="true"
app:hasFixedSize="@{true}"/>
app:hasFixedSize="@{true}"
tools:listitem="@layout/onboarding_topic_item"/>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
Expand Down
3 changes: 2 additions & 1 deletion Owl/app/src/main/res/layout/fragment_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:hasFixedSize="@{true}"
android:scrollbars="vertical"/>
android:scrollbars="vertical"
tools:listitem="@layout/search_item"/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>

Expand Down
Loading