Tag: android-support-library

How to use the new DayNight Theme?

Starting to get my hands into that new update to the Google Support Library and I want to implement the Theme.AppCompat.DayNight into my app. The problem I am having is that it seems no one explained how to customize it. So If I want to have a different colorAccent for day and a different one […]

No resource identifier found for attribute 'paddingEnd' in Package 'android'

I have a problem with the XMl file in v17/mr-media_route_list_item.xml. I keep getting this error and have not found a solution yet! Here is a printshot of the XML and the Problems* XML CODE BELOW : <?xml version=”1.0″ encoding=”utf-8″?> <!– Copyright (C) 2013 The Android Open Source Project Licensed under the Apache License, Version 2.0 […]

Open navigation drawer when options menu button is pressed

I’d like the navigation drawer opened when the options menu button is pressed. So in my Sherlock Fragment activity I added: @Override public boolean onCreateOptionsMenu(Menu menu) { if (!mDrawerLayout.isDrawerOpen(mDrawerLinear)) { mDrawerLayout.openDrawer(mDrawerLinear); } return true; } For some reason nothing happens when the options menu button is pressed. Otherwise the drawer is working fine. It opens […]

Action bar displayed incorrectly when returning from immersive mode

I’m having some issues returning from Immersive Mode in an ActionBarActivity. I have created a simple app to illustrate this issue. There is a layout with a single button to toggle immersive mode. When “returning” from immersive mode, the action bar is offset downwards from its original position, roughly the same distance again that it […]

How to use the SwipeRefreshLayout?

Background Google has recently published an update to its support library, which now has a new “SwipeRefreshLayout” view. The view allows to wrap another view, while supporting swiping down in order to perform a refresh operation. screenshot: The problem Google hasn’t provided a sample (at least not one that I can find, yet), so I’ve […]

How to maintain ListView position when using the new Loader APIs?

In Honeycomb the Loader APIs were introduced as the proper way to provide data to an application by doing the heavy lifting on a background thread. In my application I’m working to replace all my Cursors with Loaders that return Cursors. Since Cursor.requery() is depreciated now, it is recommended to just call restartLoader and allow […]

How to handle issues of the new bottom sheet of the support/design library?

Background I’ve used a modified version of bottom-sheet library (here, based on this library, also wrote about it here), in order to have a nice transition between collapsed (AKA “peeked”) state and expanded state. The library had its issues, but in general I’ve fixed them all. The problem Recently we’ve found that after going back […]

rendering error; couldn't resolve @id/search_edit_frame

I am having an error that says couldn’t resolve @id/search_edit_frame I don’t know why, I tried the File>Invalidate Caches> Just Restart and restart android studio also tried to change the render version all of my supported api.. <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” myapp=”http://schemas.android.com/apk/res-auto” android:layout_width=”match_parent” android:layout_height=”match_parent”> <android.support.v7.widget.SearchView android:id=”@+id/svSearch” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:textSize=”25sp” android:textColor=”@color/textDefault” myapp=”@string/search_hint” myapp=”false” /> </LinearLayout> […]

Android – problems animating ActionBar icon from Fragments

I’m having some problems consistently animating a ‘refresh’ icon in the ActionBar of my app. I have a container FragmentActivity which swaps fragments in and out as the user navigates through the app (either from within the fragment itself or from a SlidingMenu option). So when the app first loads, my FragmentContainer adds FragA. From […]

Bug with anchored FloatingActionButton in support library 24.2.1

I have been having this issue since 24.2.0, but now I’m using 24.2.1 and the bug is still here, it only works well <= 24.1.1. I have an anchored FloatingActionButton done like this: <ScrollView xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”match_parent”> <android.support.design.widget.CoordinatorLayout android:id=”@+id/contact_coordinator_layout” android:layout_width=”match_parent” android:layout_height=”wrap_content” tools:context=”es.cocode.baseapp.contact.ContactFragment”> <FrameLayout android:id=”@+id/map_fragment_container” android:layout_width=”match_parent” android:layout_height=”198dp” android:layout_marginBottom=”210dp”> <fragment android:id=”@+id/map_fragment” android:name=”com.google.android.gms.maps.SupportMapFragment” android:layout_width=”match_parent” android:layout_height=”match_parent” /> […]

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