|
|
|
@ -1,5 +1,9 @@ |
|
|
|
|
/* @flow */ |
|
|
|
|
|
|
|
|
|
import { Platform } from '../react'; |
|
|
|
|
|
|
|
|
|
import { ColorPalette } from './components'; |
|
|
|
|
|
|
|
|
|
declare type StyleSheet = Object; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -39,6 +43,25 @@ export function createStyleSheet(styles: StyleSheet, overrides: StyleSheet = {}) |
|
|
|
|
return combinedStyles; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Works around a bug in react-native or react-native-webrtc on Android which |
|
|
|
|
* causes Views overlaying RTCView to be clipped. Even though we (may) display |
|
|
|
|
* multiple RTCViews, it is enough to apply the fix only to a View with a |
|
|
|
|
* bounding rectangle containing all RTCviews and their overlaying Views. |
|
|
|
|
* |
|
|
|
|
* @param {StyleSheet} styles - An object which represents a stylesheet. |
|
|
|
|
* @public |
|
|
|
|
* @returns {StyleSheet} |
|
|
|
|
*/ |
|
|
|
|
export function fixAndroidViewClipping<T: StyleSheet>(styles: T): T { |
|
|
|
|
if (Platform.OS === 'android') { |
|
|
|
|
styles.borderColor = ColorPalette.appBackground; |
|
|
|
|
styles.borderWidth = 0.2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return styles; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Shims style properties to work correctly on native. Allows us to minimize the |
|
|
|
|
* number of style declarations that need to be set or overridden for specific |
|
|
|
|