Menu
  • HOME
  • TAGS

Appcompat v7 Material checkbox changing color to default black in Lollipop devices

android,checkbox,android-5.0-lollipop,material-design,appcompat-v7-r22.1

Remove this line: android:button="@drawable/abc_btn_check_material" Your CheckBox should be styled automatically, without setting android:button property. ...

How to set the date in materialize datepicker

javascript,jquery,datepicker,material-design

Materialize datepicker is a modified pickadate.js picker. Accodging to their API docs, this is how to set the picker: Get the picker: var $input = $('.datepicker').pickadate() // Use the picker object directly. var picker = $input.pickadate('picker') Set the date: // Using arrays formatted as [YEAR, MONTH, DATE]. picker.set('select', [2015, 3,...

What is new features of Android Design Support Library and how to use its Snackbar?

android,material-design,android-design-library,android-snackbar

As for Snackbar,it acts like a Toast but is different with a Toast. Snackbars are shown on the bottom of the screen and contain text with an optional single action. They automatically time out after the given time length by animating off the screen. In addition, users can swipe them...

Suggested method to override button background colour?

css,material-design,materialize,materializecss

It seems that red and green works fine. <link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.96.1/css/materialize.css" rel="stylesheet" /> <button class="btn waves-effect waves-light red" type="submit" name="action">Submit <i class="mdi-content-send right"></i> </button> <button class="btn waves-effect waves-light green" type="submit" name="action">Submit <i class="mdi-content-send right"></i> </button> ...

how to use own material design icons with materializecss?

css,material-design,materializecss

Well, the is an alternative solution provided by this website. It's include preety much a good number of icons such as social buttons. http://materialdesignicons.com/getting-started You just have to add this css link to get the icons and add them as classes <link href="css/materialdesignicons.min.css" media="all" rel="stylesheet" type="text/css" /> and <i class="mdi...

Change background on FloatingActionButton?

android,android-layout,material-design

Ok I figured it out. Turns out you do have to set the background to a drawable (thanks @Nilesh), but there was something wrong with the drawable I was setting it to. I used this: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="oval"> <solid android:color="@color/al_color_accent_orange_light"/> </shape> </item> </layer-list> as my...

How to properly style material buttons in android

android,android-button,material-design

Add: android:background="?android:attr/selectableItemBackgroundBorderless" ...

Stylizing material buttons in Android v21

android,android-5.0-lollipop,android-button,material-design,android-theme

You can use android:background="?android:attr/selectableItemBackground" to get a rectangular ripple. Alternatively, you can create your own drawable. Here's the XML for the framework's selectable item background: drawable/item_background_material.xml: <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:attr/colorControlHighlight"> <item android:id="@android:id/mask"> <color android:color="@android:color/white" /> </item> </ripple> ...

Use higher API level in android with an external library

java,android,api,android-studio,material-design

You can use limited features from material design in pre-lollipop versions. No Path Animations and such. Check out this link to see which features can be backported. http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html Although now it is appcompat-v22 which is the latest SDK released by Google....

Implementing SearchView as per the material design guidelines

android,material-design,searchview

Taking a hint from @Zielony's answer I did the following: 1) Instead if using an ActionBar or ToolBar I built my own layout (basically a RelativeLayout with burger menu, search and other menu buttons and a EditText for search) 2) Used a theme without an ActionBar, placed my custom layout...

Material Design in Angular won't work

javascript,angularjs,material-design

