mobile

Prevent only horizontal scrolling mobile app

為{幸葍}努か 提交于 2019-12-09 23:29:40
问题 I'm developing an web app. On the left side is an sidebar using the Sidr-plugin (jQuery Plugin: Sidr). The test site is on my developing server. My problem is that if I'm swipe from left-to-right the sidebar is displayed. That's very good. But if I want to close the sidebar by swiping from right-to-left I must prevent the scrolling by add this following code: $('body').bind('touchmove', function(e){e.preventDefault()}) I did that, but now: My navigation in the top of the page (menu) doesn't

jquery Mobile urls add # tag which breaks forms in Internet Explorer

半腔热情 提交于 2019-12-09 23:00:57
问题 Hi guys my problem is that I have a jquery mobile site with links like normal e.g <a href="http://mysite.com/login">Login</a> Now when they go to that page in firefox etc it goes to http://mysite.com/#login Then the browser kicks in and removes the # so it goes to http://mysite.com/login The problem is that in Internet Explorer this doesn't happen and that it displays (in this case) the login form but the post doesn't want to work and just goes back to the homepage so http://mysite.com I've

detect if a touchstart/touchend has cancelled a scroll (momentum scroll)

穿精又带淫゛_ 提交于 2019-12-09 21:25:01
问题 i listen for touchstart and touchend events to make my app more responsive for mobile. the problem is, if you 'flick scroll' (the page is still scrolling even after finger has left screen), and then stop the scroll with a tap - if there is an event on touchend attached to the element you tapped, it will fire. I need a way to detect if the touchstart or touchend has stopped a scroll, so i can stop any events firing. I tried setting a variable on scroll (i noticed scroll event on mobile only

拥抱 Android Studio 之二:Android Studio 与 Gradle 深入

一笑奈何 提交于 2019-12-09 19:14:11
关于学习方式 曾经跟朋友讨论过我们所接受过的大学工科教育,都是一上来先学基础理论,最后再来一个金工实习。一开始不知道为什么而学,学不进去,荒废了基础,等到金工实习的时候,又发现基础不牢,后悔不已。 考虑到传统教育方式的不足之处,笔者在组织本系列文章的时候是先讲入门实例,进而学习 Gradle 和 Groovy 基础原理,最后学习进阶实例。 上篇文章介绍了从 ADT 迁移到 Android Studio,相信经过很短时间的使用之后,已经开始熟悉和爱上 Android Studio 了。基础的功能我就不讲了,下面列举一些较为深入又比较实用的功能。 Android Studio 相关功能介绍 文件夹组织视图 最常用的有 Project 和 Android 视图,前者按照项目文件树进行组织,后者是以 Gradle 构建文件作为核心进行组织: Gradle 相关文件结构 让我们来观察一下Android Studio 中 Gradle 相关的结构: . ├── gradle │ └── wrapper //所使用的 Gradle 包装器配置 ├── .gradle //所使用 Gradle 版本 │ └── 2.8 ├── AsInDepth.iml ├── app //app module │ ├── app.iml │ ├── build │ ├── build.gradle //app

Need to limit access to a mobile website to specific registered mobile devices

拜拜、爱过 提交于 2019-12-09 19:13:23
问题 I've researched a ton and can't seem to find a solution for how to limit access to a secure mobile website to ONLY PREVIOUSLY REGISTERED devices. I already have a secure login in-place, but we must also insure that ONLY registered devices access the site. We cannot have users sharing login information with others and allowing others to login and use the protected information. Is there anyway to do this? I've looked at trying to acquire the devices MAC address using JavaScript, PHP, or

How to get a PhoneStateListener when using Dual SIM functionality

故事扮演 提交于 2019-12-09 18:45:51
问题 so I am currently implementing a call forwarding feature in Android, for dual SIM devices. In order to read the current state of the call forwarding (enabled/disabled) for a SIM card, I do the following: I create a TelephonyManager object: val telephonyManager = getSystemService(TELEPHONY_SERVICE) as TelephonyManager I create a PhoneStateListener object and override the onCallForwardingIndicatorChanged method: val myPhoneStateListener = object: PhoneStateListener() { override fun

Change website design for mobile devices or browser resize

放肆的年华 提交于 2019-12-09 18:33:54
问题 Im sorry if this has been asked before im sure somewhere there must be an answer for this but for some or other reason I cant find it, probably using wrong search query I know you can use media queries to target different devices like so: @media only screen and (max-device-width: 480px) { div#wrapper { width: 400px; } } But what I would like to know is, how to change my websites design based on device it is viewed on? Example Lets say my normal site structure is like this: if desktop <div id=

large Iconfont icon cut off on the right side

半腔热情 提交于 2019-12-09 17:30:12
问题 I'm using a large Icon from an icon font my client delivered as a header logo on the index page of a web app. The logo is as large as 60% of the device width and consists of a large round logo (about 40% of the icon) with text below and as wide as 60% of the device in portrait mode. I got the logo with text as one vector icon font icon because the customer want's the text to be exactly as the brands CI demands. _____###_____ ____#####____ _____###_____ Slogan is here It looks alright on the

Best way to retrieve/format data using Firebase Java API

☆樱花仙子☆ 提交于 2019-12-09 17:01:10
问题 I'm using Firebase for data storage on an Android project, and using the Firebase Java API to deal with data. I'm not sure I'm doing it as efficiently as possible, though, and I'd like some advice on best practices for retrieving and formatting data. My Firebase repository looks something like this.... -POLLS NUMPOLLS - 5 (pollskey) - NAME - Poll1 NUMELECTIONS - 2 ELECTIONS (electionskey) - NAME - Election1 NUMNOMINATIONS - 2 NUMVOTERS - 2 NUMBERTOELECT - 1 VOTERS - (votesrkey) - NAME -

Force Numeric Keyboard for Mobile Device

杀马特。学长 韩版系。学妹 提交于 2019-12-09 16:02:42
问题 This is not a "mobile" website. It is regular HTML/CSS. Is there a way I can force mobile devices to popup with the numeric keyboard when they focus on my textboxes? 回答1: We've had the best luck with using a combination of type="number" and pattern="\d*" . We've seen success on iOS and Android devices, although I don't have a list of OS versions to share here. <input type="number" pattern="\d*" name="year"> 回答2: Its called "-wap-input-format". You can use it in your css or in style element