Skip to content

Commit

Permalink
Fix #4684: Revert (most of) #4587 (#4686)
Browse files Browse the repository at this point in the history
## Explanation
Fixes #4684

This PR reverts #4587. I think the change of match_parent to
wraps_content caused the promoted story container to grow for larger
images, and this wasn't caught until we tried the changes with
production assets. I noticed other places in the PR that might have the
same issue, so rather than trying to make sense of everything in order
to properly fix it & add tests, I opted to revert the change since the
regression is beta-blocking (even though it wasn't a clean reversion and
required manual changes).

Note that the reversion includes keeping the changes to
recently_played_fragment since otherwise changes in
RecentlyPlayedFragmentTest fail, and the change seems unlikely to cause
any problems with respect to potential thumbnail sizing issues.

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
There's not much to show here--see the issue for context on the problem.
The post-reversion just reverts things back to their previous state
(i.e. no regression).
  • Loading branch information
BenHenning authored Nov 1, 2022
1 parent 929c142 commit ac68f84
Show file tree
Hide file tree
Showing 40 changed files with 54 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/faq_single_activity_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_faq_single_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal">
android:orientation="horizontal"
android:baselineAligned="false">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
Expand Down Expand Up @@ -47,8 +47,8 @@
<ScrollView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/component_color_resume_lesson_activity_background_color">
android:background="@color/component_color_resume_lesson_activity_background_color"
android:layout_weight="1">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -117,5 +117,6 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

</LinearLayout>
</layout>
7 changes: 3 additions & 4 deletions app/src/main/res/layout-sw600dp/help_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
android:background="@color/component_color_help_activity_background_color"
android:contentDescription="@string/help_activity_back_arrow_description"
android:padding="12dp"
app:srcCompat="@drawable/ic_arrow_back_black_24_dp"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/multipane_guideline"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_arrow_back_black_24_dp" />
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/help_multipane_options_title_textview"
Expand Down Expand Up @@ -95,10 +95,9 @@
<fragment
android:id="@+id/help_activity_fragment_navigation_drawer"
android:name="org.oppia.android.app.drawer.NavigationDrawerFragment"
android:layout_width="wrap_content"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:minWidth="@dimen/navigation_drawer_width"
app:layout="@layout/drawer_fragment"
tools:layout="@layout/drawer_fragment" />
</androidx.drawerlayout.widget.DrawerLayout>
3 changes: 1 addition & 2 deletions app/src/main/res/layout-sw600dp/option_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@
<fragment
android:id="@+id/options_activity_fragment_navigation_drawer"
android:name="org.oppia.android.app.drawer.NavigationDrawerFragment"
android:layout_width="wrap_content"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:minWidth="@dimen/navigation_drawer_width"
app:layout="@layout/drawer_fragment"
tools:layout="@layout/drawer_fragment" />
</androidx.drawerlayout.widget.DrawerLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout-sw600dp/story_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/story_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_story_activity_toolbar_color"
android:fontFamily="sans-serif"
android:gravity="center_vertical"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/admin_auth_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/admin_auth_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_admin_auth_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/administrator_controls_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
<fragment
android:id="@+id/administrator_controls_activity_fragment_navigation_drawer"
android:name="org.oppia.android.app.drawer.NavigationDrawerFragment"
android:layout_width="wrap_content"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:minWidth="@dimen/navigation_drawer_width"
app:layout="@layout/drawer_fragment"
tools:layout="@layout/drawer_fragment" />
</androidx.drawerlayout.widget.DrawerLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/app_language_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/app_language_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/app_version_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/app_version_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_app_version_activity_toolbar_color"
android:minHeight="?attr/actionBarSize"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
app:navigationIcon="?attr/homeAsUpIndicator"
Expand All @@ -36,8 +35,8 @@
android:layout_height="4dp"
android:layout_gravity="top"
android:background="@drawable/toolbar_drop_shadow"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_version_app_bar_layout" />

