Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions twopaneview/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
48 changes: 48 additions & 0 deletions twopaneview/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# OSX
#
.DS_Store

# node.js
#
node_modules/
npm-debug.log
yarn-error.log
package-lock.json

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# BUCK
buck-out/
\.buckd/
*.keystore

# generated files
lib/

.read-snapshot.txt
7 changes: 7 additions & 0 deletions twopaneview/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
examples/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log
4 changes: 4 additions & 0 deletions twopaneview/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
50 changes: 50 additions & 0 deletions twopaneview/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# TwoPaneView

## Status

- Android:
- 10+
- react-native:
- supported versions "<strong>&gt;= 0.60.5</strong>"

## Installation

### Please refer to the react-native-dualscreen page to install the latest version of DualScreenInfo first.

- npm install react-native-twopaneview

## API

[Documentation](https://github.com/react-native-community/discussions-and-proposals/issues/197)
- `Auto`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/auto.JPG)
- `Single`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/single.JPG)
- `Dual`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/dual.JPG)
- `panePriority='pane2'`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/priority2.JPG)
- `onModeChanged={()=>{console.log('onModeChanged');}`

## How to run sample app

### 0. Clone the repo
`$ git clone https://github.com/microsoft/react-native-dualscreen.git`
and
`cd /twopaneview/examples`
### 1. npm install

`$ npm install`

### 2. (Optional) Clean build android

`$ cd android ` then `$ gradlew clean `

### 3. npm run android

Start emulator, then run
`$ npm run run:android`

## Reference

[Documentation](https://aka.ms/dualscreendocs)
4 changes: 4 additions & 0 deletions twopaneview/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};
1 change: 1 addition & 0 deletions twopaneview/examples/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
62 changes: 62 additions & 0 deletions twopaneview/examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log
yarn.lock
package-lock.json

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
*.apk
46 changes: 46 additions & 0 deletions twopaneview/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# TwoPaneView

## Status

- Android:
- 10+
- react-native:
- supported versions "<strong>&gt;= 0.60.5</strong>"

## Installation

### Please refer to the react-native-dualscreen page to install the latest version of DualScreenInfo first.

- npm install react-native-twopaneview

## API

[Documentation](https://github.com/react-native-community/discussions-and-proposals/issues/197)
- `Auto`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/auto.JPG)
- `Single`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/single.JPG)
- `Dual`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/dual.JPG)
- `panePriority='pane2'`
![](https://github.com/microsoft/react-native-dualscreen/raw/master/twopaneview/examples/paneModesDemo/priority2.JPG)
- `onModeChanged={()=>{console.log('onModeChanged');}`

## How to run sample app

### 1. npm install

`$ npm install`

### 2. (Optional) Clean build android

`$ cd android ` then `$ gradlew clean `

### 3. npm run android

Start emulator, then run
`$ npm run run:android`

## Reference

[Documentation](https://aka.ms/dualscreendocs)
12 changes: 12 additions & 0 deletions twopaneview/examples/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**/build/
**/infer-out/
.idea
.gradle
local.properties
*.iml
.DS_Store
app/*.keystore
app/src/main/assets/*.bundle
app/src/main/res/drawable-*
gradle-yandex.properties
build
Loading