material

Can we drag and drop md-list item or md-cards in angular material design

那年仲夏 提交于 2019-12-06 05:44:13
Can we drag and drop md-list item or md-cards in angular material design using jQuery or other framework? I can give a partial answer to this. It is not recommended to add jQuery to an Angular project. Angular is controller-centric while jQuery is focused on manipulating the DOM. They are really different approaches, and while you could possibly get something to work using jQuery and Angular together--it would tend to be a fragile and overly complex solution. The same holds for Angular Material. It's not a great basis for jQuery operations. That having been said, see also my comment on your

Lighting maps_练习一

强颜欢笑 提交于 2019-12-06 05:12:07
尝试在片段着色器中反转镜面光贴图的颜色值,让木头显示镜面高光而钢制边缘不反光(由于钢制边缘中有一些裂缝,边缘仍会显示一些镜面高光,虽然强度会小很多) 1 #version 330 core 2 out vec4 FragColor; 3 4 struct Material { 5 sampler2D diffuse; 6 sampler2D specular; 7 float shininess; 8 }; 9 10 struct Light { 11 vec3 position; 12 13 vec3 ambient; 14 vec3 diffuse; 15 vec3 specular; 16 }; 17 18 in vec3 FragPos; 19 in vec3 Normal; 20 in vec2 TexCoords; 21 22 uniform vec3 viewPos; 23 uniform Material material; 24 uniform Light light; 25 26 void main() 27 { 28 // ambient 29 vec3 ambient = light.ambient * vec3(texture(material.diffuse, TexCoords)); 30 31 // diffuse 32 vec3 norm =

彻底理解 Android 中的阴影

好久不见. 提交于 2019-12-06 02:58:09
如果我们想创造更好的 Android App,我相信我们需要遵循 Material Design 的设计规范。一般而言,Material Design 是一个包含光线,材质和投影的三维环境。如果我们想要在 App 的开发过程中,跟随 Material Design 的设计原则,那么理解 光 与 阴影 就显得尤为重要了。 我将尝试解释本文中的以下主题。 Android 中的 3D 深度(Depth) Z 轴,Elevation 和 Translation Z。 光源 按钮状态(按下和静止) Outline 自定义的 ViewOutlineProvider 在深入到阴影和光线之前,我想告诉你我们的真实环境什么? 什么是 3D? 真实的物质环境,是一个三维空间,这意味着所有的物体对象都有 X、Y 和 Z 维度。Z轴与显示器的平面垂直对齐,正 Z 轴朝向观察者延伸。在 Material Design 的世界里,每个物体都有 1dp 的厚度。 image Android 的 Depth Material Design 不同于其他的设计指南,因为它增加了 Depth(深度)的概念。而 Depth 在真实的视觉中,有重要的意义。 我们可以认为我们桌子上有一层纸,如果我们再贴一张纸,我们的眼睛会觉得它有一个深度。 让我们通过 Material Design 的应用截图来想象它。 image

How to change tabs width in material UI

こ雲淡風輕ζ 提交于 2019-12-06 01:26:29
I am using material UI tabs v0.20.0 for display content in tabular format. Tabs are taking full width. I have attached screenshot of expected and current output . Expected output Current Output Please let me know solution for same. Thanks in advance If you want tabs of fixed width, you need to override the root css class passed to the Tab component, where you have to override both the minWidth and width attributes. Example: const Component = ({ classes }) => ( <Tabs value={0}> <Tab classes={{ root: classes.tab }} label="One" /> <Tab classes={{ root: classes.tab }} label="Two" /> </Tabs> ); //

Sticky toolbar material 2 and sidenav

偶尔善良 提交于 2019-12-06 00:20:59
问题 Started recently learning material 2 and ran to issue. My approach is to do a sidenav as in Youtube website. There is a hamburger menu on left which expands/collapses side menu. Code: <md-toolbar class="fixed-header"> <button class="app-icon-button" (click)="start.toggle()"> <i class="material-icons app-toolbar-menu">menu</i> </button> </md-toolbar> <md-sidenav-container> <md-sidenav #start class="app-sidebar" mode="side">test</md-sidenav> <div class="text"> {{ text }} </div> </md-sidenav