<FrameLayout
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/audio_language_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/audio_language_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/completed_story_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/completed_story_list_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_completed_progress_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/developer_options_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@
<fragment
android:id="@+id/developer_options_activity_fragment_navigation_drawer"
android:name="org.oppia.android.app.drawer.NavigationDrawerFragment"
android:layout_width="wrap_content"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:minWidth="@dimen/navigation_drawer_width"
app:layout="@layout/drawer_fragment"
tools:layout="@layout/drawer_fragment" />
</androidx.drawerlayout.widget.DrawerLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/exploration_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/exploration_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_exploration_activity_toolbar_color"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Widget.AppCompat.ActionBar"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/faq_single_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/faq_single_activity_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_faq_single_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/help_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@
<fragment
android:id="@+id/help_activity_fragment_navigation_drawer"
android:name="org.oppia.android.app.drawer.NavigationDrawerFragment"
android:layout_width="wrap_content"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:minWidth="@dimen/navigation_drawer_width"
app:layout="@layout/drawer_fragment"
tools:layout="@layout/drawer_fragment" />
</androidx.drawerlayout.widget.DrawerLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/hints_and_solution_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/hints_and_solution_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_def_oppia_dark_blue"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/home_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@
<fragment
android:id="@+id/home_activity_fragment_navigation_drawer"
android:name="org.oppia.android.app.drawer.NavigationDrawerFragment"
android:layout_width="wrap_content"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:minWidth="@dimen/navigation_drawer_width"
app:layout="@layout/drawer_fragment"
tools:layout="@layout/drawer_fragment" />
</androidx.drawerlayout.widget.DrawerLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/license_text_viewer_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/license_text_viewer_activity_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/mark_chapters_completed_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_mark_chapters_completed_primary_toolbar_color"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/mark_stories_completed_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_mark_stories_completed_primary_toolbar_color"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/mark_topics_completed_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/mark_topics_completed_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_mark_topics_completed_primary_toolbar_color"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/my_downloads_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/my_downloads_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/oppia_primary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="@string/my_downloads_activity_title"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/ongoing_topic_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/ongoing_topic_list_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_ongoing_progress_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/option_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
<fragment
android:id="@+id/options_activity_fragment_navigation_drawer"
android:name="org.oppia.android.app.drawer.NavigationDrawerFragment"
android:layout_width="wrap_content"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="start"
android:minWidth="@dimen/navigation_drawer_width"
app:layout="@layout/drawer_fragment"
tools:layout="@layout/drawer_fragment" />
</androidx.drawerlayout.widget.DrawerLayout>
5 changes: 2 additions & 3 deletions app/src/main/res/layout/pin_password_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/pin_password_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/component_color_pin_password_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down Expand Up @@ -106,10 +106,9 @@
android:id="@+id/pin_password_input_pin"
style="@style/TextInputLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="56dp"
android:layout_marginTop="2dp"
android:hint="@{viewModel.profile.isAdmin ? @string/input_pin_password_as_admin : @string/input_pin_password_as_user}"
android:minHeight="56dp"
app:layout_constraintEnd_toStartOf="@id/show_pin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/policies_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
android:layout_height="wrap_content"
android:layout_gravity="end"
android:background="@color/oppia_primary"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Widget.AppCompat.ActionBar"
app:navigationContentDescription="@string/navigate_up"
app:navigationIcon="@drawable/ic_arrow_back_white_24dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_and_device_id_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/profile_and_device_id_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/oppia_primary"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_edit_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/profile_edit_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/oppia_primary"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/profile_list_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_picture_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/profile_picture_activity_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="?attr/actionBarSize"
android:background="@color/oppia_primary"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
Expand Down
10 changes: 4 additions & 6 deletions app/src/main/res/layout/profile_progress_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
android:background="@color/color_def_white_light"
android:clickable="true"
android:contentDescription="@string/current_profile_picture_content_description"
android:elevation="4dp"
android:focusable="true"
android:onClick="@{() -> viewModel.clickOnProfilePicture()}"
android:elevation="4dp"
app:add_shadow="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -42,10 +42,10 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/edit_profile_picture_content_description"
android:elevation="4dp"
android:onClick="@{() -> viewModel.clickOnProfilePicture()}"
android:paddingStart="8dp"
android:paddingTop="8dp"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="@+id/profile_edit_image"
app:layout_constraintEnd_toEndOf="@+id/profile_edit_image"
app:srcCompat="@drawable/rounded_white_background_with_shadow" />
Expand Down Expand Up @@ -105,10 +105,9 @@
<TextView
android:id="@+id/ongoing_topics_description_text_view"
style="@style/TextViewCenter"
android:layout_width="wrap_content"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:minWidth="60dp"
android:text="@{viewModel.ongoingTopicCount != 1 ? @string/topics_in_progress : @string/topic_in_progress}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textSize="12sp" />
Expand Down Expand Up @@ -154,10 +153,9 @@
<TextView
android:id="@+id/completed_stories_description_text_view"
style="@style/TextViewCenter"
android:layout_width="wrap_content"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:minWidth="60dp"
android:text="@{viewModel.completedStoryCount != 1 ? @string/stories_completed : @string/story_completed}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textSize="12sp" />
Expand Down
Loading

0 comments on commit ac68f84

Please sign in to comment.