Pārlūkot izejas kodu

Define SideMenu width in JS

Guy Carmeli 8 gadus atpakaļ
vecāks
revīzija
bbeb8e29f0

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/views/SideMenu.java Parādīt failu

72
                 sideMenuParams.navigationParams);
72
                 sideMenuParams.navigationParams);
73
 
73
 
74
         DrawerLayout.LayoutParams lp =
74
         DrawerLayout.LayoutParams lp =
75
-                new LayoutParams((int) ViewUtils.convertDpToPixel(240), ViewGroup.LayoutParams.MATCH_PARENT);
75
+                new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
76
         lp.gravity = Gravity.START;
76
         lp.gravity = Gravity.START;
77
         addView(sideMenuView, lp);
77
         addView(sideMenuView, lp);
78
     }
78
     }

+ 1
- 0
example-redux/src/screens/BottomTabsSideMenu.js Parādīt failu

79
 const styles = StyleSheet.create({
79
 const styles = StyleSheet.create({
80
   sideMenu: {
80
   sideMenu: {
81
     flex: 1,
81
     flex: 1,
82
+    width: 260,
82
     backgroundColor: '#efefef',
83
     backgroundColor: '#efefef',
83
     padding: 20
84
     padding: 20
84
   },
85
   },

+ 1
- 1
example-redux/src/screens/LoginScreen.js Parādīt failu

47
           <Text style={styles.button}>Show another login as modal</Text>
47
           <Text style={styles.button}>Show another login as modal</Text>
48
         </TouchableOpacity>
48
         </TouchableOpacity>
49
 
49
 
50
-        // TODO: Uncomment when fixed -guyca
50
+        {/* TODO: Uncomment when fixed -guyca */}
51
         {/*<Text style={{fontWeight: '500'}}>Function prop: {this.props.fn()}</Text> */}
51
         {/*<Text style={{fontWeight: '500'}}>Function prop: {this.props.fn()}</Text> */}
52
         <Text style={{fontWeight: '500'}}>String prop: {this.props.str}</Text>
52
         <Text style={{fontWeight: '500'}}>String prop: {this.props.str}</Text>
53
         <Text style={{fontWeight: '500'}}>Number prop: {this.props.num}</Text>
53
         <Text style={{fontWeight: '500'}}>Number prop: {this.props.num}</Text>