How to use Chips component from android support library?

人走茶凉 提交于 2019-12-06 00:16:09
问题 I have read the documentation on the official website. But I was unable to implement Chip in my project following the documentation. Android Studio can't find and import Chip class as well as Chip view. I have also noticed that on Google Developer site there is no reference for Chip class. There are some similar questions. But all answers point to use a third-party library. But I am trying to use Chips component from android support library. 回答1: The feature is included in support library

Is there a way to refresh virtual repeat container?

你说的曾经没有我的故事 提交于 2019-12-05 13:47:06
I've got a md-virtual-repeat-container that handles the data from an API call triggered by a search box. I'd like to be able to refresh this container when a user enters a second search query. I'm using a setup similar to this plnkr which is from this question: . The only difference is its getting data from a server when the user enters a search term. My Question Is there a way to trigger a refresh an md-virtual-repeat-container ? I don't think the code is relevant but here's my (simplified) production code: var self = this; self.infiniteItems = { numLoaded_: 0, toLoad_: 0, items: [],

Android style 主题资源文件

元气小坏坏 提交于 2019-12-05 12:43:26
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="DefaultTheme" parent="android:Theme.Material.NoActionBar"> </style> <style name="DefaultLightTheme" parent="android:Theme.Material.Light"> </style> <style name="DefaultLightDarkTheme" parent="android:Theme.Material.Light.DarkActionBar"> </style> <style name="RedTheme" parent="android:Theme.Material.NoActionBar"> <!-- 状态栏颜色,会被statusBarColor效果覆盖--> <item name="android:colorPrimaryDark">@color/status_red</item> <!-- 状态栏颜色,继承自colorPrimaryDark --> <item name="android:statusBarColor">@color/status_red</item> <!-- actionBar颜色 --> <item

Android Style and Theme

老子叫甜甜 提交于 2019-12-05 12:38:49
1. 样式(Style)是指为 View 或窗口指定外观和格式的属性集合。 主题(Theme)是指对整个 Activity 或应用而不是对单个 View应用的样式。 以主题形式应用样式时,Activity 或应用中的每个视图都将应用其支持的每个样式属性。 简单的说,一个Activity可以设置一个主题,而该主题中包含多个样式,如ActionBar的样式,ActionMode的样式,以及该Activity中字体颜色/大小等等. 2. 主题对应的API API 1: android:Theme 默认 android:Theme.Black android:Theme.Light 背景白色 android:Theme.Wallpaper android:Theme.Translucent android:Theme.Panel android:Theme.Dialog API 11: android:Theme.Holo Holo android:Theme.Holo.Black android:Theme.Holo.Light API 14: Theme.DeviceDefault Theme.DeviceDefault.Black Theme.DeviceDefault.Light API 21: Theme.Material Theme.Material.Light 3. API:

three.js 测试1

跟風遠走 提交于 2019-12-05 06:57:57
关键看一下里面的注释 代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> </head> <body> <script src="three.js"></script> <script type="text/javascript"> //基础知识恶补 //场景(THREE.Scene): // 是所有不同对象的容器,也就是说该对象保存所有物体、光源、摄像机以及渲染所需的其他对象 //材质: 原文:https://www.cnblogs.com/amy2011/p/6148736.html // 材质就像物体的皮肤,决定了几何体的外表,例如是否像草地/金属,是否透明,是否显示线框等 // Three.js提供了一个材质基类THREE.Material,该基类拥有three.js所有材质的公有属性 // 材质的公共属性分类: // 基础属性:ID,name,透明度,是否可见,是否需要刷新等 // 融合属性:决定了物体如何与背景融合 // 高级属性:可以控制WEBGL上下文渲染物体的方法,大多数情况下,是不会用这些属性,我们这里不再讨论 var camera, scene, renderer; var geometry, material, mesh; init(); animate();