material-design

Android Toolbar: title and overflow menus aligment issue on 5.0 only

我是研究僧i 提交于 2019-12-12 03:37:04
问题 I am developing an Android app following Material Design standards, and in order to maintain compatibility I implemented a custom Toolbar as shown here: http://www.android4devs.com/2014/12/how-to-make-material-design-app.html with my code for the toolbar being <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:theme="@style/AppToolbar" android:background="@color/primary" android:orientation="vertical"

Using ReactDOM.render inside an event handler to avoid rendering expensive components

自闭症网瘾萝莉.ら 提交于 2019-12-12 03:14:21
问题 I have a React app with a list of tasks which each have due dates. I want the user to be able to click the due date to pop up a datepicker to select a new one. I am using the material UI library http://www.material-ui.com/#/components/date-picker I could simply render a datepicker on each task in the list but it seems like it might cause performance problems on a long list to render such a complex component on each item. I would prefer to just display the due date and only render the

How do I stop md-cards from stretching images to full vertical height?

泄露秘密 提交于 2019-12-12 02:56:30
问题 I'm experimenting with Angular Material on my personal blog and I've decided to try implementing cards on my main page. Everything looks great on my macbook but when I view the page on a windows machine my images are stretched vertically. After looking a bit closer, it seems that my images are being stretched to their full height. My Code: I'm doing this in an ASP.NET Razor view like so: @foreach (var item in Model) { <md-card> <img src="@Html.DisplayFor(modelItem => item.ImageUrl)" class="md

Generate cards with cardslib and load images with picasso

北慕城南 提交于 2019-12-12 02:04:43
问题 I am using cardslib (https://github.com/gabrielemariotti/cardslib) to create a project with cards and use picasso (http://square.github.io/picasso/), in order to dynamically create cards and load pictures into them with urls that I retrieve from Parse in a for loop. The problem I have is that even though I retrieve the correct data from Parse, only one image is loaded in all of the cards. The titles, subtitles etc are loaded correctly for each separate card, only the image is the same

Using Angular Material classes outside Angular pages

老子叫甜甜 提交于 2019-12-12 01:18:09
问题 We are rebuilding our web application and have chosen to use Angular as frontend framework and Google Material as main style concept because it is simple and popular. Most of our pages will be part of Angular application but some will be not. We want to use the same classes/styles and theme at any page of our application and avoid code duplication. The main question is: how to use Material Design classes from Angular Material toolkit on pages without Angular? We've not found complete Angular

Ripple Effect Duration in Android XML

孤人 提交于 2019-12-12 01:07:45
问题 I am Learning Material Design. I tried ripple effect on button using this gradle dependencies { compile 'com.github.traex.rippleeffect:library:1.3' } from this https://github.com/traex/RippleEffect link there are many attribute which are not working such as app:rv_rippleDuration="1200" app:rv_color="#d3d3d3" I have event on button and ripple effect but when I click on button method is get called. What I want is first ripple effect should get complete then action should occur. XML code

How to apply Google Material Design to ASP.NET Controls (i.e. Checkbox, Button and etc)?

痞子三分冷 提交于 2019-12-12 00:32:44
问题 I'm trying to apply the Google Material Design to my ASP.NET web form controls. I can easily apply to HTML controls, but no chance with ASP.NET. Original Page <form id="signinform" runat="server" class="form-validation animated fadeIn"> <div class="container" id="login-block"> <div class="row"> <div class="col-sm-6 col-md-4 col-md-offset-4"> <div class="account-wall"> <img class="user-img animated fadeIn" src="/Assets/global/images/logo/logo_white.png" /> <asp:PlaceHolder runat="server" ID=

Why angular material select is overflowing the screen

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 23:05:34
问题 I am using angular material select in my application which you can find here https://material.angular.io/components/select/overview. The problem is when we place the select near the bottom of the screen it, and when it is opened, It overflow the screen. This is the screenshot of what I am experiencing. What kind of css is needed to prevant this from happening. <mat-select style="margin-bottom: 0px;" placeholder="{{input1.title}}" > <mat-option>None</mat-option> <mat-option *ngFor="let opt

How can I add 2 tone icons without using any plugin?

跟風遠走 提交于 2019-12-11 19:47:29
问题 I don't want to add any plugins just for one icon in my app but I need two tone because the background color will vary and I don't know when it will be dark and when it will be light. I mean icons like these - https://material.io/tools/icons/?style=twotone where icons have border of different color. 回答1: If i understood your Question Correctly, here is an example of two Color Tone Icon & Text . You can play around with Color, radius & other Parameters to fit your Needs. body: Center( child:

How do I access the Chipgroup content so I could save it?

▼魔方 西西 提交于 2019-12-11 19:34:55
问题 I am using Android's ChipGroup to mark tags on a post, but I'm not sure how do I access them to save them to the database when the user clicks "post". I found one solution that said that you need to iterate through the group's children then the topic was closed, but I can't understand how to do that. Looked at the documentation and didn't see anything helpful. Is there a go-to method to do that? I can think of an option to add the tags string to another array aside from the chipgroup, and