material-design

Collapsing Toolbar image disappearing when scolling up

给你一囗甜甜゛ 提交于 2019-12-12 18:18:31
问题 I am trying to implement a collapsing toolbar with a large header image. I want the image to start very big (and it works) and not collapse entirely (that works too). The problem is that when the toolbar reaches minimum collapsable height the image disappears, fading to the app's primary color. I want the image to stay visible even when collapsed. Also, the back button is scolling up along with the picture, and I want it to keep fixed in place. The activity's xml: <android.support.design

Sticky header md-table-container angular js material design

心已入冬 提交于 2019-12-12 17:11:51
问题 table-container to display records. I have a requirement, when table reaches to top of the screen it's header stick to top. Please guide me to implement this requirement. For example see this link http://angular-data-grid.github.io/demo/fixed-header/angular-md-grid.html#!?page=1&itemsPerPage=75 Thank you, Java4you. 回答1: Using the Angular Material table, adding the following to the .scss file for the containing component will now achieve this, but not in IE unfortunately: .mat-header-row {

Angular Material 2: How to refresh md-table after add data to datasource?

北城余情 提交于 2019-12-12 16:28:45
问题 Could someone put a complete example of a mat-table with datasource adding a data later on when the table is loaded and the table is updated? My program manages to show the table, the load of data, the dialog box that asks for the new data, the data to add to the database, but I do not know how to refresh the table I found this example connect(): Observable<UserVModel[]> { return this._userService.dataChanged .switchMap(() => this._userService.getAllUsers() } in this link: Angular Material 2:

Polymer paper ripple

北慕城南 提交于 2019-12-12 14:18:40
问题 I am trying to change the color of an element when a button is pressed. I want a paper ripple effect to be triggered in that element when the button is pressed and the color changes. How am I supposed to do that? Target element: <paper-toolbar class="abc"> <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button> <div flex class="indent title">Heading</div> </paper-toolbar> Trigger element: <paper-button class="def background-blue"></paper-button> <paper-button class="def

Xamarin.Android How to set the ripple effect programmatically on any view?

我怕爱的太早我们不能终老 提交于 2019-12-12 12:44:21
问题 First time asking a question here so lets see... I'm having trouble with setting the ripple effect programmatically onto a CardView. (But i hope to find a way that works basically on any kind of view) The thing is, my cards are made programmatically like this : ... //make cardview CardView result = new CardView(Activity); //set layout LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, 100, 1f); layoutParams.SetMargins(10, 10, 10, 10); result.LayoutParameters =

Keystone with Material Design Bootstrap Incompatible units: 'rem' and 'px'

余生长醉 提交于 2019-12-12 12:12:29
问题 Did anyone managed to add the SCSS from Material Design Bootstrap in the default template of Keystone.js ? I am new to node.js and front-end development so I am not sure what I am doing but, I bascially added the MDB folder in my public/styles . After that I've modified the sites.scss , I commented out @import "site/variables"; and @import "site/layout"; and I added @import "mdb"; but this does not really seemed to work. I get the error: in /my_path/public/styles/mdb/free/data/_variables-b4

Elevation effect for ImageButton on Pre-Lollipop devices

强颜欢笑 提交于 2019-12-12 12:11:52
问题 I am trying the apply elevation effect for ImageButton. It works well on my Nexus tablet running Android 5.0 but elevation does not work on Pre-Lollipop devices. Tried ViewCompat.setElevation(view, evaluationValue) but nothing changed. I saw some applications like Swarm or Gmail apps use elevation effect for their FAB (Floating Action Button) on Pre-Lollipop devices. Do you have an idea how they use elevation? 回答1: You cannot use elevation pre 5.0, you need to provide an image with a "shadow"

Cheesesquare: enterAlways produces wrong layout

笑着哭i 提交于 2019-12-12 11:14:32
问题 Adding enterAlways to the scroll flags of the Cheesesquare demo: <android.support.design.widget.CollapsingToolbarLayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:contentScrim="?attr/colorPrimary" app:layout_scrollFlags="scroll|exitUntilCollapsed|enterAlways"> results in a wrong layout: During scrolling down, the header comes in correctly but it doesn't stop in the correct position.

Set Date format for material-datepicker in angular 2

纵饮孤独 提交于 2019-12-12 11:12:48
问题 I am new in 'angular2' and 'angular js material'. I am using material-datepicker in my project. This is my the date picker code <material-datepicker placeholder="Select Date" [(date)]="currentDate" name="currentDate" required></material-datepicker> It will be display in browser as shown below. My concern is date format issue. How to set the date format from 2017/04/27 to April 27 2017. 回答1: You can use dateFormat option an specify MMMM DD YYYY tokens where: MMMM is name month DD is day of the

How to Validate & Display Error Message - Angular2 Material Design?

懵懂的女人 提交于 2019-12-12 11:05:05
问题 I have this input: <form #f="ngForm" name="productForm"> <md-input [(ngModel)]="product.price" name="price" required="true" placeholder="Price (USD)"></md-input> <div ng-messages="productForm.price.$error" role="alert"> <div ng-message-exp="['required']"> Price is required </div> </div> </form> But the message Price is required doesn't show up. How should I properly format the error message? The ng-invalid class appears when the price input is empty: When I fill in something: Angular injects