kitkat

android:windowSoftInputMode=“adjustResize” doesn't make any difference?

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a faux dialog which uses this layout: I place a fragment inside the depending on the dialog which is opening - The activity controlling the Dialog looks like this: Unfortunately when you click on an edit text inside of the dialog, no resizing takes place. The windowSoftInputMode literally makes no difference as the functionality is the same as pan mode. Documentation says "This of course only works for applications that have a resizeable area that can be reduced to make enough space" but doesn't tell you what it means by "a

I can't capture android screen using adb screen record tool

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a nexus 4 with android KitKat. I tried screen recording using the following commands: adb shell screenrecord --verbose /sdcard/demo.mp4 adb shell screenrecord --bit-rate 8000000 --time-limit 30 /sdcard/kitkat.mp4 Both times, the commands returned this message: Main display is 768x1280 @60.00fps (orientation=0) Configuring recorder for 768x1280 video at 4.00Mbps ERROR: unable to create video/avc codec instance In the debug console I had open in AndroidStudio, the following log messages were shown: 02-02 18:16:29.058 176-4045/? E/OMX

java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.MEDIA_MOUNTED on KitKat only

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using the DownloadManager to download images off our server and I am placing the files in the externalFilesDir . I am send out a broadcast intent because I don't want these downloaded images to appear in the gallery. sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + context.getExternalFilesDir(null)))); I only tested this on my Galaxy S3 Jelly Bean 4.3 prior and it was working, but when I tested it on KitKat 4.4 it crashes the app. Is there a better way to not have the files downloaded from the DownloadManager

Howto avoid the “EACCES permission denied” ON SDCARD with KITKAT 4.4.2 Version. New policy from google

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: With the android kitkat 4.4.2 version is a new google policy implemented for writeaccess, which I do not understand so far. I read a lot about this issue with other apps. They get a "EACCES permission denied". My app needs to write/unzip a zipfile, also write to a sqlite-database. How can this EACCES permission denied issue be solved with Android version 4.4.2 KITKAT ? 回答1: I found a working solution to this issue in xda forum ; there is no need for rooting. Here's an example : /** * Returns an OutputStream to write to the file. The file

Android - Convert URI to file path on lollipop

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm currently attempting to make a media player for audio. I'm currently running lollipop. I ran into a problem setting the dataSource for the media player. First, here's how I set the dataSource: public void playSong() { player.reset(); Song selSong = songs.get(songPos); long currSong = selSong.getId(); //Get Uri of song Uri trackUri = ContentUris.withAppendedId( MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, currSong); try { //Tell the player the song to play player.setDataSource(getApplicationContext(), trackUri); } catch (Exception e) {

Android KitKat 4.4 Hangouts cannot handle Sending SMS intent

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Code for sending sms that worked perfectly till Android 4.3 (Jelly Bean) stopped working since 4.4 (KitKat) I'm just preparing the text message for the user, but he needs to choose the number to send to The code I have used is: Intent sendIntent = new Intent(Intent.ACTION_VIEW); sendIntent.setData(Uri.parse("sms:")); sendIntent.putExtra("sms_body", smsText); activity.startActivity(sendIntent); Since it stopped working I tried also the ACTION_SEND and ACTION_SENDTO Both didn't worked, I also tried the sendIntent.setType("vnd.android-dir/mms

Transparent part of image in ImageView become black

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have problem when displaying image with transparency in Android KitKat (Nexus 7), it is OK in nexus 4 (KitKat) and other previous Android OS, here the image: and ImageView layout: and here the screenshot when running on Nexus 7 (Android 4.4) also, I use Picasso for download & caching image from the URL. 回答1: After some trial: first I try using the image as resource drawable and it still happen (transparent part of the image become black), secondly I convert the image to png image and it is work, so the problem is in the file type (gif).

How to change the status bar color in android

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: First of all it's not a duplicate as in How to change the background color of android status bar How do I change the status bar color which should be same as in navigation bar. I want the status bar color to be same as the navigation bar color 回答1: Android 5.0 Lollipop introduced Material Design theme which automatically colors the status bar based on the ColorPrimaryDark value of the theme. This is supported on device pre-lollipop thanks to the library support-v7-appcompat starting from version 21. Blogpost about support appcompat v21 from