Skip to content

Commit

Permalink
Fix oppia#431: Fixed Profile Page Cut-Off For Small Display (oppia#3630)
Browse files Browse the repository at this point in the history
* Fixed profile page cut off in small display size

* removed redundant lines

* dimens for landscape xml added

* made suggested name change

* updated one wrong value in dimens

* made suggested changes

* made suggested changes according to PPT

* made suggested nit changes
  • Loading branch information
Pranav-Bobde authored Sep 10, 2021
1 parent 33bc789 commit f56345c
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/profile_chooser_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
android:id="@+id/profile_select_text"
style="@style/Heading1"
android:layout_marginStart="36dp"
android:layout_marginTop="64dp"
android:layout_marginTop="@dimen/profile_chooser_fragment_profile_select_text_margin_top"
android:layout_marginEnd="36dp"
android:text="@string/profile_chooser_select"
android:textColor="@color/white"
Expand All @@ -65,7 +65,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_marginTop="@dimen/profile_chooser_fragment_profile_recycler_view_margin_top"
android:layout_marginEnd="16dp"
android:clipToPadding="false"
android:fadingEdge="horizontal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
android:id="@+id/add_profile_divider_view"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/profile_chooser_profile_view_view_margin_top"
android:layout_gravity="bottom"
android:background="@color/oppiaProfileChooserDivider"
android:visibility="@{hasProfileEverBeenAddedValue ? View.GONE : View.VISIBLE}"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/profile_chooser_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
android:id="@+id/profile_select_text"
style="@style/Heading1"
android:layout_marginStart="36dp"
android:layout_marginTop="64dp"
android:layout_marginTop="@dimen/profile_chooser_fragment_profile_select_text_margin_top"
android:layout_marginEnd="36dp"
android:text="@string/profile_chooser_select"
android:textColor="@color/white"
Expand All @@ -65,7 +65,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="32dp"
android:layout_marginTop="36dp"
android:layout_marginTop="@dimen/profile_chooser_fragment_profile_recycler_view_margin_top"
android:layout_marginEnd="32dp"
android:clipToPadding="false"
android:fadingEdge="horizontal"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/profile_chooser_profile_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
android:id="@+id/add_profile_divider_view"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="60dp"
android:layout_marginTop="@dimen/profile_chooser_profile_view_view_margin_top"
android:background="@color/oppiaProfileChooserDivider"
android:visibility="@{hasProfileEverBeenAddedValue ? View.GONE : View.VISIBLE}"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/values-hdpi/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">32dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">18dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">32dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">32dp</dimen>

</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/values-land-hdpi/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">20dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">8dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">32dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">32dp</dimen>

</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values-land-ldpi/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">16dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">8dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">32dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">32dp</dimen>
</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values-land-mdpi/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">64dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">32dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">32dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">32dp</dimen>
</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/values-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@
<dimen name="all_topics_text_margin_end">76dp</dimen>
<dimen name="all_topics_text_margin_bottom">12dp</dimen>

<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">64dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">12dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">32dp</dimen>

<!-- Coming Soon Topic List -->
<dimen name="coming_soon_topic_list_constraint_layout_padding_start">72dp</dimen>
<dimen name="coming_soon_topic_list_constraint_layout_padding_end">72dp</dimen>
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/values-ldpi/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">32dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">12dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">32dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">32dp</dimen>
</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values-mdpi/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">64dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">36dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">60dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">60dp</dimen>
</resources>
8 changes: 8 additions & 0 deletions app/src/main/res/values-xxhdpi/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">64dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">36dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">60dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">60dp</dimen>
</resources>
7 changes: 6 additions & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<dimen name="drag_drop_item_exploration_view_margin_end">24dp</dimen>
<dimen name="drag_drop_item_question_view_margin_top">24dp</dimen>
<dimen name="numeric_input_interaction_item_conversation_view_margin_end">24dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">84dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">60dp</dimen>
<dimen name="profile_chooser_description_margin_start_profile_not_added">24dp</dimen>
<dimen name="profile_chooser_description_margin_end_profile_not_added">24dp</dimen>
<dimen name="profile_chooser_add_view_margin_end_profile_not_added">24dp</dimen>
Expand Down Expand Up @@ -444,6 +444,11 @@
<dimen name="all_topics_text_margin_end">32dp</dimen>
<dimen name="all_topics_text_margin_bottom">12dp</dimen>

<!-- Profile Chooser Fragment -->
<dimen name="profile_chooser_fragment_profile_select_text_margin_top">64dp</dimen>
<dimen name="profile_chooser_fragment_profile_recycler_view_margin_top">36dp</dimen>
<dimen name="profile_chooser_profile_view_view_margin_top">60dp</dimen>

<!-- Coming Soon Topic List -->
<dimen name="coming_soon_topic_list_constraint_layout_padding_start">0dp</dimen>
<dimen name="coming_soon_topic_list_constraint_layout_padding_end">0dp</dimen>
Expand Down

0 comments on commit f56345c

Please sign in to comment.