Skip to content

Commit

Permalink
style and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
emilioicai committed Nov 24, 2015
1 parent 3686fac commit 87302ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/PlatformSpecificInformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: docs/platform-specific-code.html
next: native-modules-ios
---

When building a cross platform app, the need to write different code for different platforms may arise. This can always be achieved by organizing the various components in different folders:
When building a cross-platform app, the need to write different code for different platforms may arise. This can always be achieved by organizing the various components in different folders:

```sh
/common/components/
Expand Down Expand Up @@ -49,19 +49,19 @@ A module is provided by React Native to detect what is the platform in which the
var {Platform} = React;

var styles = StyleSheet.create({
height: (Platform.OS === 'ios') ? 200 : 100
height: (Platform.OS === 'ios') ? 200 : 100,
});
```

`Platform.OS` will be `ios` when running in iOS and `android` when running in an Android device or simulator.

###Detecting android version
###Detecting Android version
On Android, the Platform module can be also used to detect which is the version of the Android Platform in which the app is running

```javascript
var {Platform} = React;

if(Platform.Version === '5.0'){
console.log('Running on Lollipop!');
console.log('Running on Lollipop!');
}
```

0 comments on commit 87302ac

Please sign in to comment.