android-5.0-lollipop

Can't use some of L SDK features

梦想与她 提交于 2019-12-06 01:54:02
问题 I'm trying to use the new Activity transitions in the new SDK. I tried this line: getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); But the problem is that Window doesn't include FEATURE_CONTENT_TRANSITIONS . I also tried this line: getWindow().setExitTransition(new Explode()); And Explode class doesn't exist... I already set my project to be compiled with L SDK (android-L) and use the new SDK tools (20.0.0) build.gradle: apply plugin: 'com.android.application' android {

Stuck on “Connecting to WiFi” screen while provisioning Android Lollipop device

☆樱花仙子☆ 提交于 2019-12-06 01:36:49
问题 I am trying to auto connect with WiFi when provisioning Android Lollipop device using below NFC tags: p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, "-----"); p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_PASSWORD, "----"); It seems it is getting connected with WiFi but stuck on Connecting to Wi-fi... Screen and it is not finishing with provisioning process. Can anybody guide me to resolve this issue? 回答1: You need to surround SSID with double quotes : p

Shared element transition don't have the expected behaviour

前提是你 提交于 2019-12-06 00:10:25
问题 I implemented the shared element transition between from an image in a RecyclerView to an image in a new Fragment. The RecyclerView is hosted in a fragment hosted by an Activity and the target fragment is hosted inside another Activity. When I click on my image, the transition is happening like expected and I get to my fragment. But when I click the back button, the transition is trying to put my image at the first position of my RecyclerView while it's currently displaying the image which is

RecyclerView hides Actionbar when SoftKeyboard is opened

佐手、 提交于 2019-12-06 00:00:23
问题 I have the following Layout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/container"> <com.example.SendMessageLayout android:id="@+id/chatMessageLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" /> <View android:id="@+id/separator" android:layout_width="match_parent"

google GCM android crashes ( java.lang.NoClassDefFoundError: com.google.android.gms.R$string )

筅森魡賤 提交于 2019-12-05 22:59:48
问题 I am developing an app using the Google GCM service and it seems to be crashing on all pre-lollipop devices at Launch.. I Have followed google tutorial... and its working on lollipop and marshmallow here are my project level dependencies dependencies { classpath 'com.android.tools.build:gradle:1.5.0' classpath 'com.google.gms:google-services:1.5.0' } I have this in my app level gradle file compile 'com.google.android.gms:play-services:8.4.0' and this apply plugin: 'com.google.gms.google

How to get android permission of android.Manifest.permission.MEDIA_CONTENT_CONTROL

不想你离开。 提交于 2019-12-05 22:33:51
i am trying to use MediaSessionManager in API21, to control the music play on the device. For the usage, it says need to held the android.Manifest.permission.MEDIA_CONTENT_CONTROL: public void addOnActiveSessionsChangedListener (MediaSessionManager.OnActiveSessionsChangedListener sessionListener, ComponentName notificationListener, Handler handler) Added in API level 21 Add a listener to be notified when the list of active sessions changes.***This requires the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission be held by the calling app.*** You may also retrieve this list if your app

Android 5 screen glitch/static with Google Maps Fragment inside a Viewpager

为君一笑 提交于 2019-12-05 22:33:17
I am having a strange issue related to Android 5 and Google Maps combined with a Viewpager and Fragments, hoping to get some good ideas from all of you.. Screenshot of the problem: http://postimg.org/image/6wzssbdbr/ (no rep for inlining yet) Situation: Main Activity with a Viewpager that has a number of Fragments One of the Fragments has a MapView inside it with all lifecycle methods forwarded; replace MapView with MapsFragment and the issue is the same Open a new Activity, as long as the new Activity is not using too much memory (I assume), the onDestroy of the Main Activity is not called

Styling the SearchView Widget using support library v21

隐身守侯 提交于 2019-12-05 21:58:36
问题 I'm trying to style the SearchView widget using the new AppCompat v21, but I'm facing some problems. No matter what layout I set on "suggestionRowLayout" attribute, it does nothing at all. The suggestion dropdown list of the SearchView remains the same way. Other problem that I'm having is when the "accent color" is the same color as the "primary color", in the searchview is impossible to distinguish where is the caret. Do you know how can I change the accent color in the SearchView to only

Set navigationBar color on Android Lollipop with Full screen activity

老子叫甜甜 提交于 2019-12-05 21:43:12
Is there a way to set the navigationbar color in a fullscreen activity? if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setNavigationBarColor(getResources().getColor(R.color.Theme_color)); And this line in my theme-style: <item name="android:navigationBarColor" tools:targetApi="21">#E64A19</item> Both resulting in the same transparant navbar above my activities layout... Code: Acitivity : @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Remove title bar this.requestWindowFeature(Window.FEATURE_NO_TITLE); /

Material tabs with toolbar like design

巧了我就是萌 提交于 2019-12-05 20:15:38
I saw this sample code for android playstore like layout on stackoverflow post , but due to low reputation i was not able to comment there. i am trying to achieve similar design for my project and would like if someone can help me get full code for this design apart from the layout file shared here. Thanks. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.Toolbar xmlns:app="http://schemas