android-4.4-kitkat

How to create a background selector that has Kitkat style for pre-Lollipop, and native one for Lollipop and above?

此生再无相见时 提交于 2019-12-10 11:49:15
问题 This question is short. How do I set a background for buttons and such, that will have the native look&feel of Lollipop (ripple etc...) for Lollipop and above, and Kitkat style for Kitkat and below? I ask this to make this library look better: https://github.com/AndroidDeveloperLB/MaterialPreferenceLibrary 回答1: I think this is possible by declaring the different 'styles' in the corresponding 'values' folder. I think the following link can help: http://developer.android.com/training/material

Flexbox isn't working in android web browser in Android 4.4.2

£可爱£侵袭症+ 提交于 2019-12-10 11:35:27
问题 There's this website I've been working on for a client of mine and I've been working on the mobile layout. I decided to use a flexbox layout for the overall website, but for some odd reason, the stock android web browser for 4.4.2 isn't loading any of my elements that are using flexbox. Chrome for Android loads all my elements using flexbox just fine. I can't be too sure of what's happening, but any help that can be given would be great. All my code is on "hoopactivation.x10.mx" if you use

Switch off Tap-Highlight-Color on Android 4.4 WebView component

雨燕双飞 提交于 2019-12-10 10:59:12
问题 We use the css property -webkit-tap-highlight-color: rgba(0, 0, 0, 0); to switch off the border around a touch selection in the WebView. But this seems to no longer work with the new Chromium WebView component in Android 4.4. Anyone an idea how to switch off the tap highlight color in the new WebView component? 回答1: -webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: 0; try using both. 来源: https://stackoverflow.com/questions/19813648/switch-off-tap-highlight-color-on-android-4-4-webview

How to handle drag-to-select of sub-menu items on Kitkat?

…衆ロ難τιáo~ 提交于 2019-12-10 10:44:16
问题 Background I have an app which has sub menus in the action bar, for selecting the sorting type. It works really well if you just tap the action items. Here's how a submenu looks like on the actionBar: The code To make it easy to understand what I did, here's a short, simple version of just the sub menu part: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com

Making successful Bluetooth connections in Android

落爺英雄遲暮 提交于 2019-12-10 10:08:04
问题 I am mystified by two approaches to making BT connections in Android. This is what I have done for as long as I can remember, and it has worked from 2.3+ devices to early 4.x. This what the Android docs describe as well. private static final UUID sppUUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); bluetoothSocket = bluetoothDevice.createRfcommSocketToServiceRecord(sppUUID); bluetoothSocket.connect(); This has ceased to work on some newer Androids (Nexus 7 running 4.4),

Receive MMS messages in Android KitKat

六月ゝ 毕业季﹏ 提交于 2019-12-10 09:34:42
问题 So this video Android 4.4 SMS APIs from #DevBytes explains the recent changes to the SMS APIs in KitKat. They also provide a link with a sample project. http://goo.gl/uQ3Nih They suggest that you handle the receive of an MMS in a service. Which all looks fine, except they neglect to mention the most undocumented piece. How to actually handle an incoming MMS. Here is the sample from the project https://gist.github.com/lawloretienne/8970938 I have tried to "handle the MMS" https://gist.github

Custom Alert Dialog looking weird on Android 4.x

孤者浪人 提交于 2019-12-10 03:31:20
问题 I want to customize the alert dialog in my Android app, so I started by changing the alertDialogTheme attribute of my app's theme as follows: res/values/themes.xml <resources> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="android:alertDialogTheme">@style/AlertDialogTheme</item> </style> <style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert"/> </resources> Just by doing that, I didn't expected the dialog to look differently from the

How to parse a none standard HTTP response?

空扰寡人 提交于 2019-12-10 02:39:51
问题 I'm having a real hard time figuring out how to parse a none standard HTTP response. The none standard response contains ICY 200 OK instead of HTTP 200 OK . Here is a sample URL that sends the none standard HTTP response. http://50.117.121.162:80 Since Android 4.4 HttpURLConnection will no longer work with these none standard responses. I have tried using the HttpClient by Apache but it doesn't work because of the none standard HTTP response. I have then tried following the guide for adding a

BLE Device disconnect with Android device automatically. Android BLE

99封情书 提交于 2019-12-10 01:59:02
问题 I'm using Android Nexus 7 to connect a device via Bluetooth Low Energy link. I'm able to connect the device, and stay connected if I don't do any communication with the device. However, if I enable the notification of one specific characteristic by clicking a button, then the device would disconnect with the tablet after a few seconds' data transmission. Does anyone know what might be the problem? Thank you very much! Here's my code: public boolean setCharacteristicNotification(boolean

Unable to find System Image in Emulator in Android Studio with Google APIs

旧时模样 提交于 2019-12-10 01:56:54
问题 I want to run in Emulator a System Image with Google APIs installed. I downloaded the System Images for API Version 19 (among others). When I go to start a new AVD in Android Studio, for API = 19 - I am not seeing the image with Google APIs. It should be there because I did download it using the SDK Manager (see screen clippings below). Am I missing something? See below screen in AVD Manager showing that the Kitkat does not have an image with Google APIs. 回答1: Please try the following