-
Notifications
You must be signed in to change notification settings - Fork 502
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Implemented low-fi UI for "Hints&Solution" for portrait mode - tablet (
#1413) Co-authored-by: Ben Henning <henning.benmax@gmail.com>
- Loading branch information
1 parent
60c341c
commit 912cc26
Showing
2 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
app/src/main/res/layout-sw600dp-land/ongoing_topic_item.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,93 @@ | ||
<?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.app.model.Topic" /> | ||
|
||
<variable | ||
name="viewModel" | ||
type="org.oppia.app.ongoingtopiclist.OngoingTopicItemViewModel" /> | ||
</data> | ||
|
||
<com.google.android.material.card.MaterialCardView | ||
android:id="@+id/topic_container" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="16dp" | ||
android:layout_marginTop="12dp" | ||
android:layout_marginEnd="16dp" | ||
android:layout_marginBottom="12dp" | ||
app:cardElevation="4dp" | ||
app:cardCornerRadius="4dp"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:clickable="true" | ||
android:focusable="true"> | ||
|
||
<ImageView | ||
android:id="@+id/topic_thumbnail" | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
android:background="@color/topicThumbnailBackground" | ||
android:importantForAccessibility="no" | ||
android:scaleType="centerInside" | ||
android:src="@{viewModel.topic.topicThumbnail.thumbnailGraphic}" | ||
app:layout_constraintDimensionRatio="4:3" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:id="@+id/constraintLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:background="@color/topicTitleBackground" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/topic_thumbnail"> | ||
|
||
<TextView | ||
android:id="@+id/topic_name_text_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginTop="8dp" | ||
android:layout_marginEnd="8dp" | ||
android:ellipsize="end" | ||
android:fontFamily="sans-serif" | ||
android:gravity="top" | ||
android:maxLines="2" | ||
android:minLines="2" | ||
android:text="@{viewModel.topic.name}" | ||
android:textColor="@color/white" | ||
android:textSize="14sp" | ||
android:textStyle="bold" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/story_count_text_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="8dp" | ||
android:layout_marginTop="4dp" | ||
android:layout_marginEnd="8dp" | ||
android:fontFamily="sans-serif-light" | ||
android:paddingBottom="12dp" | ||
android:text="@{@plurals/lesson_count(viewModel.topic.storyCount, viewModel.topic.storyCount)}" | ||
android:textColor="@color/white_80" | ||
android:textSize="14sp" | ||
android:textStyle="italic" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/topic_name_text_view" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</com.google.android.material.card.MaterialCardView> | ||
</layout> |
70 changes: 70 additions & 0 deletions
70
app/src/main/res/layout-sw600dp-land/ongoing_topic_list_fragment.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> | ||
|
||
<variable | ||
name="viewModel" | ||
type="org.oppia.app.ongoingtopiclist.OngoingTopicListViewModel" /> | ||
</data> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:background="@color/white"> | ||
|
||
<com.google.android.material.appbar.AppBarLayout | ||
android:id="@+id/ongoing_topic_list_app_bar_layout" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<androidx.appcompat.widget.Toolbar | ||
android:id="@+id/ongoing_topic_list_toolbar" | ||
android:layout_width="match_parent" | ||
android:layout_height="?attr/actionBarSize" | ||
android:background="?attr/colorPrimary" | ||
android:fontFamily="sans-serif" | ||
android:minHeight="?attr/actionBarSize" | ||
android:textSize="20sp" | ||
app:navigationContentDescription="@string/go_to_previous_page" | ||
app:navigationIcon="?attr/homeAsUpIndicator" | ||
app:title="@string/topics_in_progress" | ||
app:titleTextAppearance="@style/ToolbarTextAppearance" | ||
app:titleTextColor="@color/white" /> | ||
</com.google.android.material.appbar.AppBarLayout> | ||
|
||
<FrameLayout | ||
android:layout_width="0dp" | ||
android:layout_height="0dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/ongoing_topic_list_app_bar_layout"> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/ongoing_topic_list" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:clipToPadding="false" | ||
android:overScrollMode="never" | ||
android:paddingStart="56dp" | ||
android:paddingEnd="56dp" | ||
android:paddingTop="28dp" | ||
android:paddingBottom="88dp" | ||
android:scrollbars="none" | ||
android:tag="@string/ongoing_recycler_view_tag" | ||
app:data="@{viewModel.ongoingTopicListViewModelLiveData}" /> | ||
|
||
<View | ||
android:id="@+id/ongoing_topic_list_shadow_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="6dp" | ||
android:background="@drawable/toolbar_drop_shadow" /> | ||
</FrameLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</layout> |