android-5.0-lollipop

Can't override textAllCaps for buttons on style under android 21

六眼飞鱼酱① 提交于 2019-12-04 03:01:04
This is how I set my buttons. <Button android:id="@+id/button_login" style="@style/ButtonStyle" android:text="@string/button_login" /> This is my style on values folder. <style name="ButtonStyle" parent="ButtonStyleBase" /> <style name="ButtonStyleBase"> <item name="android:layout_width">match_parent</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_marginTop">@dimen/padding</item> <item name="android:textSize">@dimen/font_regular</item> <item name="android:textColor">@color/text_regular</item> <item name="android:background">@drawable/shape_clickable<

How to customize the “up” button when the searchView is being expanded?

£可爱£侵袭症+ 提交于 2019-12-04 02:34:01
Background My app has the ability to search for items (which are other apps) using the SearchView on the ActionBar. The app uses the support library of Google, and it works well on all versions of Android from API 9 . The problem On Lollipop, when I click the search action item in order to start searching, I notice that the up/back button on the top-left corner gets to be white, which is bad for this case since the actionbar background is also quite white: Weird thing is that it doesn't always occur, and I don't think it occurs on Android versions that aren't Lollipop (tested on multiple

Disable Ripple on ListView

荒凉一梦 提交于 2019-12-04 02:27:35
In Android 5.0, my ListView produces a ripple effect when clicking a list item. Is there a way to disable this effect? Looking at the docs, I don't see any way ( https://developer.android.com/reference/android/widget/ListView.html ) You can remove or replace the list selector using the android:listSelector property. The default list selector under Material is ?android:attr/selectableItemBackground which is a bounded ripple. <ListView ... android:listSelector="@drawable/my_list_selector" /> To completely disable selector, you can use a @null or @android:color/transparent (works better for some

Keyboard covers edittext and webview in Lollipop ONLY

前提是你 提交于 2019-12-04 02:17:55
问题 I do understand that similar issues have been reported here but mine is somewhat different. I have recently upgraded the com.android.support:appcompat-v7 to v21 and com.android.support:support-v4 to v19. Everything seemed normal on a pre-lollipop device but when I started to test the device on Android L, two issues appeared: The softkeyboard was covering EditText In the webview, system wasn't resizing, pushing the form-fields to the top as it normally should, rather did on pre-lollipop

UnsatisfiedLinkError on Android 5.0 Lollipop

本秂侑毒 提交于 2019-12-04 02:17:50
问题 I am loading my native library by: try { System.loadLibrary("myNative"); } catch (UnsatisfiedLinkError e) { //java.lang.UnsatisfiedLinkError here System.load("/data/data/com.my.app/my_native/libmyNative.so"); } The above code works fine on other devices except Android 5.0 Lollipop. When run on Android 5.0 Lollipop device, I constantly get the following error: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.my.app/my_native/libmyNative.so" is 32-bit instead of 64-bit at java

What's happened to Monospace in Android Lollipop?

旧巷老猫 提交于 2019-12-04 02:17:11
I have a style to use "monospace" in my Android App: <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" > <!-- Customize your theme here. --> <item name="android:windowNoTitle">true</item> <item name="android:typeface">monospace</item> <item name="android:textColorPrimary">@android:color/white</item> <item name="android:itemTextAppearance">@style/MenuText</item> </style> <style name="M13Text"> <item name="android:typeface">monospace<

Connecting to WiFi network automatically in Android 5 and 6

被刻印的时光 ゝ 提交于 2019-12-04 01:51:02
问题 Been struggling with connecting to WiFi network in Android 5 and 6 for a while and other similar questions don't seem to work for me. I could get the same code working in Android 4.4.2 Adding the code snippet below. String networkSSID = getSsid(); String networkPass = getNetworkPass(); WifiConfiguration conf = new WifiConfiguration(); conf.SSID = "\"" + networkSSID + "\""; conf.status = WifiConfiguration.Status.ENABLED; conf.priority = 40; conf.allowedProtocols.set(WifiConfiguration.Protocol

Android colorControlNormal xml attributes doesn't work pre-Lollipop

孤者浪人 提交于 2019-12-04 01:12:46
I've been trying to change the color of the EditText line on the bottom, but my EditText still doesn't wanna change the color, but it's using the style from Material . I've tried to change the color following these answer: link So I have an EditText with the Material form but not the colors I've set. I've put appcompat-v7 in my Gradle config file, and it's already working for the color primary. <style name="AppBaseTheme.MiddleTheme.Widget.EditText" parent="Theme.AppCompat.Light"> <item name="colorPrimary">@color/middle_primary</item> <!-- Those 3 lines are staying in red war in IntelliJ but it

java.lang.IllegalStateException: Unable to create layer for v

亡梦爱人 提交于 2019-12-04 00:24:47
I have this exception on crashlytics and have no idea how to reproduce or what the cause might be. Does anyone have any pointers as to where I should start looking? Only affects Android 5+. Fatal Exception: java.lang.IllegalStateException: Unable to create layer for v at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:323) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5585) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run

BLuetooth Gatt Callback not working with new API for Lollipop

不问归期 提交于 2019-12-04 00:17:30
I currently have a method which writes to the BLE devices to beep it. My Bluetooth Callback goes as follows : ReadCharacteristic rc = new ReadCharacteristic(context, ds.getMacAddress(), serviceUUID, UUID.fromString(myUUID), "") { @Override public void onRead() { Log.w(TAG, "callDevice onRead"); try{Thread.sleep(1000);}catch(InterruptedException ex){} WriteCharacteristic wc = new WriteCharacteristic(activity, context, getMacAddress(), serviceUUID, UUID.fromString(myUUID), ""){ @Override public void onWrite(){ Log.w(TAG, "callDevice onWrite"); } @Override public void onError(){ Log.w(TAG,