android-4.4-kitkat

VelocityTracker causes crash on Android 4.4

随声附和 提交于 2019-12-10 01:29:02
问题 In my app I have a custom implementation of a drawer layout. It works fine on Android 2.3 & 4.0.4 but on Android 4.4 it crashes almost every time I open or close the drawer. Here is the error log : E/AndroidRuntime( 9839): FATAL EXCEPTION: main E/AndroidRuntime( 9839): Process: com.andryr.launcher, PID: 9839 E/AndroidRuntime( 9839): java.lang.IllegalStateException: Already in the pool! E/AndroidRuntime( 9839): at android.util.Pools$SimplePool.release(Pools.java:112) E/AndroidRuntime( 9839):

ImageView scaleType=“fitXY” is not working in pre-lollipop device inside the Cardview | Android

故事扮演 提交于 2019-12-09 12:38:24
问题 I have ImageView which is inside the CardView as below in my code. My ImageView scaleType="fitXY" is not working on pre-lollipop devices.But it looks better on Lollipop devices. Please look at below images. As we see in above image there is white padding around the imageview which i want to remove, I want to look alike image on both pre-lolipop and post lolipop devices. Please help me to short out from the problem. Thanks :) <android.support.v7.widget.CardView android:layout_width="match

Android Material Design

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 12:07:44
问题 Does the new Android Material Design support old version of android such as 3.0 or 2.1? if it supports how would it look like? as a real material design or just as old design? I am about to update my app with material design theme so is there anybody who already has done this? 回答1: As far as material design as a concept goes, yes you can do it all today. Some aspects of it would require a lot more work on your part (for example, imitating the new action bar design guidelines), whereas some

Hide sms notifications with a broadcastreceiver in KitKat

做~自己de王妃 提交于 2019-12-09 07:20:16
问题 I'm trying to intercept the received SMSs by using a broadcast receiver. Here is the code: <receiver android:name=".receivers.SmsReceiver" android:enabled="true" android:exported="true" android:priority="999"> <intent-filter> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> </intent-filter> </receiver> and: public class SmsReceiver extends BroadcastReceiver { private static final String SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED"; @Override public void onReceive

Android WebView (4.4) Converts Custom URL

混江龙づ霸主 提交于 2019-12-09 04:27:42
问题 I have an app that heavily uses the Android WebView to display my custom HTML content. The latest Android update (4.4/Kit-Kat/SDK-19) featured a redesigned WebView . One of my users with a Nexus 5 reported a problem where some links cause the app to crash. I ran in the 4.4 emulator and debug into my WebViewClient 's shouldOverrideUrlLoading() method. On all previously tested Android versions (2.2-4.3) the url String passed into the method had my custom url with "/" characters in it. In 4.4

Loading javascript functions to webview in Android Kitkat

北城余情 提交于 2019-12-08 23:31:26
I am having problems with loading javascript functions, which are in external file, into webview in Android Kitkat. My approach for earlier versions was that i implemented my own webview client and in method onPageFinisned i called mWebView.loadUrl("javascript:" + functions); later, when i wanted to call some js method, i call same code, like mWebView.loadUrl("javascript:" + someFunction); In android kitkat there is new method evaluateJavascript, which replaces my code with calling that javascript functions. My problem is that now this and old approach throw this error: Uncaught ReferenceError

How to ignore font-size setting changes for Cordova App when runs on Android 4.4+?

蹲街弑〆低调 提交于 2019-12-08 17:28:33
问题 I've developed Cordova App with Cordova Version 3.6.3 and JQuery. The only one problem that i still can't get the best solutions is when i test my app on Android 4.4+ and there are users who love to change font size in setting > display > font-size of their device to be larger than normal. It causes my app layout displays ugly (the best display is when the font-size setting is normal only). But there is no effect of font-size setting for Android older than 4.4 (4.3,4.2...) So the app displays

Android 4.4 - create application dir on secondary sd card

别来无恙 提交于 2019-12-08 13:14:25
I am aware about changes in Access to SD card introduced by Google with Android 4.4. However in my application I need to be able to store data on some removable /secondary sd card. When I create the application folder (app.xyz.com) on the secondary using default file manager then I am able to create dirs and files inside. But by default such dir dosen't exist on secondary sd card. So, I would like to create the application specific dir programmatically inside my application… Do you have any idea how to do this??? Simple file.mkdirs(), even with the correct application related path, doesn’t

Step counter in Android

天涯浪子 提交于 2019-12-08 09:10:38
Recently I tried to make an app which gives user step count. And came across step count and detector which was introduced in Android 4.4. but I can't find a way to do step counting hourly basis. I am new to this any guidance will be highly appreciated I found on this https://developer.android.com/reference/android/hardware/SensorManager.html#registerListener(android.hardware.SensorEventListener , android.hardware.Sensor, int) That editing the third parameter I can specify delay while doing following boolean registerListener (SensorEventListener listener, Sensor sensor, int samplingPeriodUs)

Starting activity shows black flash

微笑、不失礼 提交于 2019-12-08 06:05:31
问题 When I am trying to start second activity from the first one, but it shows me black screen before showing new activity layout. Here is my code: Intent intent = new Intent(MessagesActivity.this, MessageTextActivity.class); intent.putExtra("Sender", items.get(position).subject); intent.putExtra("Date", items.get(position).date); intent.putExtra("Text", items.get(position).text); intent.putExtra("Position", position); startActivity(intent); On Android other than KitKat when I add in manifest