Browse Source

Define SideMenu width in JS

Guy Carmeli 8 years ago
parent
commit
bbeb8e29f0

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/views/SideMenu.java View File

@@ -72,7 +72,7 @@ public class SideMenu extends DrawerLayout {
72 72
                 sideMenuParams.navigationParams);
73 73
 
74 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 76
         lp.gravity = Gravity.START;
77 77
         addView(sideMenuView, lp);
78 78
     }

+ 1
- 0
example-redux/src/screens/BottomTabsSideMenu.js View File

@@ -79,6 +79,7 @@ class SideMenu extends Component {
79 79
 const styles = StyleSheet.create({
80 80
   sideMenu: {
81 81
     flex: 1,
82
+    width: 260,
82 83
     backgroundColor: '#efefef',
83 84
     padding: 20
84 85
   },

+ 1
- 1
example-redux/src/screens/LoginScreen.js View File

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