hybrid-mobile-app

Disable download in React native WebView

本秂侑毒 提交于 2020-12-13 04:46:26
问题 I am using a React Native WebViw in my app. I want to disable download of files. Mostly just documents. I cant disable storage permissions as certain features in the app need this feature. 回答1: You can achieve this by injecting a javascript, with the help of controlsList="nodownload" property check below reference code for video file: <WebView style={{ height: this.props.videoPlayerHeight, width: this.props.videoPlayerWidth, backgroundColor: 'black', }} allowsFullscreenVideo={true}

Ionic ion-modal height with keyboard bug

一个人想着一个人 提交于 2020-06-17 07:19:07
问题 I have a ion modal which i want to show of 60% of my screen, but when keyboard appears the modal resizes to 60% of the screen (including keyboard) so it shrinks a lot. I want the modal to stay the same size (ideally the size of its contents). Pictures explain a lot. This is the css .ion-modal.modal { width: 90%; min-height: 0 !important; height: 60% !important; top: 5%; left: 5%; right: 5%; bottom: 5%; background-color: #fff; -webkit-box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); box-shadow:

Is there is way to set a font globally in react native?

老子叫甜甜 提交于 2020-05-15 08:16:34
问题 Is there is a way to set a font globally in react native? what I need to do is a custom font that applies every Text component in the whole application. Your help is extremely appreciated, Thanks 回答1: One way is to create a wrapper for RN Text say MyTextCustomFont: const MyTextCustomFont = (props) => { return ( <Text style={{fontFamily:'myFont'}} {...props} >{props.children}</Text> ) } import this MyTextCustomFont and use anywhere. Another way is to define a style object and use it wherever

Display inside an iframe a html file located outside of the www folder — works in InAppBrowser or parsing the text

孤街浪徒 提交于 2020-05-05 04:49:22
问题 I managed to download some On-Demand Resources into my Cordova App using a custom plugin that I built. What I need to do now is load them inside an iframe in my App. Is this possible?? If they were located in the (sigh, read-only) www folder I could simply point to ${cordova.file.applicationDirectory}/www/game.html ...but being them in the Library folder (eg. see path below) is there a way to display them inside an iframe? ('/var/mobile/Library/OnDemandResources/AssetPacks/2F2887A0-7B16-4S5D