android-5.0-lollipop

Android L: Fast scroll for the RecyclerView

元气小坏坏 提交于 2019-12-09 13:35:14
问题 I'm trying to use RecyclerView in my application with lots of data in it and would like to make a fast scroll for it, just like for the ListView . Approach from this answer worked for me with ListView , but does not work for the RecyclerView . Even if I set fast scroll to true in RecyclerView layout, it still does not work: <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view" android:scrollbars="vertical" android:layout_width="match_parent" android:layout_height="match

Is the Terminal IDE app for android compatible with Lollipop?

我只是一个虾纸丫 提交于 2019-12-09 13:01:56
问题 I just ordered a Nexus 9 and will be using it to program. Has anyone tried to run Terminal IDE on Nexus 9 or any other devices using Android 5.0 Lollipop? 回答1: The "links" browser included with Terminal IDE ran fine on my Nexus 5 under KitKat, but it crashes with the PIE error mentioned under Lollipop. Other than that, Terminal IDE has performed flawlessly for me, for about a year now. Sorry--forgot to add: Terminal IDE under Lollipop is "stopped" if started with the Android keyboard, or

ImageView scaleType=“fitXY” is not working in pre-lollipop device inside the Cardview | Android

故事扮演 提交于 2019-12-09 12:38:24
问题 I have ImageView which is inside the CardView as below in my code. My ImageView scaleType="fitXY" is not working on pre-lollipop devices.But it looks better on Lollipop devices. Please look at below images. As we see in above image there is white padding around the imageview which i want to remove, I want to look alike image on both pre-lolipop and post lolipop devices. Please help me to short out from the problem. Thanks :) <android.support.v7.widget.CardView android:layout_width="match

How to add dividers between disabled items in ListView? - Lollipop

微笑、不失礼 提交于 2019-12-09 12:22:06
问题 To add the dividers between disabled items (not clickable) in ListView for Android previous to Lollipop I override adapter's method areAllItemsEnabled() to return true. But now in Lollipop this method doesn't fix the problem. The dividers are invisible in ExpandableListView too. Is there a way to fix this problem without adding the divider in my item layout? 回答1: We ended up adding two Views of 1dp to fake the divider and checking on version to set Visibility. The problem is worse. We also

Android Lollipop know if app as Usage Stats access

非 Y 不嫁゛ 提交于 2019-12-09 11:35:45
问题 Since Android Lollipop, we have now an API for accessing apps usage stats. However, your app must be granted those permissions by the user. I know that for redirecting the user to those settings using Settings.ACTION_USAGE_ACCESS_SETTINGS. Now, my question is how do you know the user has granted you those permissions so that you can stop redirecting him to the settings. Thanks! 回答1: you can simply query usagestats with daily interval and end time the current time and if nothing is returned

How to make the overflow popup menu avoid obstructing the action bar?

痞子三分冷 提交于 2019-12-09 09:33:54
问题 Background On my app, when I've updated to the new support library and also tried on Lollipop, I've noticed a weird issue: when clicking on the overflow button of the action bar (or even the new Toolbar class) will show the popup menu on top of the action bar, hiding other action items, as such: Here, the action items that got hidden are uninstallation and sharing. The problem I've tried to avoid this issue, by ovverriding the style of the overflow menu, but nothing has helped. Not only that,

Having issues using Android 5.0 Activity transitions onto an activity with a ViewPager

て烟熏妆下的殇ゞ 提交于 2019-12-09 07:54:57
问题 So we're trying to create an across activity image transition from an image in a ListView, to an image in a ViewPager gallery.In doing this transition we're seeing the animation happen before the ViewPager finishes loading/drawing. This causes the image on the ViewPager to flash making the animation look bad. As a test we put an image overtop to fake the look of the ViewPager being loaded. We then transition from the image in the ListView to this 'dummy' ImageView, and then hide it after the

Transition of nested shared elements does not starts from the expected place

拥有回忆 提交于 2019-12-09 06:43:08
问题 TL;DR Why this transition does not start from the expected place? That is, the place where is the CardView. Platform/Deps: Android Studio 1.0-RC2, TargetSdk 21, MinSdk 21, AppCompat-21.0.2, CardView-21.0.2, RecyclerView-21.0.2. Tested On: Genymotion Nexus 5 Lollipop Preview The Code (Simplified) I have three shared elements: Source: <CardView android:transitionName="cardView"> <ImageView android:transitionName="imageView"> <TextView android:transitionName="textView"> Target: <RelativeLayout

Change Elevation of ActionBar by theme

烈酒焚心 提交于 2019-12-09 05:10:57
问题 I want to remove the shadow below the ActionBar. I know that I need to change the elevation to 0dp, but I want to do it in the theme. For Android 4.4- I use : <item name="android:windowContentOverlay">@null</item> But is it possible for Android 5.0 ? 回答1: As shown by Antonio Jose, here is an answer : Remove shadow below actionbar For Android 5.0, if you want to set it directly into a style use: <item name="android:elevation">0dp</item> and for Support library compatibility use: <item name=

Is there a way to connect to a Bluetooth Low Energy device under Android 5 exposing the public static address?

感情迁移 提交于 2019-12-09 04:46:45
问题 Background : I use a BLE device (`peer') that communicates with my Android app without pairing -- the peer device advertises and android connects to it. During this connection, the Android device transmits its own Bluetooth address (this is part of each connection). Under Android 4.4 this used to be its public static (i.e. Bluetooth-MAC) address, under Android 5 (at least with my Nexus 9) this is a private random address. The Problem : The peer device checks the supplied address of the