Tag: material-design

CardView button and text not aligning

I’m having a problem creating a CardView with a button that aligns to the start of the text: I’m following the dimensions set out in the Material Design spec for the padding and text-sizes. This is the XML I’m using: <android.support.v7.widget.CardView xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_margin=”8dp”> <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:orientation=”vertical”> <TextView android:layout_width=”match_parent” android:layout_height=”wrap_content” android:paddingBottom=”16dp” android:paddingLeft=”16dp” […]

How to get the Google Now searchbar into my app?

Google has just implemented their searchbar from Google Now into the play store application as you can see in the gif below. How can I implement this actionbar searchbar into my own app? I’d like to have the style hamburger animation acess from toolbar button microphone button ripple effect on lollipop devices What I already […]

Android Design Navigation Drawer – How to add a switch in nav xml?

I am using the new Android Design Navigation Drawer. I want to add a switch in the drawer. Is there a away to implement this? this is the menu xml: <menu xmlns:android=”http://schemas.android.com/apk/res/android”> <group android:id=”@+id/nav_view_menu_group_1″ android:checkableBehavior=”single”> <item android:id=”@+id/nav_view_menu_item_myschedule” android:icon=”@drawable/ic_navview_my_schedule” android:title=”@string/navview_menu_item_myschedule” android:titleCondensed=”@string/navview_menu_item_myschedule” /> <item android:id=”@+id/nav_view_menu_item_iolive” android:icon=”@drawable/ic_navview_play_circle_fill” android:title=”@string/navview_menu_item_iolive” android:titleCondensed=”@string/navview_menu_item_iolive” android:visible=”false”/> <item android:id=”@+id/nav_view_menu_item_explore” android:icon=”@drawable/ic_navview_explore” android:title=”@string/navview_menu_item_explore” android:titleCondensed=”@string/navview_menu_item_explore” /> <item android:id=”@+id/nav_view_menu_item_map” […]

How to use android:Theme.Material (Material theme) in styles.xml android?

In my application, I am trying to implement android:Theme.Material as a parent theme in styles values-21 folder: <!– res/values-21/styles.xml –> <resources> <!– your theme inherits from the material theme –> <style name=”AppTheme” parent=”android:Theme.Material”> <!– theme customizations –> <item name=”android:colorPrimary”>@color/primary</item> <item name=”android:textColorPrimary”>@color/text_primary</item> <!– darker variant for the status bar and contextual app bars –> <item name=”android:colorPrimaryDark”>@color/primary_dark</item> […]

Android dropdown button

What is this dropdown button? It looks like a spinner and the animation can be found here. I tried using spinner but it’s not the same. This one looks awesome! Can anybody help me find it? I need to create something similar.

Material design color palette

Google has designed a color palette. Given a color, I want to dynamically create the palette in Android. There was a similar question in the Graphic Design site and an open source javascript solution which generates a similar color palette. The factors for each color are found here and the function used to create the […]

Android reverse shared element transition on back after orientation change?

For shared element transition I am following this github project. It has 2 screens – one with recyclerview having number of cards & second the detail screen. As expected, it exhibits shared element transition of imageview & textview from recyclerview item to detail screen & reverse transition on back press. But, if user changes orientation […]

Floating label with two editText

I want to achieve Something like this. A floating label with two edit texts. I Used TextInputLayout and some other libraries too, but all accept only single child as EditText. Any help is appreciated. Both Edit Text must be focusable and the hint goes up from second one.

Styling a Spinner, appcompat, material

So my app theme extends from AppCompat’s Material Light theme with Dark Action Bar. I applied an accent color. Now I am trying to use a Spinner on a dark backround and because of the theme, the spinner has a dark gray arrow which changes to accent color when pressed. How can I make this […]

Android 5: button underneath softnavigation bar (Showcaseview legacy)

I am using the legacy ShowcaseView for Android. I notice that the Android 5 emulator puts the OK button underneath the softnavigation bar, whereas Android <= KITKAT did not have this behaviour. See the OK button in the lower right corner here: http://imgur.com/SZtIcHr I already tried android:fitsSystemWindows=”true” but no success. Here is the relevant code […]

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