android-5.0-lollipop

Android 5.0 Wrong crop regions on preview surface and captured still image

霸气de小男生 提交于 2019-12-18 08:33:34
问题 I'm trying to get digital zoomed frame on Android 5.0 with camera2 interface. Appropriate doc for that functionality is developer.android.com/camera2/captureRequest Surface used in my application: SurafaceView (1920x1080, 16:9 aspect ratio) ImageReader (3264x2448, 4:3 aspect ratio) Camera's sensor size is 3280x2464 (4:3 aspect ratio) Crop region which I want to get from sensor is: Rect zoomCropPreview = new Rect(1094, 822, 2186, 1642); //(1092x820, 4:3 aspect ratio) I set this Rect as

Canvas.drawTextOnPath(…) not working on Lollipop

拈花ヽ惹草 提交于 2019-12-18 04:09:36
问题 canvas.DrawTextOnPath does not seem to work on a Lollipop device. See the difference here. (The Nexus 10 image is correct but Lollipop does not display correctly) The code is a simple path draw. // Path for the inner circle unitPath = new Path(); unitPath.addArc(unitRect, 180.0f, 180.0f); // Draw the text and the path canvas.drawTextOnPath("Inner Circle", unitPath, 0.0f, 0.0f, unitPaint); canvas.drawPath(unitPath,unitPaint); The Android Studio test project illustrating this issue can be seen

android lollipop animation glitch

丶灬走出姿态 提交于 2019-12-18 03:59:07
问题 I have a strange behaviour with the default layout animation in devices running Android 5 (Lollipop). I am using an activity with multiple Fragments which are replaced at runtime using the default fragment manager. When replacing the old fragment, i want to use an animation for a smooth ui flow. On pre-lollipop devices the animation works like expected, but on devices running the latest os, the animation between fragment glitches: I tried using the default animation xml tag android

Is there code for Snackbars in Android L or are we expected to implement them ourselves?

最后都变了- 提交于 2019-12-18 03:56:49
问题 The Material design website mentions a new Toast-like element called a Snackbar: http://www.google.com/design/spec/components/snackbars-and-toasts.html The Android L preview SDK documentation (sorry can't link since it's only downloadable) doesn't have any mention of Snackbar in the classes list or as a modifier in the Toast class documentation. Am I missing something obvious or should I build my own Snackbar.java? 回答1: Update 2015-05-29: Google released a Design Support Library which

How to show menu popup exact below actionbar?

半世苍凉 提交于 2019-12-18 03:56:46
问题 I am working on popup-menu in actionbar. But I am stuck to display exact below of actionbar(cut-to-cut).I am putting two snapshot. My issue screen shot: I want exact popup menu below of actionbar as below screenshot Correction screenshot: My code snippet: <menu 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" tools:context=".MainActivity"> <item android:id="@+id/action_filter" android

Align-Center SlidingTabLayout

亡梦爱人 提交于 2019-12-18 03:41:50
问题 After I moved my app to 5.0, I had to move from the basic tabs to the slidingTabLayout that a google developer provides . The problem is, I can't figure out how to center both buttons in a way that they get both centered like the old one. Btw, I'm not talking about the style, just the positioning of the buttons, sharing the same amount o widht space! To make things clear I'll post some images: What I have now: What I expect to have: My layout: <LinearLayout xmlns:android="http://schemas

How can I receive a notification when the device loses network connectivity in android L (API 21)

孤人 提交于 2019-12-18 00:14:06
问题 I'm using this code to be notified when the connection is lost in API 20 and down. registerReceiver(getConnectivityStateBroadcastReceiver(), new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); private class ConnectivityStateBroadcastReceiver extends BaseBroadcastReceiver { /** * @param userLoggedIn * @param context * @param intent */ @Override protected void onReceive(Boolean userLoggedIn, Context context, Intent intent) { Bundle extras = intent.getExtras(); boolean notConnected =

ring shapes for L preview not working

狂风中的少年 提交于 2019-12-17 22:52:05
问题 Just testing the new developer preview and noticed that my existing ring drawables are not rendering properly. Instead of a ring it's a full circle. Is it a bug or has something changed or am I doing it wrong to begin with? Any possible solutions? here's the code: <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@android:id/progress"> <shape android:innerRadiusRatio="3" android:shape="ring" android:thicknessRatio="7.0"> <solid android:color="#ff5698fb

ListViewDraggingAnimation broken on Android 5 Lollipop

烂漫一生 提交于 2019-12-17 22:39:09
问题 I'm using ListViewDraggingAnimation by DevBytes, but it seems broken on Android Lollipop developer preview 2 (LPX13D). When I drag a row over other rows, those rows will disappear and become no longer clickable (see below). I tried disabling hardware acceleration for the listview but it didn't have any effect. Has anyone experienced the same issue? Any hints? Thanks :) 回答1: I found the problem. It came from this flag. StableArrayAdapter.hasStableId . It fix all problem from this view on

Unnecessary padding in CardView?

北慕城南 提交于 2019-12-17 22:22:34
问题 I have implemented CardView in my app and everything works fine except there is a little padding around the image if I put radius to the card. It appears like this: But in android docs and in this article the image takes the entire cardview, so can u help me achieve that. My layout file is like: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match