mobile

OnClick event is not working in mobile browser

試著忘記壹切 提交于 2019-12-23 06:40:07
问题 I have a html page in which i have added onclick event in div tag. In that onclick event i have used location.href = url to open any url. It is working fine in web browser but is not working in mobile browser. What is the reason for this ? My Code is - <html class="swipebox-html swipebox-touch"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title></title> <link rel="stylesheet" href="../css/swipebox.css"> <script src="../js/jquery-2.1.0

How to set size of MARGINS in GridLayout

一世执手 提交于 2019-12-23 06:29:38
问题 I am adding ImageButtons one at a time to a GridLayout using RecyclerView. My app listens for incoming images and strings to label the buttons. I want to add a margin to the right of each button and text, so the words don't run into each other (like my image below). 回答1: No, these are not the sort of things an adapter is for. Set margin or padding (you probably want padding) inside your XML layout file. You can set android:paddingRight or android:paddingEnd in the XML declaration of the view.

How to set size of MARGINS in GridLayout

拥有回忆 提交于 2019-12-23 06:27:25
问题 I am adding ImageButtons one at a time to a GridLayout using RecyclerView. My app listens for incoming images and strings to label the buttons. I want to add a margin to the right of each button and text, so the words don't run into each other (like my image below). 回答1: No, these are not the sort of things an adapter is for. Set margin or padding (you probably want padding) inside your XML layout file. You can set android:paddingRight or android:paddingEnd in the XML declaration of the view.

How to communicate with mobile devices using Bluetooth in j2me?

安稳与你 提交于 2019-12-23 05:31:08
问题 I need to develop a project based on Bluetooth in mobile. Since I am new to j2me I studied some of the articles and run the project until the discovery of devices and services. I need to communicate between devices and transfer the desired files. I search code for client server communication through Bluetooth and got it but I didn't know how to run those code and implement further. I have go through articles and I can run client server communication. Now I need to transfer the file and

Detect swipe gesture using javascript

拜拜、爱过 提交于 2019-12-23 05:29:16
问题 Hi I want to know how I can detect a swipe gesture using javascript. I dont want to use a separate library for this since I have the event object from my javascript callback at my disposal, which has everything I need such as deltaX, deltaY & absDeltaX & absDeltaY. My problem is what bounds do I need to set so that I can differentiate a swipe gesture from other gestures such as scrolling. This is a problem because sometimes when a user tries to swipe across the screen they also create a

Phonegap / Converting website for mobile use

瘦欲@ 提交于 2019-12-23 05:17:54
问题 Currently I am building an app using phonegap for the Android and iOS systems. Essentially, it will be a website but I am running into some difficulties due the cross domain requests I need to make via ajax (same origin policy). Im wondering if its better to make the website on my own servers, where PHP is allowed, and then use a wrapper/frame in phonegap to emulate the site? How would that work? Help appreciated 回答1: You shouldn't be having this problem at all. PhoneGap apps are loaded on

It's possible for a mobile app connect to a BLE device and keep the connection alive for hours in background?

ⅰ亾dé卋堺 提交于 2019-12-23 05:13:16
问题 We have a device that need to be started at night, the device is started thanks to a bluetooth command sent by a mobile application. It's possible to send this command while the app is in the background and keep monitoring the device (i.e. receiving data), for example, for 30 minutes? If it's possible what would be the ways to implement this feature in iOS and Android? Update: Think about a sleep tracking device; the problem shouldn't be to scan all night because the user must connect the

Trying to make mobile Nav Menu with only CSS

风格不统一 提交于 2019-12-23 05:07:28
问题 I have been working on this website and am using media queries to adjust the layout of the view according to the screen size. For the mobile phone size I want to hide the navigation that is already in place and just show a simple "Menu" link that when clicked, displays the Nav Menu. I having been doing research, however I am looking for the simplest way possible with the code that I have. Any ideas would be greatly appreciated. I would like to stay away from javaScript if possible. <nav> <ul>

Mobile HTML: keep scrolling after touch is ended

不打扰是莪最后的温柔 提交于 2019-12-23 04:42:00
问题 I created a HTML list that I show on mobile devices: <ul> <li>...</li> ... </ul> When I touch display and start moving my finger this long list will be also scrolled. However, what I want to achieve is that when I move my finger away from the screen, this list should still scrolling for a moment. If you start iPhone 5S native email client, you can see such effect. Right now, if I move my finger from the screen, iPhone stop scrolling immedeately and it doesn't feel good from usability point of

Pure CSS mobile menu: Hiding content while contracting

安稳与你 提交于 2019-12-23 04:34:47
问题 Expanding on the pure CSS morphing mobile menu from http://www.scottohara.me/article/morph-button-updated.html -- how does one hide the expanded menu while collapsing? It looks a bit ugly when the content is still present during the animation. http://codepen.io/anon/pen/PwEBaM *, *::after, *::before { box-sizing: border-box; font-family: arial; line-height: 2; margin: 0; } body { background: #444; overflow-x: hidden; } p { margin-bottom: 24px; } p:last-child { margin-bottom: 0; } .content {