Skip to content

Commit

Permalink
FIX #4852: "Profile Deletion" button is misaligned in landscape on a …
Browse files Browse the repository at this point in the history
…phone (#4976)

<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
  -->Fixes #4852

## 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
<!-- Delete these section if this PR does not include UI-related
changes. -->
If your PR includes UI-related changes, then:
- Add screenshots for portrait/landscape for both a tablet & phone of
the before & after UI changes
- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL
guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide))
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing
- | Before  | After   |
  | -----------------  | --------------------- |
|
![before](https://github.com/oppia/oppia-android/assets/92685651/35d26710-f49b-49e2-b7c6-529e1276599e)
|
![after](https://github.com/oppia/oppia-android/assets/92685651/39ff1955-1c7a-4e4c-a21a-b8e6792e2faa)
|

Videos for more explanation on two different emulators (landscape
mode):-
1) Running on 6+ device

[sixplus.webm](https://github.com/oppia/oppia-android/assets/92685651/781763ad-772e-43b5-9560-61bbe2d3b30e)
2) Running on 4 WVGA (Nexus S)
[WVGA (Nexus
S).webm](https://github.com/oppia/oppia-android/assets/92685651/18800cf0-b5e5-4eb0-8ead-bd0596cdc2c2)

---------

Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com>
  • Loading branch information
aayushimathur6 and adhiamboperes authored Jul 7, 2023
1 parent 67c1d79 commit 4167144
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/src/main/res/layout-land/profile_edit_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
android:textColor="@color/component_color_shared_primary_text_color"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/profile_rename_button" />

Expand All @@ -128,6 +129,7 @@
android:textSize="16sp"
android:visibility="@{viewModel.isAllowedToMarkFinishedChapters ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/profile_reset_button" />

Expand Down Expand Up @@ -216,10 +218,10 @@
android:text="@string/profile_edit_allow_download_heading"
android:textColor="@color/component_color_shared_primary_text_color"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/profile_edit_allow_download_switch"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/profile_edit_allow_download_sub"
Expand Down Expand Up @@ -258,7 +260,6 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/profile_edit_delete_margin_bottom"
android:background="@drawable/general_item_background_border"
android:fontFamily="sans-serif"
android:gravity="start|center_vertical"
Expand All @@ -272,7 +273,8 @@
android:visibility="@{viewModel.profile.isAdmin ? View.GONE : View.VISIBLE}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/profile_edit_enable_in_lesson_language_switching_container" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</layout>

0 comments on commit 4167144

Please sign in to comment.