You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@astrojams1 Yes I am also facing same issue . SegmentedButtons may get re-evaluated when the app becomes active again, leading iOS to recreate the layers dynamically, sometimes causing unintended visual effects.
I believe that as a work around you can add activity indicator whenever the app comes from background to foreground.
Please find the code below :
import React, { useState, useEffect, useRef } from 'react';
import { AppState, View, ActivityIndicator } from 'react-native';
import { SegmentedButtons } from 'react-native-paper';
Current behaviour
I am rendering a Segmented Button (basic, vanilla implementation)
When I open or close the iOS app, I see a gradient within one of the segments.
Expected behaviour
No gradient.
How to reproduce?
Use iOS
Add a segmented button to your view.
Close or open the iOS app to show the gradient.
Preview
Implementation:
<SegmentedButtons value={buttonValue} onValueChange={setButtonValue} buttons={[ { value: 'consumed', label: 'Consumed', showSelectedCheck: true }, { value: 'remaining', label: 'Remaining', showSelectedCheck: true }, ]} density="small" />
Screenshot:

What have you tried so far?
Explicitly setting a background color with
style={[styles.group, { backgroundColor: theme.colors.background }]}
Your Environment
The text was updated successfully, but these errors were encountered: