Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4586: Improve text scaling according to screen reader #4695

Merged
merged 28 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f1b02e
Fixed text-scaling issue by setting min Height and width
vrajdesai78 Sep 11, 2022
1e58d73
Navigation drawer scaling fixed
vrajdesai78 Sep 12, 2022
3797b3d
text-scaling fixed in promoted-story-card
vrajdesai78 Sep 12, 2022
ce34ecc
Removed minHeight=48dp
vrajdesai78 Sep 12, 2022
db60ba7
Fixed more text scaling issues
vrajdesai78 Sep 13, 2022
c2eeb36
Optimized code resume lesson
vrajdesai78 Sep 15, 2022
581c7d1
layout_height set to 0dp
vrajdesai78 Sep 17, 2022
90956b3
Updated promoted_story_card
vrajdesai78 Sep 20, 2022
8438a1e
Changed width to sp from dp
vrajdesai78 Nov 4, 2022
b7b7b0e
Merge branch 'develop' into Improve-text-scaling-promoted-list
vrajdesai78 Nov 5, 2022
7b806b1
Merged to latest Develop
vrajdesai78 Nov 5, 2022
8bc5fab
Merge branch 'Improve-text-scaling' into Improve-text-scaling-promote…
vrajdesai78 Nov 5, 2022
bc592ae
Merge branch 'Improve-text-scaling-promoted-list' of https://github.c…
vrajdesai78 Nov 5, 2022
ea13310
Updated promoted_story_card
vrajdesai78 Nov 5, 2022
0637587
Test added
vrajdesai78 Nov 5, 2022
15075d4
Optimized code
vrajdesai78 Nov 5, 2022
435f4a9
Changed minWidth to sp
vrajdesai78 Nov 6, 2022
242b251
Added minWidth
vrajdesai78 Nov 6, 2022
44fefb8
Fixed indentation
vrajdesai78 Nov 6, 2022
d2aa242
Merge branch 'develop' into Improve-text-scaling-promoted-list
vrajdesai78 Nov 6, 2022
0982971
Merge branch 'Improve-text-scaling-promoted-list' of https://github.c…
vrajdesai78 Nov 6, 2022
db80417
removed fixed height
vrajdesai78 Nov 6, 2022
8ed3827
Updated test and changed width to sp
vrajdesai78 Nov 7, 2022
e61872e
Merge branch 'develop' into Improve-text-scaling-promoted-list
vrajdesai78 Nov 7, 2022
d2fe307
Nit changes
vrajdesai78 Nov 8, 2022
973042c
Merge branch 'develop' into Improve-text-scaling-promoted-list
vrajdesai78 Nov 8, 2022
cc23b9c
Merge branch 'develop' into Improve-text-scaling-promoted-list
vrajdesai78 Nov 9, 2022
f8550cb
Merge branch 'develop' into Improve-text-scaling-promoted-list
vrajdesai78 Nov 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,9 @@
<dimen name="promoted_story_card_layout_margin_end">8dp</dimen>
<dimen name="promoted_story_card_layout_margin_start">8dp</dimen>
<!-- The width is set to sp so that it will scale according to the device screen -->
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
<dimen name="promoted_story_card_layout_width">280dp</dimen>
<dimen name="promoted_story_card_layout_width">280sp</dimen>
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
<!-- The width is set to sp so that it will scale according to the device screen -->
<dimen name="promoted_story_card_width">280dp</dimen>
<dimen name="promoted_story_card_width">280sp</dimen>
vrajdesai78 marked this conversation as resolved.
Show resolved Hide resolved
<dimen name="promoted_story_card_text_size">16sp</dimen>
<dimen name="promoted_story_card_margin_top">8dp</dimen>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import org.oppia.android.app.model.OppiaLanguage.BRAZILIAN_PORTUGUESE_VALUE
import org.oppia.android.app.model.OppiaLanguage.ENGLISH
import org.oppia.android.app.model.OppiaLanguage.ENGLISH_VALUE
import org.oppia.android.app.model.ProfileId
import org.oppia.android.app.model.ReadingTextSize
import org.oppia.android.app.model.ScreenName
import org.oppia.android.app.player.state.itemviewmodel.SplitScreenInteractionModule
import org.oppia.android.app.profile.ProfileChooserActivity
Expand All @@ -77,6 +78,7 @@ import org.oppia.android.app.topic.TopicActivity
import org.oppia.android.app.translation.AppLanguageLocaleHandler
import org.oppia.android.app.translation.testing.ActivityRecreatorTestModule
import org.oppia.android.app.translation.testing.TestActivityRecreator
import org.oppia.android.app.utility.FontScaleConfigurationUtil
import org.oppia.android.app.utility.OrientationChangeAction.Companion.orientationLandscape
import org.oppia.android.data.backends.gae.NetworkConfigProdModule
import org.oppia.android.data.backends.gae.NetworkModule
Expand Down Expand Up @@ -200,6 +202,9 @@ class HomeActivityTest {
@Inject
lateinit var dataProviderTestMonitor: DataProviderTestMonitor.Factory

@Inject
lateinit var fontScaleConfigurationUtil: FontScaleConfigurationUtil

private val internalProfileId: Int = 0
private val internalProfileId1: Int = 1
private val longNameInternalProfileId: Int = 3
Expand Down Expand Up @@ -896,7 +901,9 @@ class HomeActivityTest {
}

@Test
@RunOn(TestPlatform.ROBOLECTRIC) // TODO(#3840): Make this test work on Espresso.
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
fun testHomeActivity_promotedStoryHasScalableWidth() {
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
fontScaleConfigurationUtil.adjustFontScale(context, ReadingTextSize.EXTRA_LARGE_TEXT_SIZE)
fakeOppiaClock.setFakeTimeMode(FakeOppiaClock.FakeTimeMode.MODE_UPTIME_MILLIS)
storyProgressTestHelper.markInProgressSavedFractionsStory0Exp0(
profileId = profileId1,
Expand Down