Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable zoom on web-view react-native?

How to disable zoom on react-native web-view,is there a property like hasZoom={false}(just an example) that can be included in the below web-view tag that can disable zooming. It has to be working on both android and ios.

<WebView      ref={WEBVIEW_REF}      source={{uri:Environment.LOGIN_URL}}      ignoreSslError={true}      onNavigationStateChange={this._onNavigationStateChange.bind(this)}      onLoad={this.onLoad.bind(this)}      onError={this.onError.bind(this)}  ></WebView>  
like image 463
Amal p Avatar asked Jun 19 '17 08:06

Amal p


People also ask

How do I disable zoom in react-native Webview?

Show activity on this post. How to disable zoom on react-native web-view ,is there a property like hasZoom={false} (just an example) that can be included in the below web-view tag that can disable zooming.

How do you zoom in react-native?

A view component for react-native with pinch to zoom, tap to move and double tap to zoom capability. You can zoom everything, from normal images, text and more complex nested views.


1 Answers

Thought this might help others, I solved this by adding the following in the html <head> section:

<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0">

like image 100
shahonseven Avatar answered Oct 02 '22 15:10

shahonseven