Skip to content

Commit 3122392

Browse files
committed
Update example
1 parent 3411e8f commit 3122392

File tree

16 files changed

+10
-2164
lines changed

16 files changed

+10
-2164
lines changed

android/src/main/java/com/tksp/navbarstyle/RNNavbarStyleModule.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import android.os.Build;
55
import android.view.View;
66
import android.view.Window;
7-
import android.view.WindowManager;
87

98
import com.facebook.react.bridge.Promise;
109
import com.facebook.react.bridge.ReactApplicationContext;

example/App.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
import React, {Component} from 'react';
2-
import {Platform, StyleSheet, Text, View, TouchableOpacity} from 'react-native';
2+
import {Platform, StyleSheet, Text, View, Button} from 'react-native';
33
import NavbarStyle from 'react-native-navbar-style';
4-
const instructions = Platform.select({
5-
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
6-
android:
7-
'Double tap R on your keyboard to reload,\n' +
8-
'Shake or press menu button for dev menu',
9-
});
4+
105

116
export default class App extends Component {
127

13-
setLightbar = () => {
14-
NavbarStyle.setLightNavbar(true);
8+
setLightbar = async () => {
9+
await NavbarStyle.setLightNavbar(true);
1510
}
16-
setDarkbar = () => {
17-
NavbarStyle.setLightNavbar(false);
11+
setDarkbar = async () => {
12+
await NavbarStyle.setLightNavbar(false);
1813
}
1914

2015
onChangeNavBarColor = () => {
@@ -27,9 +22,9 @@ export default class App extends Component {
2722
return (
2823
<View style={styles.container}>
2924
<Text style={styles.welcome}>NavbarStyles</Text>
30-
<TouchableOpacity onPress={this.setLightbar}><Text>Set Light Navbar</Text></TouchableOpacity>
31-
<TouchableOpacity onPress={this.setDarkbar}><Text>Set Dark Navbar</Text></TouchableOpacity>
32-
<TouchableOpacity onPress={this.onChangeNavBarColor}><Text>Change Color</Text></TouchableOpacity>
25+
<Button title="Set Light Navbar" onPress={this.setLightbar}/>
26+
<Button title="Set Dark Navbar" onPress={this.setDarkbar}/>
27+
<Button title="Change Color" onPress={this.onChangeNavBarColor}/>
3328
</View>
3429
);
3530
}
@@ -40,6 +35,7 @@ const styles = StyleSheet.create({
4035
flex: 1,
4136
justifyContent: 'center',
4237
alignItems: 'center',
38+
justifyContent: 'space-evenly',
4339
backgroundColor: '#F5FCFF',
4440
},
4541
welcome: {

example/ios/example-tvOS/Info.plist

Lines changed: 0 additions & 54 deletions
This file was deleted.

example/ios/example-tvOSTests/Info.plist

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)