android-5.0-lollipop

Android Material Design on KitKat (and lower) devices

て烟熏妆下的殇ゞ 提交于 2019-12-04 09:54:53
问题 I'm going to develop an android application in our school as a project. I want to use the new Material Design by Google but i know its only available on Android-L Devices. Jack Underwood has recently released the calendar called "Today Calendar", which is in the Material Style and running on Kitkat and lower Devices. I know that the Actionbar height is a bit bigger than the older one and the navigation drawer toggle has a new style. And so one ... How do i implement that? 回答1: Currently the

Android 5 Lollipop shadow direction or y offset

拜拜、爱过 提交于 2019-12-04 09:03:59
Is there a possibility to change the shadow direction of Y offset? Right now I have the following layout <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" tools:ignore="MergeRootFrame" > <TextView android:layout_width="match_parent" android:layout_height="200dp" android:layout_marginBottom="200dp" android:elevation="5dp" android:translationZ="5dp" android:background="@android:color/darker_gray"

Style inheritance of extended Widget

佐手、 提交于 2019-12-04 08:57:34
In my project (Target API 21 with AppCompat support), I need to extend the EditText class. My problem is MyEditText class does not inherit EditText style customized with: <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar" > <item name="colorPrimary">@color/primary</item> <item name="colorControlNormal">@color/grey_light</item> <item name="colorControlActivated">@color/primary</item> <item name="colorControlHighlight">@color/primary</item> </style> with @color/primary green Screenshot: line 1: EditText focused line 2: EditText not focused (enabled) line 3: MyEditText not

Can't call void android.view.View.setElevation(float) on null object in lapism/SearchView

我与影子孤独终老i 提交于 2019-12-04 08:54:13
问题 I am using library lapism/SearchView (https://github.com/lapism/SearchView) in my project but I get following runtime exception only on Android 5.0: A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: can't call void android.view.View.setElevation(float) on null object A/art: art/runtime/check_jni.cc:65] in call to CallVoidMethodV A/art: art/runtime/check_jni.cc:65] from void android.animation.PropertyValuesHolder.nCallFloatMethod(java.lang.Object, long, float) A/art: art

WifiConfiguration enable network in Lollipop

时间秒杀一切 提交于 2019-12-04 08:41:31
问题 I was working on Wifi project, there is a module that enable user to join wifi programatically. In kitkat and below it's working successfully, but in Lollipop it's not working. Here is the code : WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiConfiguration wifiConfiguration = new WifiConfiguration(); wifiConfiguration.SSID = "\"testSSID\""; wifiConfiguration.hiddenSSID = true; wifiConfiguration.status = WifiConfiguration.Status.ENABLED; wifiConfiguration

Android L SoundPool.load() regression

本小妞迷上赌 提交于 2019-12-04 08:03:50
问题 On Android L - the latest developer preview (Nexus 5), there seems to be a regression in the SoundPool.load() method which takes >5 seconds to load a sample (<100kb), where samples were loaded on pre-L systems instantly with the very same code. I tried OGG or MP3, both with same results. Tried different sizes but all under 100kb. Seems as 40kb or 80kb does not make any difference, so does OGG or MP3. Loading is always around 5s delay. This seems as yet another regression in SoundPool after

Is there a way to share a same LayoutManager between multiple nested RecyclerViews

旧巷老猫 提交于 2019-12-04 08:01:14
I'm developing an application that showing a game list, inside every game's itemView, i also have a video list to be showing. preview and structure are following. I deploy a RecyclerView as the window root view, and then for the videos, i used grid-style RecyclerView to display, so here we got a nested RecyclerView structure. But there is trouble because the number of videos is inconsistent between games, i don't want the RecyclerView of video list able to being scroll, so the best way is make the View's height stretch dynamically depends on how much rows it have. I heard a disappointing

Android Support Library v17

☆樱花仙子☆ 提交于 2019-12-04 07:57:20
I just downloaded Eclipse 4.4 Luna and installed the latest ADT 20 on it. Now, new templates for new Android Project are included. One of them is "Android TV Activity". The existing code uses Android Support Library v17!! import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.support.v17.leanback.widget.ImageCardView; import android.support.v17.leanback.widget.Presenter; import android.util.Log; import android.view.View; import android.view.ViewGroup; But I cannot find the new

Android shared elements with Picasso

前提是你 提交于 2019-12-04 07:41:35
I'm trying to make an image transit from a list in one activity to a detail activity. In the detail activity the image is bigger than in the list and I'm using Picasso to retrieve the image from the server. The problem is that the first time I launch the detail activity, the image transit well but is not resized nor centered. When I go back, the image is instantly resized, and if I come back to the same detail activity, it works as expected. The detail activity call method: public static void launch(Activity activity, View transitionView, StoreProduct storeProduct) { ActivityOptionsCompat

How can I Animate the color change of the statusbar and toolbar (like the new Calendar app does)

自闭症网瘾萝莉.ら 提交于 2019-12-04 07:27:10
问题 The new Google Calendar app has an animation I would like to do in my app. When you create a new event you can choose a color for the event. When you do, the statusbar and toolbar change to that color with a circular effect that covers both of them. Here's an example of what I'd like to do: I can change the color of the statusbar and toolbar, but how can I apply the circular animation effect (or similar) to both of them as the color is changed? 回答1: I don't know if this is the exact way the