Skip to content

Commit

Permalink
Fix part #141: Hi-Fi Topic overview tab fragment (#342)
Browse files Browse the repository at this point in the history
* Update topic_overview_fragment.xml

* Update topic_overview_fragment.xml

* Update topic_overview_fragment.xml

* Update ic_available_offline_primary_24dp.xml

* Update colors.xml

* Update ic_available_offline_primary_24dp.xml

* Update topic_overview_fragment.xml
  • Loading branch information
veena14cs authored Nov 22, 2019
1 parent dfbd4ba commit 078afb1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="200" android:viewportWidth="200"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF008577" android:pathData="M100,0.05a100,100 0,1 0,100 100A100,100 0,0 0,100 0.05ZM150,160.05h-100L50,140.05h100ZM83,120.05 L50,87.05 64,73.05 83,92.05 136,39.05 150,53.05Z"/>
<path android:fillColor="#00645C" android:pathData="M100,0.05a100,100 0,1 0,100 100A100,100 0,0 0,100 0.05ZM150,160.05h-100L50,140.05h100ZM83,120.05 L50,87.05 64,73.05 83,92.05 136,39.05 150,53.05Z"/>
</vector>
78 changes: 43 additions & 35 deletions app/src/main/res/layout/topic_overview_fragment.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?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">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<data>

Expand All @@ -22,94 +23,99 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="24dp">

<FrameLayout
android:id="@+id/topic_thumbnail_frame_layout"
<ImageView
android:id="@+id/topic_thumbnail_image_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:src="@{viewModel.topic.topicThumbnail.thumbnailGraphic}"
app:layout_constraintDimensionRatio="8:5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintTop_toTopOf="parent"
app:rectangleDrawableWithColor="@{viewModel.topic.topicThumbnail.backgroundColorRgb}" />

<ImageView
android:id="@+id/topic_thumbnail_image_view"
android:layout_width="match_parent"
android:layout_height="200dp"
app:rectangleDrawableWithColor="@{viewModel.topic.topicThumbnail.backgroundColorRgb}"
android:src="@{viewModel.topic.topicThumbnail.thumbnailGraphic}" />

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/thumbnail_gradient" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@drawable/thumbnail_gradient"
app:layout_constraintDimensionRatio="8:5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/topic_name_text_view"
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="24dp"
android:layout_gravity="bottom"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="8dp"
android:fontFamily="sans-serif"
android:gravity="start"
android:text="@{viewModel.topic.name}"
android:textColor="@color/oppiaPrimaryText"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/topic_thumbnail_frame_layout" />
app:layout_constraintBottom_toBottomOf="@+id/topic_thumbnail_image_view"
tools:layout_editor_absoluteX="0dp" />

<TextView
android:id="@+id/story_count_text_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginStart="32dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="24dp"
android:layout_marginEnd="32dp"
android:fontFamily="sans-serif"
android:gravity="start"
android:text="@{@plurals/story_count(viewModel.topic.storyCount, viewModel.topic.storyCount)}"
android:textColor="@color/oppiaPrimaryText"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/topic_name_text_view"/>
app:layout_constraintTop_toBottomOf="@+id/topic_name_text_view" />

<TextView
android:id="@+id/topic_description_text_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginStart="32dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="24dp"
android:layout_marginEnd="32dp"
android:fontFamily="sans-serif"
android:gravity="start"
android:text="@{viewModel.topicDescription}"
android:textColor="@color/oppiaPrimaryText"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/story_count_text_view"/>
app:layout_constraintTop_toBottomOf="@+id/story_count_text_view" />

<TextView
android:id="@+id/see_more_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:layout_marginStart="32dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="32dp"
android:fontFamily="sans-serif"
android:gravity="start|center"
android:minHeight="48dp"
android:onClick="@{presenter::seeMoreClicked}"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="@string/topic_overview_see_more"
android:textColor="@color/oppiaPrimaryDark"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/topic_description_text_view" />

<ImageView
android:id="@+id/download_status_image_view"
android:layout_width="24dp"
Expand All @@ -121,6 +127,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/see_more_text_view" />

<TextView
android:id="@+id/download_story_count_text_view"
android:layout_width="wrap_content"
Expand All @@ -134,6 +141,7 @@
android:textSize="18sp"
app:layout_constraintStart_toEndOf="@+id/download_status_image_view"
app:layout_constraintTop_toBottomOf="@+id/see_more_text_view" />

<TextView
android:id="@+id/download_size_text_view"
android:layout_width="wrap_content"
Expand Down

0 comments on commit 078afb1

Please sign in to comment.