Issues arising with the react-native-responsive-screen package causing it to malfunction on certain devices

I am currently using:

react-native-responsive-screen package: "^1.4.2",

"react-native": "^0.64.0",

and I have the following issue:

A user has reported that the UI layout is not fitting the screen properly. They have provided a screenshot for reference. (Attached)

https://i.sstatic.net/7ykyN.jpg

size: 1080x2009

dpi: 420

I am utilizing the react-native-responsive-screen package to ensure responsiveness in my layout.

It appears to be working fine on various platforms, including an android emulator with similar screen specifications to the user's device. Same dpi, width & height.

https://i.sstatic.net/wztkp.png

Below is the code from my stylesheet Account.js:

import {widthPercentageToDP as wp, heightPercentageToDP as hp} from 'react-native-responsive-screen';

    container: {
        flexDirection: "row",
        flex: 1,
        flexWrap: 'wrap',
        alignItems: "center",
        backgroundColor: "black"
    },
        menuContainer: {
        flex: 1
    },
    onboardingWhole: {
        justifyContent: 'center',
        alignSelf: 'center',
        marginTop: hp('20%'),
        flex: 1,
        alignItems: 'center',
        padding: 10,
        borderRadius: 5,
        zIndex: 3,
        elevation: 3,
        position: 'absolute'
    },
    onboardingText: {
        fontSize: hp('2%'),
        marginTop: hp('1.5%'),
        marginLeft: wp('5%'),
        marginBottom: hp('1.5%'),
        marginRight: wp('5%'),
        color: "white",
        textAlign: 'center',
        fontFamily: "Anton-Regular"
    },
    onboardingTextHeadline: {
        fontSize: hp('3%'),
        marginTop: hp('1.5%'),
        marginLeft: wp('5%'),
        marginBottom: hp('1.5%'),
        marginRight: wp('5%'),
        color: orangeStyle,
        textAlign: 'center',
        fontFamily: "Anton-Regular"
     },
        cancelButtonOnboarding: {
        justifyContent: 'center',
        padding: 6,
        width: wp('45%'),
        margin: 5,
        borderRadius: 5,
        borderColor: redStyle,
        borderWidth: 2,
        height: hp('8%') 
    }

And my HTML code snippet:

<View style={styles.menu}>
 <View style={styles.menuContainer}>
  <View style={styles.onboardingWhole}><Text style={styles.onboardingTextHeadline}>WELCOME TO SAGLY! LET'S IMPROVE YOUR SUSPENSION SETUP OF YOUR MTB. </Text><Text style={styles.onboardingText}>We would recommend to follow the following steps: </Text><Text style={styles.onboardingText}>1) Set up your profile so that SAGLY can make SMART SUGGESTIONS.</Text><Text style={styles.onboardingText}>2) Create a new setup. Optionally with the EASY SETUP GUIDE.</Text><Text style={styles.onboardingText}> 3) Inspect setups with MANAGE SETUPS and tune them with the WHAT SHOULD I DO WHEN ... guide.</Text><TouchableOpacity style={styles.submitButtonOnboarding} onPress={this.nextOnboardingView.bind(this)} title="next"><Text style={styles.buttonTextNext}>GOT IT!</Text></TouchableOpacity></View>
 </View>
</View>

Is there a better approach than what I'm doing here? Should I reconsider using this package or am I missing something?

Thank you for your assistance!

Answer №1

It appears that the user may have adjusted their OS font size in the accessibility settings. Utilizing relative font sizes is beneficial for situations like this, so consider placing this screen within a scroll view to accommodate any changes in text size.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Using v-bind to dynamically set styles in Vue.js

