android-5.0-lollipop

How to perform basic operations on files using DocumentFile API?

这一生的挚爱 提交于 2020-01-25 00:11:07
问题 Background Starting from API 21 (Lollipop), apps can get a special "permission" to modify real SD-cards, as shown on previous posts I've written (here and here). The problem I can delete files, and I can also create them, but I can't find a way to perform other basic file operations: read, write, using InputStream and OutputStream move files. create a folder and not just a file rename a file get file info (recent updated,etc...) share/open the file via other apps. other operations I might

Lollipop Theme issue

吃可爱长大的小学妹 提交于 2020-01-24 11:44:45
问题 I am using sherlock action bar in my project, I have used Theme.Sherlock.Light.DarkActionBar <style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar"> <item name="android:homeAsUpIndicator">@drawable/transparent</item> <item name="homeAsUpIndicator">@drawable/transparent</item> <item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:titleTextStyle">@style/Widget.MyTheme

Lollipop Theme issue

情到浓时终转凉″ 提交于 2020-01-24 11:43:38
问题 I am using sherlock action bar in my project, I have used Theme.Sherlock.Light.DarkActionBar <style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar"> <item name="android:homeAsUpIndicator">@drawable/transparent</item> <item name="homeAsUpIndicator">@drawable/transparent</item> <item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:titleTextStyle">@style/Widget.MyTheme

Lollipop Theme issue

ぃ、小莉子 提交于 2020-01-24 11:43:28
问题 I am using sherlock action bar in my project, I have used Theme.Sherlock.Light.DarkActionBar <style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar"> <item name="android:homeAsUpIndicator">@drawable/transparent</item> <item name="homeAsUpIndicator">@drawable/transparent</item> <item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:titleTextStyle">@style/Widget.MyTheme

Lollipop Theme issue

走远了吗. 提交于 2020-01-24 11:43:25
问题 I am using sherlock action bar in my project, I have used Theme.Sherlock.Light.DarkActionBar <style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar"> <item name="android:homeAsUpIndicator">@drawable/transparent</item> <item name="homeAsUpIndicator">@drawable/transparent</item> <item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item> <item name="android:titleTextStyle">@style/Widget.MyTheme

Android -showing alert dialog from service when phone is locked

…衆ロ難τιáo~ 提交于 2020-01-24 09:37:07
问题 Showing alert dialog on lock screen from service is my problem. when phone is on unlock state ,it shows nicely. Actually if phone is lock , it will just unlock phone and alert dialog will appears behind lock. Here is my code: Service.java: public static void popupDialog(String sender , String msg) { final String senderName = sender; final String message = msg; Handler h = new Handler(context.getMainLooper()); h.post(new Runnable() { @Override public void run() { KeyguardManager km =

Android 5.0 doesn't support BitmapFactory.Options inPurgeable

和自甴很熟 提交于 2020-01-24 05:49:46
问题 I'm learning the fresco lib of Facebook . I see that storing bitmap on ashmem with the option is inPurgeable so great. It takes us a lot of care about memory management but decreases OutOfMemoryError on Davilk heap . I wonder why Android 5.0 doesn't continously support BitmapFactory.Options inPurgeable . Are there any changes in ART ? Can anyone explain the reason for me? Thanks in advance. EDIT According to Ed George's answer: Why do Facebook engineers still use inPurgeable from Android 3.0

Android 5.0 doesn't support BitmapFactory.Options inPurgeable

爷,独闯天下 提交于 2020-01-24 05:49:44
问题 I'm learning the fresco lib of Facebook . I see that storing bitmap on ashmem with the option is inPurgeable so great. It takes us a lot of care about memory management but decreases OutOfMemoryError on Davilk heap . I wonder why Android 5.0 doesn't continously support BitmapFactory.Options inPurgeable . Are there any changes in ART ? Can anyone explain the reason for me? Thanks in advance. EDIT According to Ed George's answer: Why do Facebook engineers still use inPurgeable from Android 3.0

Android Lollipop - WiFi Hotspot setWifiApEnabled() get InvocationTargetException

早过忘川 提交于 2020-01-22 12:42:06
问题 I'm using in the app setWifiApEnabled() from Hidden API (access by reflection). In some older phone it´s working (also with Samsung Galaxy S3, some phones with 4.4,...) but I tested it with Samsung Galaxy S5 and I get java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) ... I'm using similar code like there Android 2.2 wifi hotspot API or How and what to set to Android WifiConfiguration.preSharedKey

?android:attr/selectableItemBackground not visible enough on a dark background

狂风中的少年 提交于 2020-01-22 07:57:49
问题 On Android Lollipop, I'm using: android:background="?android:attr/selectableItemBackground" to have the material animated feedback when I click on a button. It works well when I have a button contained in a white/light layout, like a CardView for example. But when I want to use the same thing on a dark background, we barely see the effect, it is not visible enough. Does someone have an idea? Thank you 回答1: On API 21+ you can set android:theme="@android:style/ThemeOverlay.Material.Dark" on a