-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add locked lesson view, modify completed lesson view * add borders, not started chapter view, recycler multi adapter * add divider item decoration * commit before checkout -- all design modified * add divider item decoration grey color * modify chapter recycler items to have 0 margins * remove unused lines * add in-progress chapter view item * use frame layout to make dotted line thinner * lint * remove unused resources and code analysis * lint * rename file to more describing name * add tests and correct some errors * suggested changes + fix some problems * rename resources * lint * lint * add missing eof * add private identifier to enum * remove 0dp margin * commit requested changes * add framelayout to sw600dp-land for tablets + lint fix for file * rename resources * lint * switch to constraint layout * remove the "period sign" in chapter index. * add field to topicsummary proto, and complete the func for opening chapter list by default * lint * update test * update logic * merge with develop and fix minor bug * these two tests together validate that chapter list is expanded by default * lint * ci fail check * nits * add suggested changes
- Loading branch information
1 parent
91014af
commit e91de5d
Showing
20 changed files
with
597 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/src/main/res/drawable/chapter_dark_green_bg_with_bright_green_border.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<stroke | ||
android:width="4dp" | ||
android:color="@color/color_def_bright_green" /> | ||
<solid android:color="@color/color_def_oppia_green" /> | ||
</shape> |
6 changes: 6 additions & 0 deletions
6
app/src/main/res/drawable/chapter_white_bg_with_bright_green_border.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<stroke android:color="@color/color_def_bright_green" android:width="4dp"/> | ||
<solid android:color="@color/color_def_white"/> | ||
</shape> |
6 changes: 6 additions & 0 deletions
6
app/src/main/res/drawable/grey_recycler_view_item_decoration_divider.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/color_def_accessible_light_grey_2" /> | ||
<size android:height="1dp" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="80dp" | ||
android:height="80dp" | ||
android:tint="#FFFFFF" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path | ||
android:fillColor="#FFFFFF" | ||
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z" /> | ||
<vector android:autoMirrored="true" android:height="24dp" | ||
android:tint="#FFFFFF" android:viewportHeight="24" | ||
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FFFFFF" android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
app/src/main/res/layout/lessons_completed_chapter_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<data> | ||
|
||
<import type="android.view.View" /> | ||
|
||
<import type="org.oppia.android.app.model.ChapterPlayState" /> | ||
|
||
<variable | ||
name="viewModel" | ||
type="org.oppia.android.app.topic.lessons.ChapterSummaryViewModel" /> | ||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/lessons_completed_chapter_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:onClick="@{() -> viewModel.onClick(viewModel.explorationId)}" | ||
android:orientation="vertical"> | ||
|
||
<TextView | ||
android:id="@+id/chapter_index" | ||
android:layout_width="wrap_content" | ||
android:layout_height="match_parent" | ||
android:background="@color/color_def_oppia_green" | ||
android:fontFamily="sans-serif" | ||
android:gravity="center" | ||
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}" | ||
android:minWidth="60dp" | ||
android:minHeight="48dp" | ||
android:paddingStart="8dp" | ||
android:paddingTop="12dp" | ||
android:paddingEnd="8dp" | ||
android:paddingBottom="12dp" | ||
android:text="@{viewModel.computePlayChapterIndexText()}" | ||
android:textColor="@color/color_def_white" | ||
android:textSize="20sp" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/chapter_name" | ||
style="@style/TextViewStart" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
android:background="@color/color_def_light_green" | ||
android:fontFamily="sans-serif" | ||
android:gravity="center|start" | ||
android:importantForAccessibility="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? View.IMPORTANT_FOR_ACCESSIBILITY_YES : View.IMPORTANT_FOR_ACCESSIBILITY_NO}" | ||
android:minHeight="48dp" | ||
android:paddingStart="12dp" | ||
android:paddingEnd="12dp" | ||
android:text="@{viewModel.chapterTitle}" | ||
android:textColor="@{viewModel.chapterPlayState != ChapterPlayState.NOT_PLAYABLE_MISSING_PREREQUISITES ? @color/oppia_primary_text : @color/oppia_primary_text_30}" | ||
android:textSize="14sp" | ||
app:layout_constraintBottom_toTopOf="@id/divider" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/chapter_index" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<View | ||
android:id="@+id/divider" | ||
android:layout_width="match_parent" | ||
android:layout_height="1dp" | ||
android:background="@drawable/grey_recycler_view_item_decoration_divider" | ||
app:layout_constraintBottom_toBottomOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |
Oops, something went wrong.