android-5.0-lollipop

android ripple button with background

给你一囗甜甜゛ 提交于 2019-12-04 07:00:31
I successfully created a ripple button in android 5.0 using XML. My code is as follows: <?xml version="1.0" encoding="utf-8"?> <!-- the flat button to be used in app --> <!-- define the ripple --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight"> <!-- the ripple object --> <item android:id="@android:id/mask"> <!-- button shape (w/ radius) --> <shape android:shape="rectangle"> <!-- radius of vertices --> <corners android:topLeftRadius="7dp" android:topRightRadius="7dp" android:bottomLeftRadius="7dp" android:bottomRightRadius="7dp"

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

杀马特。学长 韩版系。学妹 提交于 2019-12-04 06:45:42
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? You need to surround SSID with double quotes : p.setProperty(DevicePolicyManager.EXTRA_PROVISIONING_WIFI_SSID, "\"my SSI\""); Yes, it's broken in L MR0 (Android 5.0).

Shared element transition don't have the expected behaviour

我是研究僧i 提交于 2019-12-04 06:20:56
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 not necessarily the first one. From this situation, I thought since it's a list of image in which I

Toolbar title with custom view

可紊 提交于 2019-12-04 05:34:31
I am attempting to show both a title, using setTitle and a custom view in my toolbar. I am not treating it as an actionbar, instead as nothing more than a view. I am adding both the titles and custom view in Java toolbar = (Toolbar) view.findViewById(R.id.toolbar); if (title != null) { toolbar.setTitle(title); toolbar.setTitleTextColor(getResources().getColor(android.R.color.white)); } if (subtitle != null) { toolbar.setSubtitle(subtitle); toolbar.setSubtitleTextColor(getResources().getColor(android.R.color.white)); } // Add switch view to toolbar View switchView = LayoutInflater.from

Can't use some of L SDK features

元气小坏坏 提交于 2019-12-04 05:25:34
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 { compileSdkVersion 'android-L' buildToolsVersion '20.0.0' defaultConfig { applicationId 'com.tester'

RecyclerView hides Actionbar when SoftKeyboard is opened

独自空忆成欢 提交于 2019-12-04 04:56:38
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" android:layout_height="0dp" android:layout_above="@id/chatMessageLayout" android:background="@color

Android L reveal Effect is not working

别说谁变了你拦得住时间么 提交于 2019-12-04 03:44:23
I tried to implement createCircularReveal() in FloatingButton . But the animation is too fast. How to increase the duration of the Animation. I tried setDuration(milli-seconds) , But its not working. I follow developer.android.com, Defining Custom Animations Here my code: int cx = (fabBtn.getLeft() + fabBtn.getRight()) / 2; int cy = (fabBtn.getTop() + fabBtn.getBottom()) / 2; int finalRadius = Math.max(fabBtn.getWidth(), fabBtn.getHeight()); Animator anim = ViewAnimationUtils.createCircularReveal(fabBtn, cx, cy, 2, finalRadius); anim.setDuration(2000); fabBtn.setVisibility(View.VISIBLE); anim

Adding two AppCompat Toolbars with different themes

≯℡__Kan透↙ 提交于 2019-12-04 03:38:46
问题 I would like to have two different android.support.v7.widget.Toolbars in my app, one dark, one light, and switch between them when needed. However, when I set a different theme on the second toolbar, it seems to reset the theme on the first toolbar as well. Is that a bug or intended behavior? Toolbar 1: <android.support.v7.widget.Toolbar xmlns:sothree="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main_toolbar" android

Styling the SearchView Widget using support library v21

主宰稳场 提交于 2019-12-04 03:26:42
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 be applied there? I've found that Play Music has the same problem. I'm following the guide from Android

Showing a menu overflow button in a Toolbar

↘锁芯ラ 提交于 2019-12-04 03:17:03
问题 I've created a Toolbar for Lollipop, but I can't seem to figure out how to add an overflow button to the toolbar. I'm not going to be using the v7 appcompat toolbar, as I want to explicitly use the Toolbar widget. I want it to look something like this: main_activity.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:fab="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation=