forked from ptomasroos/react-native-scrollable-tab-view
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
769f087
commit 6e0fcaf
Showing
104 changed files
with
5,190 additions
and
1,332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ npm-debug.log | |
node_modules/ | ||
.idea/ | ||
.reploy | ||
.DS_Store |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React from 'react'; | ||
import { | ||
StyleSheet, | ||
Text, | ||
View, | ||
ScrollView, | ||
} from 'react-native'; | ||
|
||
import FacebookTabBar from './FacebookTabBar'; | ||
import ScrollableTabView from 'react-native-scrollable-tab-view'; | ||
|
||
export default () => { | ||
return <ScrollableTabView | ||
style={{marginTop: 20, }} | ||
initialPage={1} | ||
renderTabBar={() => <FacebookTabBar />} | ||
> | ||
<ScrollView tabLabel="ios-paper" style={styles.tabView}> | ||
<View style={styles.card}> | ||
<Text>News</Text> | ||
</View> | ||
</ScrollView> | ||
<ScrollView tabLabel="ios-people" style={styles.tabView}> | ||
<View style={styles.card}> | ||
<Text>Friends</Text> | ||
</View> | ||
</ScrollView> | ||
<ScrollView tabLabel="ios-chatboxes" style={styles.tabView}> | ||
<View style={styles.card}> | ||
<Text>Messenger</Text> | ||
</View> | ||
</ScrollView> | ||
<ScrollView tabLabel="ios-notifications" style={styles.tabView}> | ||
<View style={styles.card}> | ||
<Text>Notifications</Text> | ||
</View> | ||
</ScrollView> | ||
<ScrollView tabLabel="ios-list" style={styles.tabView}> | ||
<View style={styles.card}> | ||
<Text>Other nav</Text> | ||
</View> | ||
</ScrollView> | ||
</ScrollableTabView>; | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
tabView: { | ||
flex: 1, | ||
padding: 10, | ||
backgroundColor: 'rgba(0,0,0,0.01)', | ||
}, | ||
card: { | ||
borderWidth: 1, | ||
backgroundColor: '#fff', | ||
borderColor: 'rgba(0,0,0,0.1)', | ||
margin: 5, | ||
height: 150, | ||
padding: 15, | ||
shadowColor: '#ccc', | ||
shadowOffset: { width: 2, height: 2, }, | ||
shadowOpacity: 0.5, | ||
shadowRadius: 3, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
import { | ||
StyleSheet, | ||
ScrollView, | ||
} from 'react-native'; | ||
|
||
import ScrollableTabView, { DefaultTabBar, } from 'react-native-scrollable-tab-view'; | ||
import Icon from 'react-native-vector-icons/Ionicons'; | ||
|
||
// Using tabBarPosition='overlayTop' or 'overlayBottom' lets the content show through a | ||
// semitransparent tab bar. Note that if you build a custom tab bar component, its outer container | ||
// must consume a 'style' prop (e.g. <View style={this.props.style}) to support this feature. | ||
export default () => { | ||
return <ScrollableTabView | ||
style={styles.container} | ||
renderTabBar={()=><DefaultTabBar backgroundColor='rgba(255, 255, 255, 0.7)' />} | ||
tabBarPosition='overlayTop' | ||
> | ||
<ScrollView tabLabel='iOS'> | ||
<Icon name='logo-apple' color='black' size={300} style={styles.icon} /> | ||
<Icon name='ios-phone-portrait' color='black' size={300} style={styles.icon} /> | ||
<Icon name='logo-apple' color='#DBDDDE' size={300} style={styles.icon} /> | ||
<Icon name='ios-phone-portrait' color='#DBDDDE' size={300} style={styles.icon} /> | ||
</ScrollView> | ||
<ScrollView tabLabel='Android'> | ||
<Icon name='logo-android' color='#A4C639' size={300} style={styles.icon} /> | ||
<Icon name='logo-android' color='black' size={300} style={styles.icon} /> | ||
<Icon name='logo-android' color='brown' size={300} style={styles.icon} /> | ||
</ScrollView> | ||
</ScrollableTabView>; | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
marginTop: 30, | ||
}, | ||
icon: { | ||
width: 300, | ||
height: 300, | ||
alignSelf: 'center', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { | ||
Text, | ||
View, | ||
} from 'react-native'; | ||
|
||
import ScrollableTabView, { ScrollableTabBar, } from 'react-native-scrollable-tab-view'; | ||
|
||
export default () => { | ||
return <ScrollableTabView | ||
style={{marginTop: 20, }} | ||
initialPage={0} | ||
renderTabBar={() => <ScrollableTabBar />} | ||
> | ||
<Text tabLabel='Tab #1'>My</Text> | ||
<Text tabLabel='Tab #2 word word'>favorite</Text> | ||
<Text tabLabel='Tab #3 word word word'>project</Text> | ||
<Text tabLabel='Tab #4 word word word word'>favorite</Text> | ||
<Text tabLabel='Tab #5'>project</Text> | ||
</ScrollableTabView>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { | ||
Text, | ||
} from 'react-native'; | ||
|
||
import ScrollableTabView, {DefaultTabBar, } from 'react-native-scrollable-tab-view'; | ||
|
||
export default () => { | ||
return <ScrollableTabView | ||
style={{marginTop: 20, }} | ||
initialPage={1} | ||
renderTabBar={() => <DefaultTabBar />} | ||
> | ||
<Text tabLabel='Tab #1'>My</Text> | ||
<Text tabLabel='Tab #2'>favorite</Text> | ||
<Text tabLabel='Tab #3'>project</Text> | ||
</ScrollableTabView>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'react-native'; | ||
import React from 'react'; | ||
import Index from '../index.android.js'; | ||
|
||
// Note: test renderer must be required after react-native. | ||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders correctly', () => { | ||
const tree = renderer.create( | ||
<Index /> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import 'react-native'; | ||
import React from 'react'; | ||
import Index from '../index.ios.js'; | ||
|
||
// Note: test renderer must be required after react-native. | ||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders correctly', () => { | ||
const tree = renderer.create( | ||
<Index /> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../android/app/src/main/AndroidManifest.xml → .../android/app/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file renamed
BIN
+240 KB
...n/assets/fonts/MaterialCommunityIcons.ttf → ...n/assets/fonts/MaterialCommunityIcons.ttf
Binary file not shown.
File renamed without changes.
Binary file renamed
BIN
+26.8 KB
...id/app/src/main/assets/fonts/Octicons.ttf → ...id/app/src/main/assets/fonts/Octicons.ttf
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../facebooktabsexample/MainApplication.java → ...ain/java/com/example/MainApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.facebooktabsexample; | ||
package com.example; | ||
|
||
import android.app.Application; | ||
|
||
|
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<resources> | ||
<string name="app_name">Example</string> | ||
</resources> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...cebookTabsExample/android/settings.gradle → Example/android/settings.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "Example", | ||
"displayName": "Example" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { AppRegistry, } from 'react-native'; | ||
import Example from './index.js'; | ||
|
||
AppRegistry.registerComponent('Example', () => Example); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { AppRegistry, } from 'react-native'; | ||
import Example from './index.js'; | ||
|
||
AppRegistry.registerComponent('Example', () => Example); |
Oops, something went wrong.