material-design

Floating Action Button appears over Navigation Drawer

最后都变了- 提交于 2020-01-01 09:42:05
问题 So I am using https://github.com/neokree/MaterialNavigationDrawer for my navigation drawer and https://gist.github.com/Jogan/9def6110edf3247825c9 as my FAB implementation. When I open the navigation drawer, it does not cover the FAB, and the button appears on top of it. I would like to avoid hiding the button and showing it on drawer open/close as that is rather distracting. Any ideas on how to fix this? Edit: I am adding the FAB programmatically doing the following: fabButton = new

how to set NAVIGATION_MODE_LIST on Toolbar new appcompat v7 21

风格不统一 提交于 2020-01-01 08:34:10
问题 Now all methods related to navigation modes in the ActionBar class, such as setNavigationMode() ... are now deprecated. The documentation explains: Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other common navigation patterns instead. In my current application, there is a spinner on ActionBar. How do I apply NAVIGATION_MODE_LIST on the new widget Toolbar in the new version appcompat v7 21. Thanks in advance. 回答1: With the API 21

Android CardView with rounded corners displays grey corners

不羁的心 提交于 2020-01-01 07:35:08
问题 I'm inflating a custom layout with CardView inside the layout. The rounded corners are displayed as expected but I also get grey background behind the corners. The code is simple, uses a CardView with corner radius and a background color. I've tried setting transparent background but doesn't work. However, if i set another opaque color, it is displayed in corners. Code is attached. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android

How do I set default value on md-select component from angular 2 material design?

梦想与她 提交于 2020-01-01 07:33:27
问题 I have the following select component that gets populated from a data coming from a rest api. How Can I set default selected value on md-select? <md-select placeholder= "Warehouse" style="width: 100%" [(ngModel)]='selectedProductWarehouse.warehouse' name="Warehouse" required #Warehouse="ngModel"> <md-option *ngFor="let warehouse of warehouses" [value]="warehouse">{{warehouse.description}}</md-option> </md-select> 回答1: you may try below, Component HTML <md-select placeholder="Favorite food" [

How to make md-sidenav-container full height of div in an angular4 app?

旧时模样 提交于 2020-01-01 05:36:09
问题 I have an angular4 app and am using the angular materials framework https://material.angular.io/components/sidenav/examples. I want to make the md-sidenav-container stretch the whole height of the div without covering up the header. I have attached the fullscreen directive, which causes the sidenav to fill the whole height of the screen thus covering up the header component. This is not what I want. The images show the sidenav stretch above the header, as well as another attempt where it

Sticky footer in Angular 2 Material

谁都会走 提交于 2020-01-01 05:32:05
问题 I have been searching and searching for about 3 hours now because I didn't want to have to ask, but how can I keep a 'footer' variable at the bottom but not like fixed at the bottom, so if the content I have is very small it won't just sit halfway in the page but if I have lots of information it won't lock right at the bottom of the page and sit there over data while you scroll I have tried several ways including this: https://david-kerwick.github.io/2017/01/14/material-2-flex-layout-making-a

Using Angular2 With Material Design Lite

柔情痞子 提交于 2020-01-01 05:31:29
问题 I am learning Angular2 but I have problem about using Angular2 with MDL. Why MDL navigation bar is not working with Angular2? When I use Navigation bar with header and drawer, drawer is not working so I cannot click on it, I cannot see drawer's icon. There is another problem: textfields also is not working correctly. I want to use mdl-textfield--expandable (Search) but when I click on this search field it is not expanding. However, without Angular2 it is working fine. UPDATE it is my app.html

FloatingActionButton setVisibility() not working

谁都会走 提交于 2020-01-01 04:24:08
问题 I can't hide my FloatingActionButton . Here is my code: XML: <CoordinatorLayout> <AppBarLayout android:id="@+id/appbar"> <CollapsingToolbarLayout> <ImageView/> <android.support.v7.widget.Toolbar /> </CollapsingToolbarLayout> </AppBarLayout> <NestedScrollView /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" app:layout_anchor="@id/appbar" app:layout_anchorGravity="bottom|right|end"/> </CoordinatorLayout> And I'm calling: fab.clearAnimation(); fab.setVisibility(View

How do add shadow above a view in android

眉间皱痕 提交于 2020-01-01 02:34:12
问题 I have a view that is to server as a footer title. It is just a view, that you may think of as a button or a textview or a layout (I am open to anything really). Here is the xml <RelativeLayout> <ScrollView >… </ScrollView> //match parent width and height <MyBottomView/> // align parent bottom </RelativeLayout> So as you can see the ScrollView does scroll below MyBottomView. I want to add a top shadow to the MyBottomView so it looks more like Material Design. How might I do that? 回答1: Here

iOS Android Material Design Hierarchical Timing using UICollectionView

时光总嘲笑我的痴心妄想 提交于 2020-01-01 02:32:11
问题 I want to do the animation introduced by Android Material Design Hierarchical Timing in iOS using UICollectionView Lets say its a collectionView, and resizing the view is not an issue, what would be the best practice to do this animation in that timely fashion. How to perform the delay 回答1: One way to do this would be to add the cells one at a time with a timer, and have those cells expand to full size as they come on to the window. #import "ViewController.h" #import "RDCollectionViewCell.h"