Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

react native different styles for ios and android

import { Platform, StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    ...Platform.select({
      ios: {
        backgroundColor: 'red'
      },
      android: {
        backgroundColor: 'green'
      },
      default: {
        // other platforms, web for example
        backgroundColor: 'blue'
      }
    })
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: useref not defined : error 
Javascript :: prime or not in javascript 
Javascript :: localtunnel 
Javascript :: random image and link js 
Javascript :: expo image picker 
Javascript :: react native linking email 
Javascript :: how to test usestate in jest 
Javascript :: jquery modal if clicked outside 
Javascript :: javascript remove all event listeners 
Javascript :: jquery click outside 
Javascript :: jquery add element to array 
Javascript :: jquery click hold down 
Javascript :: sort json in descending order 
Javascript :: nextjs custom document 
Javascript :: new date() in javascript 3 days from now 
Javascript :: jquery is check 
Javascript :: ajax get form data 
Javascript :: how to sum two var in jquery 
Javascript :: js unique array 
Javascript :: how to pretty formatjson value on terminal ruby 
Javascript :: adding firebase to angular 
Javascript :: random color code js 
Javascript :: javascript sample list 
Javascript :: redux saga delay 
Javascript :: react native elevation 
Javascript :: js get input from user 
Javascript :: destructure dynamic property 
Javascript :: sample google map api key for testing 
Javascript :: javascript colorized console.log 
Javascript :: set headers in express 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =