android-4.4-kitkat

AppCompatButton android:onClick Could not find a method exception

落爺英雄遲暮 提交于 2019-12-21 04:58:30
问题 I have this problem just on KitKat version, the rest from 16 API level to 25 works fine the class that instantiates the layout have the method of the layout, example <android.support.v7.widget.AppCompatButton android:onClick="onClick" ... public void onClick(View v) { // do something } I know I can change this to listeners, databindings or use some library like Butterknife, but I'm interested in know why just crash on 4.X versions? xml layout <?xml version="1.0" encoding="utf-8"?>

Stack notifications in Kitkat (API 19) using setGroup() not working

不问归期 提交于 2019-12-21 04:28:46
问题 I have a problem that I can't find the answer to. I have tried the AndroidDeveloper tutorials, I have searched here on stackoverflow and on google but either my search-skills are awefull or there's no answer I think answers my problem. I want to stack message notifications into one notification for all new messages when there are more than one. I can make a notification appear for each message but I cannot make a stack/summary notification. The best I get is this : http://developer.android

How to implement a backstack when using the KitKat Transitions Framework

倖福魔咒の 提交于 2019-12-21 02:28:09
问题 I am using the new KitKat Transitions API on Android. I have created two Scene objects using two layouts. I animate from Scene 1 to Scene 2 inside a Fragment . I want to automatically move back to the previous Scene when the user presses the back button. Is there some kind of built-in backstack mechanism when using Transitions , or do I have to roll my own? It is easy enough to call TransitionManager.go(scene1) , but I really do not want to implement an onBackPressed() listener in all my

Check if gps is on In Kitkat (4.4)

拥有回忆 提交于 2019-12-20 10:36:46
问题 Below kitkat, I get if gps is on with providers list String providers = Secure.getString(context.getContentResolver(), Secure.LOCATION_PROVIDERS_ALLOWED); if (TextUtils.isEmpty(providers)) { return false; } return providers.contains(LocationManager.GPS_PROVIDER); But in kitkat, Secure.LOCATION_PROVIDERS_ALLOWED is deprecated. Javaodc say "use Secure.LOCATION_MODE", Location modes are belows... Secure.LOCATION_MODE_OFF Secure.LOCATION_MODE_SENSORS_ONLY Secure.LOCATION_MODE_BATTERY_SAVING

bad array lengths, notification manager causes phone crash on 4.4

纵然是瞬间 提交于 2019-12-20 09:36:33
问题 I launched app into BETA testing and multiple users with 4.4 Devices reported that the app causes whole phone to crash, phone pretty much restarts after app launch even though app doesn't even have such permissions. The report I got from testers is as follows: java.lang.RuntimeException: bad array lengths at android.os.Parcel.readIntArray(Parcel.java:820) at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:348) at android.app.NotificationManager

How can I detect the Android runtime (Dalvik or ART)?

流过昼夜 提交于 2019-12-20 08:26:10
问题 Google added a new ART runtime with Android 4.4. How can I determine whether ART or Dalvik is the current runtime? 回答1: Update At least, as early as June 2014 Google has released an official documentation on how to correctly verify the current runtime in use: You can verify which runtime is in use by calling System.getProperty("java.vm.version"). If ART is in use, the property's value is "2.0.0" or higher. With that, now there is no need to go through reflection and simply check the

Android status bar tints from kitkat to lollipop

偶尔善良 提交于 2019-12-20 05:34:08
问题 I'm trying to implement the nice status bar for my app and have successfully achieved this on kitkat. This is the xml I'm using <?xml version="1.0" encoding="utf-8" ?> <resources> <style name="AppTheme" parent="AppTheme.Base"/> <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="android:windowBackground">@color/colorPrimary</item> <item name=

Emulator for Android 4.4 KitKat is not starting

非 Y 不嫁゛ 提交于 2019-12-18 12:53:05
问题 I am creating an emulator for Android 4.4 KitKat, but the emulator takes very long and isn't starting. I tried many devices like Nexus4, Galaxy Nexus, Nexus S etc. but none of that worked. Just a black screen with the android logo for long time. Any suggestions? 回答1: Unfortunately the emulator does take a very long time to load. A regular complaint amongst Android developers. It sometimes helps if you go into the AVD configuration and modify your KitKat emulator and tick the checkbox that

Understanding necessity of Android VSYNC signals

做~自己de王妃 提交于 2019-12-18 10:29:36
问题 I'm trying to get a better understanding of the Android display subsystem, but one item that's still confusing to me is how VSYNC signals are handled, and why so many exist in the first place. Android is designed to use VSYNC at its core, but there are multiple VSYNC signals that it employs. Via https://source.android.com/devices/graphics/implement.html in the "VSYNC Offset" section, there is a flow diagram which diagrams three VSYNC signals: HW_VSYNC_0, VSYNC, and SF-VSYNC. I understand that

VP8 Encoding Nexus 5 returns empty/0-Frames

依然范特西╮ 提交于 2019-12-18 07:18:12
问题 I'm trying to encode my camera feed to VP8. The problem is: when I get the frame from the output buffer, the byte array is always different size but all entries are 0. Here's the code where I grab the frame and print it: while (true) { try { encoderIndex = mEncoder.dequeueOutputBuffer(encoderOutputInfo, timeOut); } catch (Exception e) { e.printStackTrace(); } switch (encoderIndex) { case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED: // something break; case MediaCodec.INFO_OUTPUT_FORMAT_CHANGED: //