mobile

How do I get the new dimensions of an element *after* it resizes due to a screen orientation change?

旧城冷巷雨未停 提交于 2019-12-10 19:27:50
问题 I'm working on a mobile web app, and in my page I have a div element with its width set to 100%. I need to set the height of this div so that the height is correct for a set aspect ratio. So for example, if the screen was sized to 300 pixels wide and the ratio was 3:2, my script should grab the width of the div (which at this point should be 300px) and set the height to 200px. On first load, this works perfectly. However, if I rotate the screen of my phone to landscape, the width of the div

How to play video which is at some URL location in android's video view?

不打扰是莪最后的温柔 提交于 2019-12-10 19:08:17
问题 I am trying to play youtube video within video view but getting error(can't play this video) all the time(on device as well as on emulator too). Please help me with this problem. Thanks in advance. import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.widget.VideoView; public class AndroidVideoView extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); VideoView

Symbian: Is it possible to get access to a list of contacts through an application?

天大地大妈咪最大 提交于 2019-12-10 18:59:02
问题 There are at least two ways that I know of to write a Symbian application: 1. J2ME 2. A native application. My question is, does the SDK/API for either of those methods (or any other method) grant me (at least) read-only access to contact information (names/numbers/etc) on the phone itself? Does this in any way depend on the specific phone being used? 回答1: In C++, you can use e.g. the Contacts Model API. There's an example in Forum Nokia. In J2ME, you need to be working on a phone that has

Given a list of words - what would be a good algorithm for word completion in java? Tradeoffs: Speed/efficiency/memory footprint

纵饮孤独 提交于 2019-12-10 18:41:43
问题 I'm exploring the hardware/software requirements (ultimate goal is mobile Java app) for a potential free/paid application. The application will start with this simple goal: Given a list of relevant words in a database, to be able to do word completion on a single string input. In other words I already know the contents of the database - but the memory footprint/speed/search efficiency of the algorithm will determine the amount of data supported. I have been starting at the beginning with

Split Table Row(s) for smaller screens

若如初见. 提交于 2019-12-10 18:16:20
问题 I have a table with fixed width of 960px with 5 columns. When I view in a mobile device, I'd like to make columns 3,4,5 to appear as if it is on the next row. Is there any way the CSS can break a row so it looks this, but still keep the original HTML code? 回答1: You could use FlexBox: .flexParent{ display: flex; } .flexChild{ width: 20%; } @media only screen and (max-width: 767px) { .flexParent{ flex-wrap: wrap; } .flexChild{ width: 50%; } .wrap{ width: 30%; } } <div class="flexParent"> <div

Ionic Native HTTP does not work for Anroid 9 (Pie) and up?

蓝咒 提交于 2019-12-10 17:59:56
问题 I've created an app that connects successfully to our server using Ionic Native HTTP, testing it with Samsung Galaxy J7 Prime OS version Marshmallow and several others that were not yet under Android Pie. For some reason, when I tested it with a device under Android Pie, it won't work anymore and I'm receiving CORS policy issues. Has anybody encountered a similar issue? Is there a workaround for this? Unfortunately, modifications within the server config is not an option. I've also read some

Add content to Panel Dynamically

谁都会走 提交于 2019-12-10 17:56:51
问题 it might be the case that my javascript capabilities are not sufficient :). I am trying to enhance a list (add items via javascript) to a jquery mobile panel on the fly. The code below is a working (non-working) example of the functionality. The complete project would be a bit too much overhead (and you need some serial connected devices to run it). It adds nicely an entry to the list, but does not render it in the proper style. Is there are trick that I am missing? <!DOCTYPE html> <html>

How can I create a CSS border on a diagonal element

余生长醉 提交于 2019-12-10 17:47:36
问题 Here is an example. http://jsfiddle.net/52c7t/ Simply: I'm trying to get the div on the right side, to have a border like the div on the left. (I'd want the border to be on the left side of the right div) I tried a million different combinations and haven't been able to do it. I was trying to avoid making an image and do this with css. Thanks for your help! UPDATE: Image of what I mean. Sorry about my graphic design skills :P http://i.imgur.com/pGSnL.png HTML <div id = "top_bar"> <div id="top

How to run mobile version of a website?

孤街浪徒 提交于 2019-12-10 17:24:47
问题 There are two common ways to run mobile version of a website: Detecting the mobile browser by server-side scripting to display mobile theme. Having a separate subdomain such as m.domain.com or mobile.domain.com. Which is better in action? In both cases, I think mobile search engines fairly index the mobile website. What are pros and cons for each method? 回答1: Option 1: This is more user-friendly for a few reasons. The biggest is probably link sharing and bookmark syncing. If a user on a

Can I have more than 320px content in an iPhone, using viewport tag with device-width and initial-scale = 1?

房东的猫 提交于 2019-12-10 17:24:12
问题 I'm developing a website that I want to feel "appy", for users that'll access it through phones, tablets, and desktop PCs. I'm using jQuery Mobile for that. For some reason, jQuery mobile requires a viewport tag with "width=device-width, initial-scale=1". If I choose any other width, any other initial-scale, or I remove either, then jQuery mobile behaves horribly bad. (transitions look jerky, things jump up and down, it's horrible). Now, 320px is a bit narrow for my content, and I was kind of