mobile

Mobile Application Error when loading from stream

做~自己de王妃 提交于 2019-12-22 12:08:12
问题 I'm doing my first application for mobile in delphi and I have a problem and can not fix it. I have a procedure running in which I load a csv file from the resource. When I throw this procedure, on a mobile device (I could only test it on Android) I get this error: 'No mapping for the Unicode character exists in the Target multi-byte code page', no error in 32-bit Windows. Here is the code, Rad Studio XE6: procedure TContactos.LoadFromResource; var FicheroEntero, Linea: TStringList; rs:

Efficientway to Save/load List items to text file android

梦想的初衷 提交于 2019-12-22 11:27:16
问题 Hi All does anyone have a Efficient way to Save and load list view array items to a text file how would you integrate save and load into this code ? I have some direction for example for save to text. File f = File.createTempFile("file", ".txt",Environment.getExternalStorageDirectory ()); FileWriter fw = new FileWriter(f); fw.write(m_listItems); fw.close(); All i want to do is have the ability save and load the list items that i add to the listview Any help would be much appreciated . I'm

“adjustResize” Android

社会主义新天地 提交于 2019-12-22 11:21:02
问题 I have an app that runs fullscreen by using: getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); Because of this the layout, android:windowSoftInputMode="adjustResize" is not working properly, i.e. it dose not resize. Is there any way to get over the problem? 回答1: Instead of android:windowSoftInputMode="adjustResize" you can try with android:windowSoftInputMode="adjustPan" 回答2: FYI: This is an existing AOSP (Android Open Source Project)

Same origin policy on mobile apps

白昼怎懂夜的黑 提交于 2019-12-22 10:29:18
问题 I've been researching this issue and I can't find an answer that satisfies me. I'm very aware of the same origin policies as they apply to websites in a standard web browser. My question came up when I started developing a mobile app that uses the native webview and loading in site content with jQuery's .load method. Typically in a standard web browser I would get an XHR load error. So, what are the rules regarding native apps and cross origin policies? 回答1: Robot Woods is definitely on the

iPhone 4 mobile web app pixel scaling issues

99封情书 提交于 2019-12-22 09:42:33
问题 I'm having trouble getting my mobile web app to render properly on my iPhone 4. According to Wikipedia, the iPhone 4 has 960 width x 680 height pixels and the other iPhones have something like 480 width x 340 pixels. With my current build, the images and CSS styling look really tiny on the iPhone 4. Here is my code: <!DOCTYPE html> <html> <head> <title>mobile</title> <link rel="stylesheet" type="text/css" href="iphone.css" media="only screen and (max-width: 480px)" /> <link rel='stylesheet'

change font size of button text in jQuery mobile

主宰稳场 提交于 2019-12-22 09:38:34
问题 I have 2 jQuery mobile buttons inside a fieldset and would like to change the font-size of one of the buttons. I have tried adding an inline style but that did not work. I have also tried this but that did not work as-well: .myButton { word-wrap: break-word !important; white-space: normal !important; } This is what is happening: (only on the iPhone) Because the screen size of the iPhone, the "Request Change" button is being cut-off. Is there a way for me to change the font-size of the button

wap/wml still relevant in 2011?

蓝咒 提交于 2019-12-22 08:58:19
问题 To my surprise I couldn't find a short and clear answer for this question. Is WAP/WML still relevant for todays mobile web/app development? Regards, Milanko 回答1: WML is obsolete, and only used by a very small (<5%, maybe less) of active mobile devices. WAP 1.0 is similarly obsolete, but WAP 2.0 is still very much alive and kicking. 2.0 specifies XHTML Mobile Profile as its markup, which is a cut down version of full XHTML. Crudely put, WAP 2.0 is really just a specified combo of HTTP and

Is there a way of detecting if the browser will freeze the DOM while scrolling?

守給你的承諾、 提交于 2019-12-22 08:49:53
问题 Is there a way of detecting if the browser will freeze the DOM or disable JavaScript while scrolling? It's known that some mobile browsers do this, and it effectively kills scrolling-based effects like parallax and animations. I'd like to effectively implement the following pseudocode without resorting to UA sniffing: if (!browserWillFreezeWhileScrolling) { initializeScrollingEffects(); } else { initializeFallbackScript(); // maybe unnecessary } From what I can see, Modernizr doesn't check it

Mobile version of site using CodeIgniter

倾然丶 夕夏残阳落幕 提交于 2019-12-22 08:31:13
问题 What I want to do is to create a mobile version of my web site in CodeIgniter. I want to redirect my complete web site to m.example.com There will be no change in controllers, neither in views and models. Both will be the same. I don't want to change my .htaccess file. Any possible solutions for this? 回答1: The user agent class has a function; $this->agent->is_mobile(); You could use this in the construct of your base controller(s) to test if mobile. 回答2: Instead of rewriting your code all

How to remove focus from a ion-input in Angular 2+/Ionic2+

好久不见. 提交于 2019-12-22 08:30:08
问题 It is possible to set focus using setFocus method from nativeEloment. But how about remove focus? How could I remove the cursor from and unselect an input from a template in a Angular 2+/Ionic 3 app? I need to remove the focus because the mobile keyboard keeps open while a input has focus. Edit: The input is a ion-input of Ionic2+. 回答1: 1) Add a template variable reference to your input in your component's template: <ion-input #textInput> 2) Add ElementRef and ViewChild to your component's