material

Angular - Material: Progressbar custom color?

*爱你&永不变心* 提交于 2019-11-28 21:36:01
I am now trying for hours. I use Material2 and simply want to change the color of the progress-bar. I know there are those themes (primary/accent/warn) but I want to have a cutom color (green) for my progressbar. I already tried the wierdest css-combinations.. but with no effort. Maybe someone had the same problem? I can suggest to change one of the premade primary/warn/accent colors to your custom color. In your styles.scss (if your style file is css you will have to change it to support scss): @import '~@angular/material/theming'; // Plus imports for other components in your app. // Include

How to change programmatically the primary color in Android L

扶醉桌前 提交于 2019-11-28 19:41:40
Is there a way to change programmatically the primary colors. I would like to do it in code depending the screen/state of the app. Currently I can only set the colors in the theme (static) : <item name="android:colorPrimary">@color/primary_color</item> <item name="android:colorPrimaryDark">@color/dark_color</item> <item name="android:colorBackground">@android:color/white</item> <item name="android:colorAccent">@color/primary_color</item> <item name="android:colorControlHighlight">@color/primary_color</item> Thanks You can, of course, implement custom subclasses of View that have methods for

Lollipop RippleDrawable vs Selector for Pre-Lollipop

主宰稳场 提交于 2019-11-28 15:50:00
问题 I have buttons with different draw9patch png as background. Currently the buttons are controlled by selector which look something like this: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/pressed" android:state_pressed="true"/> <item android:drawable="@drawable/disabled" android:state_enabled="false"/> <item android:drawable="@drawable/focused" android:state_focused="true"/> <item android:drawable="@drawable/default"/> </selector> For

Renderer.Material、Renderer.SharedMaterial的区别

↘锁芯ラ 提交于 2019-11-28 15:39:53
Renderer.sharedMaterial:当多个Renderer共用一个材质时,修改Renderer.sharedMaterial将修改所有引用它的Renderer。 Renderer.material:修改Renderer.material只会影响Renderer本身。 类似的属性还有MeshFilter.mesh、MeshFilter.sharedMesh等。 来源: https://www.cnblogs.com/kingBook/p/11413434.html

How to get materializecss checkbox to work with @Html.CheckBoxFor?

你。 提交于 2019-11-28 12:38:35
So I'm having an issue trying to implement materializecss' checkbox with @Html.CheckBoxFor. If I input exactly: <input type="checkbox" id="test5" /> <label for="test5">Red</label> it works. But if I try this: @Html.LabelFor(m => m.RememberMe, new { @class = "login-label" }) @Html.CheckBoxFor(m => m.RememberMe, new { @type = "checkbox" }) the checkbox disappears way off the page to the left (the style of the checkbox gets its left set to -99999). Is there any other way I can implement CheckBoxFor that would make materialize cooperate? Rafael Contreras I Was having same problem and the order of

three.js updating geometry face materialindex

℡╲_俬逩灬. 提交于 2019-11-28 12:11:08
Is there a way to change the materialIndex on a face of an existing Mesh? This isn't discussed in the How to Update Things documentation, so I am not sure if it's possible. I'm using a WebGLRenderer context for this. This is basically what I'm trying to do: // Make a mesh with two materials var texture = THREE.ImageUtils.loadTexture(IMAGE_URL); var geometry = new THREE.Geometry(); geometry.materials.push(new THREE.MeshBasicMaterial({ wireframe: true, vertexColors: THREE.FaceColors})); geometry.materials.push(new THREE.MeshBasicMaterial({ map: texture, overdraw: true})); whatever.forEach

Create the Layout with CardView and Floating Action Button Android

风格不统一 提交于 2019-11-28 11:24:23
I want to Create the Layout like the Following Image with Material CardView and Custom Floating Action Button: And I was developed upto this Layout xml file as follows : <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:fab="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content"> <RelativeLayout android:id="@+id/mainview" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation=

Three.js texture / image update at runtime

假如想象 提交于 2019-11-28 09:12:16
I am trying to change a cube image at run time by selecting an option from Select Form element. When running the code, the image changes after selecting, but the previous cube and image stays in the scene. How I clear / refresh / update the scene properly when changing the material / image / texture. <div id = "container"></div> <form id = "changesForm"> Cube Image: <br> <select id = "cubeImage"> <option value = "random">Random</option> <option value = "image1">First Image</option> <option value = "Image2">Second Image</option> </select> <br> </form> <script type = "text/javascript"> window

Angular Material 学习笔记 Chips

安稳与你 提交于 2019-11-28 06:03:40
依据 material guidelines, chips 可以用来做 filter https://material.io/design/components/chips.html#filter-chips 但是 ng material 的却很差. 没有 animation 没有勾勾也就算了. click 事件也没有, 要使用 keyboard 的 space 来 select chips.. 这啥操作啊 ... 还有 formControl 在没有 selected 的情况下返回的值是 undefined 而不是 null. 感觉就是很难用.... 来源: https://www.cnblogs.com/keatkeat/p/11396262.html

Displaying background colour through transparent PNG on material?

纵饮孤独 提交于 2019-11-28 00:10:51
I'm making a case builder using THREE.js , the basics are i want to be able to change the height/width/length of a box, rotate it around, and also change the background color of the box. This is it so far: http://design365hosting.co.uk/casebuilder3D/ The dimension changing works, as does the dragging of the box, now i'm working with the background color change. The way i want this to work is by using transparent PNGs as the faces of the box, and setting background colors so that this background colour shows through the transparent PNG. This is how I'm currently doing it: var texture = THREE