While utilizing v-bind:style to apply dynamic values, I encountered an issue where v-bind:style did not seem to work. However, in the console, I verified that v-bind:style was receiving the correct value (:style='{ color : red (or any other value) }&a ...

'this' in Arrow functions does not have a reference to the calling context

Something seems off about the context in this code. I've left comments to describe my issue below: const cat = { //arrow function meow: () => { console.log(this); }, makeMeow(){ // Why does 'this' refer ...

Utilizing multiple materials with a single mesh in three.js: A comprehensive guide

I am facing a major issue with three.js: My goal is to create a simple cube with different colors on each face. I attempted to achieve this using the following code snippet: // set the scene size var WIDTH = jQuery('#showcase').width() - 20 ...

Change the color of the Material UI InputLabel

Seeking assistance with my input label: <InputLabel>NAME</InputLabel> The text is currently displaying in white, which makes it difficult to read against the white background. Can someone provide guidance on how I can change the color to blac ...

Looking for a way to choose a button with a specific class name and a distinct "name" attribute using jquery?

I am currently working on developing a comment system. As part of this system, I want to include a toggle replies button when a user posts a reply to a comment. However, I only want this button to be displayed if there are no existing replies to the commen ...

What is the best way to handle both local and global ajax events in jQuery?

After recently transitioning from Prototype to jQuery, I am encountering some challenges. My application involves multiple AJAX requests, where I want certain global events to take place in 95% of cases, such as displaying or hiding a loading indicator. A ...

How to prevent v-menu from overlapping a navbar in Vue.js

Exploring the examples on the main page of Vuetify, we come across the v-menu component showcased in detail. Check it out here: https://vuetifyjs.com/en/components/menus/#accessibility If you activate any of the buttons to open the v-menu and then scroll ...

Checking if the input is valid before invoking a JavaScript/jQuery function

I am working on a wizard using TypeScript and ASP.NET which consists of several steps. Here is an example: Step 1: TextBox input <---Name TextBox input <--- Age Button onClick="nextStep()" When I click on the button, I want to validate my input u ...

Utilizing settings.url to distinguish between different ajax requests

As I work to distinguish between various AJAX requests, I'm grappling with this code snippet: $(document).ajaxSend(function(event, request, settings) { $('#user-content .modal-body').addClass('hide'); $('#user-c ...

What is the best way to use jest/enzyme to determine if a method from an imported class was called in a component

Here is the code snippet from my component: export class VehiclesComponent extends React.Component { constructor(props) { super(props); this.state = { data: [], }; autoBind(this); } componentDidMount () { this.fetchData(); ...

Issue with saving and restoring filter state for Angular Smart table dropdown filters is not working correctly

After carefully following the guidelines provided in the documentation for persisting the filter state, I encountered an issue. Despite successfully restoring the table state, including the filters, upon reloading the page, the <select> box appears e ...

Real-time data update with Socket io: instantly refresh data on another page upon form submission without having to manually

What is the best way to utilize socket io in a situation where I have two pages open, one displaying a table of existing data and the other featuring a form for users to input new data? I want the table page to automatically update whenever a user submits ...

Unusual Blank Space in HTML CSS Design

While working on my website, I noticed a peculiar white space appearing at the bottom of the page, but only when using Internet Explorer. Safari looks fine. I am currently using IE8. I would like the white background to end after the black navigation link ...

Is it possible to transfer a specific feature from jQuery to Prototype?

I find myself in a situation where I have to use Prototype instead of jQuery, even though I'm not as familiar with it. Can anyone assist me in transforming the following script: var output={}; $$('ul li').each(function(item){ var firstL ...

What is the best way to cut and combine multiple array elements in the right positions?

let result = response.data; console.log(result); const newTemp = result.ssps_with_scated.splice(5,1).concat(result.ps_with_ed.splice(2,1))[0]; result.ps_with_ed.push(newTemp); After multiple attempts, I finally achieved my goal. However, the array values ...

Mastering the Correct Usage of AuthGuard

I am facing an issue with implementing authguard in my angular application. I have set up a post request to my spring boot backend, and upon success, I set a value to true which I then check in my canActivate method of the authguard. However, for some reas ...

The REGEX Pattern ignores every second entry

Seeking assistance with two different REGEX patterns used to interpret MGRS grid coordinates inputted by users. The first pattern is designed for coordinates without spaces: /\d{1,2}[^ABIOYZabioyz][A-Za-z]{2}([0-9][0-9]){0,5}/g Here are some examples ...

Can the font-weight of FontAwesome icons be altered?

Is there a method to decrease the weight of one of the FontAwesome icons on my website? It appears much heavier than the font style I am currently utilizing. Here is how it currently displays: : Not very appealing, right? I attempted adjusting the font-w ...

Does an event fire after the onclick event completes?

After an onclick event, I need a particular code to be executed. This works well on mobile devices using touchstart and touchend events. However, is there an equivalent event for computers? This is how my current code looks like: document.getElementById( ...

issue with eval() function

I am attempting to convert a JSON string from my .php file using the eval() function, but it is not working. The browser console shows a SyntaxError: expected expression, got '<'... However, when I comment out the line where eval() is used an ...