android-5.0-lollipop

ANDROID CAMERA: getParameters failed (empty parameters)

梦想与她 提交于 2019-12-14 00:29:00
问题 Hi I am getting this issue only in OS versions below lollipop, searched a lot for this bit didn't found the right solution. I think the issue is with OS version Its working fine in 5+ my piece of code is private void setCameraPhotoQuality(Camera camera) { final Camera.Parameters parameters = camera.getParameters(); parameters.setPictureFormat(PixelFormat.JPEG); if (configurationProvider.getMediaQuality() == Configuration.MEDIA_QUALITY_LOW) { parameters.setJpegQuality(50); } else if

onTagDiscovered() not called any more when nfc tag already there after updating from 4.4.4 to 5.1.1 Samsung

╄→гoц情女王★ 提交于 2019-12-13 19:35:28
问题 I had a code able to detect an already present NFC tag when I start my NFCadapter. Which is very nice since it means you don't need to move the tag to detect and read it :) Since I update a Samsung phone to 5.1.1 form 4.4.4, this is not working any more. Moving the tag to close contact does fire onTagDiscovered() but it used to be fire instantly. AFAIK, Google changes around NFC should not have impacted my workflow : http://developer.android.com/sdk/api_diff/21/changes.html displays only

RippleDrawable NOT drawing over Views

我与影子孤独终老i 提交于 2019-12-13 18:37:19
问题 I have a layout with a KenBurnsView and an ImageView over it (just a toggle button). When I click on the button a Ripple is generated but is drawn below the KenBurnsView. Previously, when I had an Image view in replacement to the KenBurnsView the Ripple was drawn above the ImageView on the top. Here is my layout: <LinearLayout 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" android:id

Lollipop isPowerSaveMode always returns false

六月ゝ 毕业季﹏ 提交于 2019-12-13 15:44:17
问题 I am trying to know if the PowerSaveMode is activated or not. I am using this code: PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); return pm.isPowerSaveMode(); But it always returns FALSE. I have only tried with a Samsung Galaxy S4 with 5.0.1 because is the only Lollipop device I have around. Any tips? 回答1: I found out that Samsung works in a different way. Like always Android loves to be tricky. bActivated = Settings.System.getString(context

Android 5.0 (Lollipop) widget button's text are in ALL CAPS [duplicate]

耗尽温柔 提交于 2019-12-13 13:09:22
问题 This question already has answers here : Why is my Button text forced to ALL CAPS on Lollipop? (20 answers) Closed 5 years ago . I have a simple homescreen widget with a few buttons on it. My problem is that when the widgets are running on Lollipop the button's text are all capitalized, any previous Android version doesn't have this problem. The buttons in the layout.xml are very ordinary buttons: no styling or special sauce, just a width height and text size. The interesting thing is that

Why creating ripple effect is difficult on pre lollipop android devices?

假装没事ソ 提交于 2019-12-13 11:30:51
问题 When I've applied ripple effect to the UI having OS version lower than lollipop, at that time first of all, ripple effect is completed and then other UI process is started. So, it is making UI process slower: as ripple animation is completing first of all and then doing next UI process. 回答1: As per my understanding...You are asking that Why ripple effect is smooth on devices having lollipop or later versions while not working so smooth on devices having older versions then lollipop? If so

Scroll behavior of Flexible Space in Android

半城伤御伤魂 提交于 2019-12-13 09:18:11
问题 To prevent from re-posting all my code again, it can be found in this question. What I'd like to do now, is to prevent the upper imageview from shrinking upon scrolling; instead, I'd like to make it 'static' so it won't scroll up and shrink when the lower view is scrolled over it. I'll add some pictures to compensate for the loss of clarification. This is how the screen looks at it's fullest size: This is how it looks when it's shrinked: This is what I want: Edit: Forgot to mention what I

Technical Details of Android Lollipop Settings View

独自空忆成欢 提交于 2019-12-13 06:47:06
问题 I am trying to figure out how would you implement something like an Android Settings View for both phones and tablets? It doesn't look like a ListView or RecyclerView utilizing CardView? Which Android class or component would you use to implement/design a similar looking ListView? Its sort of a 2 column layout on tablets and one column layout on phones: Any sample code or tips would be appreciated. 回答1: You can accomplish this by using a combination of RecyclerView and CardView for the

ActionBar aka Toolbar is black after upgrade to Support Library v21

不羁岁月 提交于 2019-12-13 02:38:07
问题 I have just upgraded to the newest library version after Android Lollipop was released. After I fixed serveral doublicated attributes (which where caused by the Support Library) I updated my android-switch-backport, and it compiled again. However now I have no more the ActionBar, it is now a Toolbar. So far so good, but now is that Toolbar black and I have no idea why. So how can I change it back to my custom colors, I used Android Action Bar Style Generator, for generating all required

Dialog from service not showing on lollipop when screen is locked

淺唱寂寞╮ 提交于 2019-12-13 01:40:50
问题 I am trying to show a Dialog from service in onStartCommand method private Dialog incomingCallDialog; incomingCallDialog = new Dialog(MyService.this, R.style.PopupDialog); incomingCallDialog.setCancelable(false); incomingCallDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); incomingCallDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); incomingCallDialog.setContentView(view); Handler delayHandler = new Handler(); delayHandler.postDelayed(new Runnable() { @Override