Clean up your javascript libraries, the order is important! jQuery.js angular.js all angular sub modules your application scripts var app = angular.module('startApp', ['ngMaterial' ]); app.controller('MainController', ['$scope', function($scope) { $scope.title = 'Web page'; $scope.array = [{ name: 'data 1', duration: '01:42', creationdate: new Date('2014', '03', '08') }, { name: 'data 2',...

How can I make the ripple effect look like a circle instead of an oval?

android,android-5.0-lollipop,material-design,rippledrawable

Yes . I too had the same issues. The effect is purely dependent on the dimension of the object. for eg a 512*512 image gave me perfect circled ripple effect and a rectangular button on the bottom of the screen gave me oval/ellipsed effect. so i added a small square...

CollapsingToolbarLayout | Scrolling and layout issues

android,xml,material-design,android-design-library,collapsingtoolbarlayout

You need to add app:layout_behavior="@string/appbar_scrolling_view_behavior" to your NestedScrollView - this marks the class which should be positioned below the AppBarLayout (and hence, below the CollapsingToolbarLayout).

Sliding Tabs in Toolbar using Material Design

android,android-layout,material-design,android-tabs

I was able to recreate exactly what you are looking to implement. I am using the this Library for the tabs. This is the view I have created: Import Library Through Dependencies or Download Project and Import Manually compile 'com.jpardogo.materialtabstrip:library:1.0.9' styles.xml <resources> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> </style>...

Floating toolbar with text selection controls

android,toolbar,material-design,textselection

If you are using Android Support Library revision 22.2, be aware that floating toolbars are not backward-compatible and appcompat takes control over ActionMode objects by default. so this will only work on Android-M preview you can test by creating AVD M-preview emulator. Here this link shows Behavior change...

Ripple effect on custom navigation drawer

android,navigation-drawer,material-design

As you are using appcompat you can add this to the XML for your navigation drawer item android:background="?attr/selectableItemBackground". This should provide the ripple effect on Lollipop devices and a fallback grey highlight for older devices....

Material Design: Bootstrap 3 Responsive Navbar

css,twitter-bootstrap,user-interface,twitter-bootstrap-3,material-design

I wrote my own minimal bootstrap navbar stylesheet which builds on top of Bootstrap variables. /* material navbar */ .material-navbar { /* Hides normally visible elements important notes: @grid-float-breakpoint - point at which navbar becomes uncollapsed @grid-float-breakpoint-max - point at which the navbar begins collapsing */ > * { width:...

Elevation not working on android.support.design.widget.FloatingActionButton

android,material-design,floating-action-button

After a lot of research, I've found the proper way to use FAB with no issues. Use the code below as template: <android.support.design.widget.FloatingActionButton xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/your_id" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_marginBottom="@dimen/floating_button_margin_bottom" android:layout_marginRight="@dimen/floating_button_margin_right"...

NavigationView menu items with counter on the right

android,navigation-drawer,material-design,androiddesignsupport,navigationview

Looking at the source for NavigationView, they currently do not support any custom rendering of the menu items (See NavigationMenuPresenter and NavigationMenuAdapter). Hopefully they expose more functionalities soon as I want to set a custom font on the menu items but am unable to without using reflection.

Ionic framework + Google material design, which framework to use? [closed]

angularjs,ionic-framework,material-design,materializecss

I haven't used the Ionic Material tool much, but agree it is primarily a fun dev tool and not ready for production (not that it might be eventually, but its certainly not as field tested as Ionic itself). Can Ionic and jQuery work together? Sure. Its really can Angular and...

TextInputLayout not showing EditText hint before user focus on it

android,material-design,android-design-library

As mentioned by @shkschneider, this is a known bug. Github user @ljubisa987 recently posted a Gist for a workaround: https://gist.github.com/ljubisa987/e33cd5597da07172c55d As noted in the comments, the workaround only works on Android Lollipop and older. It does not work on the Android M Preview....

ng-animate does not work with ng-repeat

javascript,angularjs,material-design,ng-animate

I was looking into animations with md-list today. I simplified your code and adjusted the layout to get it to work. I also updated to latest material and angular 1.4.1. This should be enough to get u started: http://plnkr.co/edit/y1SClyHOT2GEnXvdhvlf?p=preview ...

Translucent Status Bar on Kitkat, Tinted Status Bar on Lollipop

android,android-5.0-lollipop,statusbar,android-4.4-kitkat,material-design

Try adding <item name="android:windowTranslucentStatus">false</item> <item name="android:fitsSystemWindows">false</item> to either values/styles.xml or values-v21/styles.xml. When you define a style for a certain API level it will be applied not only to that version, but also to all higher versions, unless explicitly specified otherwise....

How to color the status bar with styles attributes in all Android versions?

android,android-5.0-lollipop,compatibility,material-design,android-styles

On Lollipop versions it's fine but it's not working at all when I deploy on a device with API lower than v21, I still see the black status bar and the primaryDark is totally ignored. Is it the right way? Your primary dark is ignored on all pre-lolipop devices...

FloatingActionButton no border?

android,material-design

Just add app:borderWidth="0dp" in your layout file: <android.support.design.widget.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/fab" app:borderWidth="0dp" android:background="@android:color/transparent" android.support.design:fabSize="normal" android:adjustViewBounds="true" style="@style/Fab"/> There is also added advantage of adding this, it fixes the problem of square FAB in API<15....

How to customize item background and item text color inside NavigationView?

android,material-design,drawerlayout,android-design-library,navigationview

itemBackground, itemIconTint and itemTextColor are simple xml-attributes that can be set, though you have to use a custom prefix instead of the android: one. Example <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <!-- Other layout views -->...

Android material tabs w/ appcompat

android,material-design,android-tabs

What am I missing? Action bar tabs were deprecated in Android 5.0, last fall. Can someone point me in the right direction for developing a tabbed application. Use TabLayout, though this is a very new addition to the Android Support libraries. Or, use ViewPager with your favorite tabbed indicator,...

Android Design Support Library

android,android-support-library,material-design

The Design Support Library only provides some components introduced by Material Design. To use the Material Design theme, you have to use AppCompat Support Library (or set your minSdkVersion to 21 or higher). So even if you are developing for API 21+, you still won't have access to those components...

Clear button in md-input

angularjs,material-design

This is not possible with existing version of angular material (v0.9.0) but is targeted to v0.10.0. See more information here: https://github.com/angular/material/issues/2802#issuecomment-101764802 However, there is a Angular directive that might be used as a workaround. https://github.com/dcohenb/angular-clear-input...

Android Material CardView with full screen image on Cardview

android,material-design,android-cardview

What you're looking for is a translucent status bar. When you have this configured you're able achieve this effect. Make also sure to remove the actionbar as I do in my example down below, otherwise you'll have to make it transparent. Change your v21/themes.xml file to this: <style name="Theme.MyTheme" parent="Theme.AppCompat.Light.NoActionBar">...

RippleDrawable NOT drawing over Views

android,android-layout,android-5.0-lollipop,material-design

as you can see from your own code ('setBackground') , you're setting the ripple as a BACKGROUND that's why it's being drawn on the background. ImageView on android API 21 added this "hack" for the ripple android:drawSelectorOnTop="true". But the library you're using didn't add the same hack to it. There's...

How to change RecyclerView Card's color dynamically

android,material-design,recyclerview,android-recyclerview

Ok. So I found a great way to change the color dynamically for things like the new cards feature on Material Design. A how-to can be found here. This code allows you to generate the palette synchronously when you have access to the underlying image loading thread. To have access...

CollapsingToolbarLayout | Scrolling and layout issues 2

android,xml,material-design,android-design-library,collapsingtoolbarlayout

Question 1 Add android:fitsSystemWindows="true" to your AppBarLayout, CollapsingToolbarLayout, and to your ImageView. I'm guessing a part of your image is below the status bar (due to these lines being missing) which is why you can't see the top of the image. Question 2 collapseMode="pin" only affects how the Toolbar reacts...

Disable ripple effect on Listview

android,listview,android-listview,material-design,ripple

Possibly a duplicate question. But as a summary: try disabling those elements in your adapter. You can use the .areAllItemsEnabled() and .isEnabled() callbacks for this purpose.

android StateListAnimator in pre Lollipop

android,material-design

StateListAnimator is an Animator launched when a state has been changed. It's possible to implement that on older versions of Android. I'm working on backporting those in Carbon, but for now the library supports only elevation animation. To implement a state animator extend a View, and override drawableStateChanged: 397 @Override...

Fab button android onClick is crashing the app?

java,android,material-design

The FloatingActionButton from this library extends ImageView which extends View: https://github.com/makovkastar/FloatingActionButton/blob/master/library/src/main/java/com/melnykov/fab/FloatingActionButton.java It is not a subclass of the Android Button. Cast instead to FloatingActionButton: FloatingActionButton myButton = (FloatingActionButton) findViewById(R.id.fab); ...

Android ListView animation material deisgn

android,android-5.0-lollipop,material-design

ListView is now replaced by RecyclerView for Lollipop per MaterialDesign. This is a simple RecyclerView example with default MaterialDesign animations. RecyclerView Simple example...

Where do I learn polymer material design with complete documentation and examples?

javascript,cordova,polymer,material-design,hybrid-mobile-app

From Google's Material Design sight: http://www.google.com/design/spec/material-design/introduction.html

Question mark instead of RTL field

android,material-design,android-tablelayout,android-toolbar

Thanks to @anil Finally i find two way for problem : change source file encoding in Settings>File Encoding : if problem not resolve : First way + Using Strings from resources (R.String.nameOfString) instead type them directly in Java source code ...

Angular-material theming issue

angularjs,material-design,material,angular-material

Which version are you using? If you are using the latest version, there are no separate built-in themes in angular material design, as they used to be. You will have to configure themes in your app config, as below. The below example changes the primary pallette to blue for default...

Android Toolbar not working [duplicate]

android,android-actionbar,material-design,android-toolbar

Change your styles to this: <style name="AppTheme" parent="Theme.AppCompat.Light"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> </style> or inherit Theme.AppCompat.Light.NoActionBar: <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary</item> <item...

How to realize this custom popup menu with Material Design Android?

android,menu,material-design

you can use a ListPopupWindow, submitting your custom adapter, through which you can control the layout of every single row of the ListPopupWindow. As for a normal PopupWindow you have to provide an anchor view and additionally you have to call setContentWidth on the instance of ListPopupWindow, which sets the...

Ripple effect overflowing out of circular button

javascript,jquery,html,css,material-design

check this link , i have made changes .expand-row .expand-button .host-expand{ width:100%; display:block; } add the above code....

When using the CoordinatorLayout my ScrollView has an incorrect size

android,android-support-library,material-design,android-scrollview,android-design-library

The standard ScrollView is only meant to be used as a parent. You need change the scrollview to a android.support.v4.widget.NestedScrollView. An example can be seen in the reference documentation for AppBarLayout....

Disable icon colorStateList in NavigationView

android,material-design,android-design-library

Is there no way for me to force NavigationView to stop tinting my icons? There sure is. You can do so programmatically using NavigationView.setItemIconTintList. And you can do so in your XML layout by using the NavigationView.itemIconTint attribute. Programmatically yourNavigationView.setItemIconTintList(null); From XML <android.support.design.widget.NavigationView ... app:itemIconTint="@android:color/black" ... /> Results ...

Implement Icon morph animation in Javascript/CSS?

javascript,css,material-design,css-shapes

Right, I have come up with a similar look to show that this sort of thing is possible via CSS only. You will notice some differences, some of which maybe the way I coded this but you get the point. So here it is! Note: Stackoverflow's code snippets don't...

Android material design - Creating Tool Bar

android,material-design

Purpose of having different styles.xml is that you can add changes specific to the Android version. But then you need to maintain same changes in both the files. If you are testing your application on device having Android version 5.0 lollipop then style defined in v21/styles.xml will reflect in your...

Angular Material Slider example not working

javascript,angularjs,material-design,material

The problem is that you have this: <html lang="en" ng-app="StarterApp"> And this: angular.module('sliderDemo1' Either they should both be StarterApp or they should both be sliderDemo1: <html lang="en" ng-app="StarterApp"> angular.module('StarterApp' Or <html lang="en" ng-app="sliderDemo1"> angular.module('sliderDemo1' Also note that the HTML references {{rating}} which is never defined. That seems like a mistake...

What is the recommended material design toolbar height in landscape

android,material-design

The Toolbar is a generic component that can be added to any part of your UI - when used as the primary action bar for branding, navigation, and actions, it is called an App Bar. From the metrics on the App Bar, the correct heights are: Mobile Landscape: 48dp Mobile...

Change ListView's ScrollBar/FastScroll color?

android,android-listview,material-design

Scrollbar thumb color is set to the android:colorAccent attribute in your app theme. You are sure that is set and is correct, right? Note that if you're using AppCompat, you will have to exclude the android: prefix from the attribute. You can find more information on available color attributes here....

FloatingActionButton, square button below API level 17

android,material-design,android-design-library

This is known by Google and will be fix soon in the next version of the Design Support Library, see this issue: FAB Appears as a square on API 16. It should only concern API 16. The workaround, proposed in the same thread, is to add app:borderWidth="0dp" to your FAB....

Polymer.js without material design?

polymer,material-design

Polymer is not equal to material design. It's only a library that makes developing web components a lot easier. It won't stop you from creating new components that follow other design guidelines (although currently the paper-elements make most of the UI web components provided by Polymer). And as for styling,...

Google Material Design Growing Textarea while typing

javascript,jquery,html,css,material-design

You are creating all the Material Design CSS & Jquery by yourself? Otherwise, I found Material Design textarea like you mentioned in here: Source: http://materializecss.com/forms.html Check out their Textarea part....

Creating and Selecting Angular Material Tab

javascript,angularjs,material-design,angular-material

The major issue I discovered was that your newIndex in the add wasn't 0-based, as push returns the new length: var newIndex = tabs.push({ title: title, content: view, disabled: false}); $timeout(function() { $scope.selectedIndex = newIndex - 1; }); I wrapped the change in a $timeout, otherwise tabs hasn't updated yet...

How to use a TabLayout with Toolbar inside CollapsingToolbarLayout?

android,material-design,android-toolbar,android-design-library

Here's the way I managed to do this, I don't think that's the best solution though if anyone finds a better way please feel free to post the answer. <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/main_content" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.v4.view.ViewPager android:id="@+id/viewpager"...

Material design animation

android,animation,material-design

I asked a similar question and came across with few things that helped me achieve the same. Here is the link to the question that i asked Check it Hope it helps you...

Angular Material — $mdDialog.show() returning scope items to parent scope

javascript,angularjs,angularjs-scope,material-design,angular-material

You can pass the $scope of your controller to your $mdDialog as an example below $mdDialog.show({ parent: angular.element(document.body), template: tmpl, scope: $scope, controller: 'myCtrl' }); Check plunkr : http://plnkr.co/edit/0hFWEyWdetTXcPLPkbmQ?p=preview To move application logic to factory you will be doing something like this $scope.upload = factory.upload(files,$scope.username); and factory will have method...

Is there a native component for the Floating action button in Android Material Design?

android,material-design,floating-action-button,android-design-library

Today (29/05/2015) it is officially avaiable with the new Material Design support Library. Just add this dependency to your build.gradle compile 'com.android.support:design:22.2.0' Add this view to your layout: <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:src="@drawable/ic_done" /> And use it: FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);...

NavigationView throwing error: No resource identifier found for attribute 'menu' in package

android,material-design,drawerlayout,androiddesignsupport,navigationview

Make sure you have the correct dependency to the Android Design Support Library. It's easy to choose the wrong one - because it seems that Google postet two different dependency strings: At the time of this answer, the Android developer blog (and the comment by user hungryghost) had the correct...

CollapsingToolbarLayout not working(collapsing)when scrolled

android,material-design,android-toolbar,androiddesignsupport,collapsingtoolbarlayout

You should use RecyclerView instead of ListView Note: don't forget to update RecyclerView in Gradle file. compile 'com.android.support:recyclerview-v7:22.2.0' ...

SlidingTabLayout: why preload next tab?

android,android-studio,material-design,android-sliding,pagerslidingtabstrip

Is like a pre-load of the next tab for performance optimization? Yes. How can I avoid it? Don't use ViewPager. The idea behind ViewPager is that the user can swipe between pages. That requires the pages on either side of the current page to be loaded, so the animation...

Designing Toolbar and using Floating Action Buttons

android,android-animation,material-design,android-toolbar,floating-action-button

Designing the Toolbar: Looking at these specifications and guidelines from Google, I managed to setup my extended Toolbar how I wanted using the correct specifications and measurements. In my case, I was using Fragments to change the main content (where the Views inside the extended Toolbar would also be different),...

Why is my Material AngularJS (CSS) not working as in the demo provided?

html,css,angularjs,material-design,angular-material

You need to inject the dependency into your app, like so .module('MyApp', ['ngMaterial']), and make sure the js for ngMaterial is loaded in your index.html. Just rewriting ".module('MyApp', ['ngMaterial'])" in the codepen seems to do the trick

Android Snackbar - Changing its alignment from bottom of screen to top of screen

android,material-design,android-design-library,snackbar,android-snackbar

It is possible to make the snackbar appear on top of the screen using this: Snackbar snack = Snackbar.make(parentLayout, str, Snackbar.LENGTH_LONG); View view = snack.getView(); FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)view.getLayoutParams(); params.gravity = Gravity.TOP; view.setLayoutParams(params); snack.show() Note: The animation from the snackbar begins from the bottom and surges up to the top...

Material Design scroll [closed]

android,material-design

It's called CollapsingToolbarLayout (it's very easy to implement), check new Design Support Library: http://developer.android.com/reference/android/support/design/widget/CollapsingToolbarLayout.html http://android-developers.blogspot.com/2015/05/android-design-support-library.html...

decrease the size of Material Navigation drawer-drawer

android,navigation-drawer,material-design

change the layout_width to required size <android.support.v7.widget.RecyclerView android:id="@+id/RecyclerView" android:layout_width="320dp" android:layout_height="match_parent" android:layout_gravity="left" android:background="#ffffff" android:scrollbars="vertical"> </android.support.v7.widget.RecyclerView> ...

SlidingTabLayout: replace with fragment

android,android-fragments,material-design,pagerslidingtabstrip

I find a solution. I made the following update to my layout: Linear Layout ToolBar Linear Layout (id: parentScroll) SlidingTabLayout ViewPager Frame Layout (id: parent) So when I need to hide all the tabs and the ViewPager, in order to inflate a new Fragment in the Frame Layout, I do...

Material transition design for android

android,android-fragments,material-design,android-transitions

I am author of Transitions-Everywhere, so maybe i can help. Any real reasons to use different fragments in this case? Fragment transitions are not backported for now, i doesn't have to much free time for this. You can perform transition this way: TransitionSet transitionSet = new TransitionSet(); transitionSet.addTransition(new Slide(Gravity.BOTTOM)); transitionSet.addTransition(new...

How to set shared checkable behavior across all groups in NavigationView?

android,navigation-drawer,android-support-library,material-design,navigationview

Here's the solution. Step 1: Remove android:checkableBehavior="single" from both groups. Step 2: Add the following logic to the listener: mUiNavigationView.setNavigationItemSelectedListener( new NavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(MenuItem menuItem) { menuItem.setCheckable(true); menuItem.setChecked(true); if (mPreviousMenuItem != null) { mPreviousMenuItem.setChecked(false); } mPreviousMenuItem = menuItem; //... setDrawerMenuItem(...); return true; } }); Note:...

Sliding Menu dont show tabs

android,material-design,slidingmenu

I found my problem, it wasnt clearly in my question because i didnt posted the AbstractActivity class, where I was already calling the setContent method, so the problem was that I was calling setContent twice.. Thanks for your help.

How to implement FAB without support library in API >= 21

android,material-design,fab

I don't know what's your approach, but if you need a good FAB I can recommend this library Clans/FloatingActionButton This library requires Android API Level 14+; its easy to use and you no need to worry about Google FAB design or Lollipop target and include goods animations and very fast...

Android button default background

android,android-layout,material-design,android-styles

You can use the style="?android:attr/borderlessButtonStyle" as a Button's style. This will give you a flat style look and will work on any pre-lollipop devices too. Reference: http://developer.android.com/reference/android/R.attr.html#borderlessButtonStyle If you are not interesed in backward compactibility then use can use the Raised Button which has the ripple effect and requires a...

CardView Click state not working [closed]

android,material-design,android-cardview

Please try this.. add android:clickable="true" and android:focusable="true" and change android:foreground to android:foreground="?android:selectableItemBackground" <android.support.v7.widget.CardView android:layout_width="fill_parent" android:layout_height="wrap_content" card_view:cardCornerRadius="3dp" android:layout_marginTop="9dp" android:layout_marginLeft="9dp" android:layout_marginRight="9dp" card_view:cardElevation="0.01dp" android:layout_marginBottom="0dp" android:clickable="true" android:focusable="true"...

incorrect status bar translucent displays on sony on lollipop

android,styles,statusbar,material-design,material

Simply remove: <item name="android:windowTranslucentStatus">true</item> from the "BATheme", or change it in: <item name="android:windowTranslucentStatus">false</item> if there a styles.xml with that parameter set as true....

Android color for Material Design

android,colors,material-design

Here is a complete list of all the material design colors you will ever need. If you're looking for good color combinations for your app, then check out Material Palette Edit: Here is an XML file containing all(?) of the Material design colors....

Android: material design's Floating Action Button (FAB) and shifting views

android,android-listview,material-design,floating-action-button,fab

There's no stock Android implementation of FAB, but I've used this implementation of FAB's in couple of my projects and its working great and supports the material greatness! so given the fact that there's no FAB implementation on Android, you should go for a 3rd party implementation By shifting views...

Toolbar With Ic_drawer

android,material-design,android-toolbar

DrawerLayout using the similar way like FrameLayout to organise view's z-order. So instead of this: <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <include android:id="@+id/tool_bar" layout="@layout/toolbar"> </include> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello World" /> </LinearLayout> <FrameLayout android:id="@+id/content_frame"...

How can define “materializecss” modal “before” (beforeload) functionality

javascript,jquery,css,material-design

Sorry about my earlier answer, I thought you were not getting the modal to work at all... You used some CSS rules that affect the responsiveness and width of the modal, and for center aligning the content in the modal you just need another rule. Just modified the CSS, replaced...

Angular material md-toolbar expansion transition

javascript,angularjs,css3,material-design,angular-material

Short answer: Add the following to your css: .md-toolbar.md-tall { max-height: 0px; } CodePen: http://codepen.io/anon/pen/WvodLL Long answer: Angular material's toolbar (md-toolbar) has a height of 64px. Angular actually sets the height, min-height and max-height to 64px. The tall toolbar (md-toolbar.md-tall) has double that height (and min-/max-height as well). See https://github.com/angular/material/blob/master/src/components/toolbar/toolbar.scss...

How to add a gradient to a ImageView nested in a CollapsingToolbar

android,imageview,android-support-library,material-design,collapsingtoolbarlayout

Wrap your ImageView in a FrameLayout and add a View with a background: <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/backimg" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:layout_collapseMode="parallax" android:scaleType="centerCrop" android:src="@drawable/image" app:layout_scrollFlags="scroll|enterAlways" /> <View android:layout_width="match_parent"...

Android Material Design - How to change background color of Toolbar after CollapsingToolbarLayout is collapsed

android,material-design,collapsingtoolbarlayout

I think you're after app:contentScrim. <android.support.design.widget.CollapsingToolbarLayout ... app:contentScrim="?attr/colorPrimary"> <!-- Toolbar and ImageView here --> </android.support.design.widget.CollapsingToolbarLayout> ...

Polymer core-localstoreage TypeError: Cannot read property 'save' of undefined

polymer,material-design

You are looping the creation of a static ID tag, and because you shouldn't have duplicates of an ID, it is throwing an error. Lines causing the issue: <template repeat="{{data}}" > <core-localstorage id="storage" name="codelab-app-storage" value="{{data}}"></core-localstorage> </template> ...

Material Navigation Drawer with recycle view and Card view

android,android-studio,material-design

Try changing your layout file to this and see if you notice any difference. <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:card_view="http://schemas.android.com/apk/res-auto" android:id="@+id/DrawerLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:elevation="7dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"...

android.support.v4.widget.CircleImageView does not work

android,circle,material-design

The CircleImageView is a private class of the support library and cannot be used. But it is easy to create this effect yourself without the CircleImageView. You just need to define a <shape /> drawable with a transparent circle in the middle similar to this: <shape android:innerRadius="0dp" android:shape="ring" android:thicknessRatio="1" android:useLevel="false"...

Android button looks different after rotating to landscape and still after rotating back

android,shape,material-design,layer-list,floating-action-button

I suggest to you to use FloatingActionButton included in Android Design Support Library. Simply add compile 'com.android.support:design:22.2.0' to your Gradle file, and use the FloatingActionBar view class into your layout! Example: <android.support.design.widget.FloatingActionButton android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android:src="@drawable/your_drawable" /> ...

How to fill a view with another with Material Design Animation?

android,animation,material-design

The solution to do that is pathInterpolator and the name of this effect is Curved Motion. Animations in material design rely on curves for time interpolation and spatial movement patterns. With Android 5.0 (API level 21) and above, you can define custom timing curves and curved motion patterns for animations....

How to used Material Design Transition when fragment changed in Android?

android,material-design,android-transitions

These transitions are for activities, not for fragments, See below from documentation these are specified for windowExitTransition & windowEnterTransition <style name="BaseAppTheme" parent="android:Theme.Material"> <!-- enable window content transitions --> <item name="android:windowContentTransitions">true</item> <!-- specify enter and exit transitions --> <item name="android:windowEnterTransition">@transition/explode</item> <item...

CoordinatorLayout not working

android,material-design,android-design-library

I believe you need to make your ListView implement both ScrollingView and NestedScrollingChild interfaces. It's not the easiest thing, but you should be able to do it if you look at RecyclerView's source code. It makes use of a NestedScrollingChildHelper and you should be able to do the same....

Restore dialog after screen rotation

android,android-alertdialog,material-design

Put your dialog inside an DialogFragment: public static class MyAlertDialogFragment extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { MaterialDialog dialog = new MaterialDialog.Builder(context).customView(R.layout.dialog_edit_point_info, false) .positiveText(R.string.ok).negativeText(R.string.cancel) .positiveColorRes(R.color.dark_blue).negativeColorRes(R.color.black) .iconRes(R.drawable.ic_marker_location) .autoDismiss(false)...

Android ActionBar on Lollipop not styling correctly

android,android-5.0-lollipop,material-design,android-styles

The issue is that u use ActionBar while the other apps use ToolBar. Read about and change your code, everything should work after that.

md-select - how to force required?

html,angularjs,material-design,angular-material

You can rely on Angular to do the validation for this, rather than the browser. Here's my forked example: http://codepen.io/anon/pen/rVGLZV Specifically: <button type="submit" ng-disabled="myForm.$invalid">submit</button> To keep the submit button disabled until the form is valid and, <form novalidate name="myForm"> To name the form and tell the browser not to do...

ActionBar with material design sliding tabs

java,android,xml,material-design

The best way is add it in your AndroidManifest file. You can apply a theme to any activity by including android:theme inside <activity> inside manifest file. For example: <activity android:theme="@android:style/Theme.Dialog"> <activity android:theme="@style/CustomTheme"> And if you want to set theme programatically then use setTheme() before calling setContentView() and super.onCreate() method inside...