I play with the iPhone application interactively, and I would like the view to fill the screen in width and maintain a square aspect ratio. Thus, the height should be equal to the width. I can't seem to find a way to achieve this. Another option is to specify a specific width and height, but I don't see a way to request the width of the device from within native-native to allow me to do this. Any pointers?
Hope you are looking for this ...
var Dimensions = require('Dimensions'); var device = Dimensions.get('window'); var styles = StyleSheet.create({ squareBox: { width: device.width, height: device.width, } );
Source: https://habr.com/ru/post/1619804/More articles:Open my application from the link - androidHow to enable webpage scaling for linear layout in Android? - androidAngularJS, Flyer. How can I get lat and lon coordinates dynamically from a third-party service? [problem resolved] - jsonHow to create a dialog with jQuery that disappears after 3 seconds? - javascriptImageViews are invisible if Viewgroups dispatchDraw method is overwritten in android - androidPrinting backslashes in exec () - phpCan I generate navigation from a folder structure using Jekyll? - jekyllМасштабирование GMSMapView для соответствия маркерам GMSMarker? - ioshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1619808/angular-ui-router-dynamic-states-on-refresh-goes-to-404&usg=ALkJrhiXLME0kroA0FgQg7p_DCCmdODk-wJQuery Click event only works once - javascriptAll Articles