Skip to content

Commit

Permalink
Fix part #164: Hifi content card (#338)
Browse files Browse the repository at this point in the history
* added padding

* updated padding

* fixed padding issue.

* update margin

* Update fraction_interaction_item.xml

* update items

* Update UrlImageParser.kt

* Update UrlImageParser.kt

* Update UrlImageParser.kt

* Update HtmlParser.kt

* Update HtmlParser.kt
  • Loading branch information
veena14cs authored Nov 18, 2019
1 parent 710e0e2 commit 1f0e828
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/content_blue_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="@color/blue_shade_200"/>
android:color="@color/oppiaStrokeBlue"/>
<corners
android:radius="4dp"/>
<solid
android:color="@color/oppiaLightBlue"/>
android:color="@color/oppiaSolidBlue"/>
</shape>
19 changes: 11 additions & 8 deletions app/src/main/res/layout/content_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,23 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:paddingStart="8dp"
android:paddingEnd="8dp">
android:layout_marginStart="20dp"
android:layout_marginEnd="28dp"
android:layout_marginTop="24dp"
android:background="@drawable/content_blue_background">

<TextView
android:id="@+id/content_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:background="@drawable/content_blue_background"
android:padding="12dp"
android:paddingStart="12dp"
android:paddingTop="16dp"
android:paddingEnd="12dp"
android:paddingBottom="16dp"
android:fontFamily="sans-serif"
android:text="@{htmlContent}"
android:visibility="@{htmlContent.length() > 0 ? View.VISIBLE : View.GONE, default=gone}"
android:textColor="@color/oppiaPrimaryText"
android:textSize="16sp" />
android:textSize="16sp"
android:visibility="@{htmlContent.length() > 0 ? View.VISIBLE : View.GONE, default=gone}" />
</FrameLayout>
</layout>
16 changes: 11 additions & 5 deletions app/src/main/res/layout/feedback_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:paddingEnd="8dp">
android:background="@drawable/content_blue_background"
android:layout_marginStart="20dp"
android:layout_marginEnd="28dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="28dp">

<TextView
android:id="@+id/feedback_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:background="@drawable/content_blue_background"
android:padding="12dp"
android:paddingStart="12dp"
android:paddingTop="16dp"
android:paddingEnd="12dp"
android:paddingBottom="16dp"
android:fontFamily="sans-serif"
android:text="@{htmlContent}"
android:textColor="@color/oppiaPrimaryText"
android:textSize="16sp" />
</FrameLayout>

</layout>
1 change: 0 additions & 1 deletion app/src/main/res/layout/fraction_interaction_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_marginTop="24dp"
android:layout_marginBottom="24dp"
android:layout_marginStart="28dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/selection_interaction_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
android:layout_marginStart="20dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:layout_marginBottom="16dp"
android:divider="@android:color/transparent"
app:data="@{viewModel.choiceItems}"
app:itemInputType="@{viewModel.getSelectionItemInputType()}"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/state_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
android:layout_height="match_parent"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingTop="@{viewModel.isAudioBarVisible().get()? @dimen/padding_72dp : @dimen/padding_24dp}"
android:scrollbars="none"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<color name="oppiaLightBrown">#E76F51</color>
<color name="oppiaBackground">#F2F2F2</color>
<color name="oppiaStrokeBlue">#4D395FD0</color>
<color name="oppiaSolidBlue">#4DA5D3EC</color>
<color name="oppiaStrokeBlack">#CC333333</color>
<color name="oppiaProgressChapterFinished">#E76F51</color>
<color name="oppiaProgressChapterNotFinished">#999999</color>
Expand Down

0 comments on commit 1f0e828

Please sign in to comment.