Skip to content

Commit

Permalink
Update color-schemes.md
Browse files Browse the repository at this point in the history
1) bare workflow recommendations for android dont work
```
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    // dont work
    // Intent intent = new Intent("onConfigurationChanged");
    // intent.putExtra("newConfig", newConfig);
    // sendBroadcast(intent);
    
   // works ideally and already approved by many people in issue facebook/react-native#28823 (comment)
   getReactInstanceManager().onConfigurationChanged(this, newConfig);
}
```

2) Turned on debugger break `useColorScheme` and `Appearance.getColorScheme` they always return 'light'
facebook/react-native#28823 (comment)
  • Loading branch information
Ciberusps authored Jun 29, 2021
1 parent 9fcddb2 commit 36d712a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/pages/guides/color-schemes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ public class MainActivity extends ReactActivity {
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
sendBroadcast(intent);
getReactInstanceManager().onConfigurationChanged(this, newConfig);
}
......
}
Expand Down Expand Up @@ -137,4 +135,5 @@ While you're developing, you may want to change your simulator's or device's app

- If working with an iOS emulator locally, you can use the `command` + `shift` + `a` shortcut to toggle between light and dark mode.
- If using a real device or an Android emulator, you can toggle the system dark mode setting in the device's settings.
- "Debug" must be turned off
- [Snack](https://snack.expo.io) is locked to light mode.

0 comments on commit 36d712a

Please sign in to comment.