Tag: android-5.0-lollipop

application content goes behind the navigation bar in android L

As you can see my “Got It” button is behind the navigation bar.Not able to fix it!!! I have tried <item name=”android:fitsSystemWindows”>true</item> As well as setting it in layout file. my theme in value-21 is : <style name=”AppTheme” parent=”android:Theme.Material.Light.NoActionBar”> <item name=”android:windowNoTitle”>true</item> <item name=”android:windowActionBar”>false</item> <item name=”android:windowFullscreen”>false</item> <item name=”android:windowContentOverlay”>@null</item> <item name=”android:fitsSystemWindows”>true</item> </style> Its the same case with […]

Android Studio 0.8.2 – Gradle project sync failed

In hindsight I should not have enabled L build stuff. I am new to programming and I created a new Android Studio project which is throwing the Gradle errror right away. Errors are: yellow bar at the top – Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly. Try again Open […]

List view set a custom ripple selector

I’m trying to use a list view control on Lollipop under the following conditions: The theme type is the default Theme.Material (dark theme). The list view is contained inside of larger layout which has a white background. The list view should have a list selector that appears with the white background. NOTE: I am forced […]

Android Lollipop Set Status Bar Text Color

I’m trying to set the status bar text color in Android v21, but I’m not seeing an API method for it. Here’s what I have so far for the background MyActivity.java > onCreate: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setStatusBarColor(getResources().getColor(R.color.white)); } Obviously white text on white background won’t work. I’m looking […]

Unknown error code during application install “-505”

I have checked this android 5.0 lollipop app install shows Unknown error code during application install: "-505". But it doesn’t seem to address my case as I dont use multiuser env. I have an app in the playstore which worked fine on my nexus 4(4.4.x) till i upgraded to lollipop and it showed this error […]

Missing Up navigation icon after switching from ICS ActionBar to Lollipop Toolbar

I have an activity with many fragments that uses action bar and navigation drawer. It has “home as up” enabled. I have implemented proper logic that only top level fragments show action bar drawer toggle icon, other fragments show up arrow. I achieved this by: mDrawerToggle.setDrawerIndicatorEnabled(false); mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED, mDrawerList); Now old v4 support library ActionBarDrawerToggle became […]

Using CardView and RecyclerView in my layout files throws an exception

So I’ve been taking a shot at the Material Design of Android Preview L. I imported both the CardView and the RecyclerView libraries. I use the Android Studio preview version 0.8.0. Have the latest SDK packages installed. Once I use them in my layout files though, the previewer throws an exception for both of them. […]

Change Elevation of ActionBar by theme

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 ?

Using RecyclerView with Card

I have some RecyclerView with Card items. And on preLollipop devices it looks fine. But on Lollipop it looks without any spacing between child cards. I tried to use margin and padding, but it didn’t help. When I use margin on lollipop it looks fine, but with the same margin on preLollipop spacing is very […]

How to have a Lollipop switch button

I want to have the Lollipop style switch button for my app: How could I implement this button so it looks like this also on older versions of android?

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.