material

Android Theme.AppCompat.Light with Dark Toolbar (for light text)

末鹿安然 提交于 2019-11-27 23:36:36
问题 I have an app using Theme.AppCompat.Light which I need to use so Dialogs have the light theme. But this makes the text in my toolbar black, where I'd rather it be white. I've tried setting the toolbar's specific app:theme to AppCompat.Dark.Actionbar , but no luck... I searched around for a while and couldn't find a specific question and answer to this. Here's my default AppTheme : <style name="AppTheme.Parent" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/blue<

How to change programmatically the primary color in Android L?

烈酒焚心 提交于 2019-11-27 20:34:41
问题 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

How can i make a MatDialog draggable / Angular Material

☆樱花仙子☆ 提交于 2019-11-27 19:24:04
Is it possible to make a Angular Material Dialog draggable? I installed angular2-draggable and can of course use the functionality on all other elements. But because the dialogs are dynamically created i can not use ngDraggable on a special element or can use a template variable. Update since Angular Material 7 You can simply use cdkDrag directive from @angular/cdk/drag-drop dialog.html <h1 mat-dialog-title cdkDrag cdkDragRootElement=".cdk-overlay-pane" cdkDragHandle> Hi {{data.name}} </h1> Stackblitz Example Previous answer: Since there is no official solution for that, I'm going to write

创建Material Design风格的Android应用--使用Drawable

倾然丶 夕夏残阳落幕 提交于 2019-11-27 15:34:56
以下Drawables的功能帮助你在应用中实现Material Design: 图片资源着色 在android 5.0(api 21)和更高版本,可以着色bitmap和.9 png 通过定义透明度遮盖。你可以着色通过使用颜色资源或者主题的属性去解析颜色资源(比如, ?android:attr/colorPrimary ).通常我们创建一次,然后资源自适应主题。 你可以给BitmapDrawable或NinePatchDrawable对象着色使用 setTint() 方法。你可以可以在布局文件中使用 android:tint 和 android:tintMode 属性设置着色颜色和着色模式。 从图片中抽取高亮颜色 support library r21和更高的版本中包括了 Palette 类,可以从一个图片中提取高亮颜色。这个类可以提起以下几种突出颜色: Vibrant 充满生机 Vibrant dark 暗的充满生机 Vibrant light 亮的充满生机 Muted 柔和 Muted dark 暗的柔和 Muted light 亮的柔和 传递一个Bitmap对象给静态方法Palette.generate(),它会在后台线程帮你从后台线程提取颜色。如果你不能使用这个后台线程,使用Palette.generateAsync()方法,并且设置一个监听器listener.

Three.js - multiple material plane

橙三吉。 提交于 2019-11-27 14:25:30
问题 I'm trying to have mutiple materials on a single plane to make a simple terrain editor. So I create a couple of materials, and try to assign a matetrial index to each vertex in my plane: var materials = []; materials.push(new THREE.MeshFaceMaterial( { color: 0xff0000 })); materials.push(new THREE.MeshFaceMaterial( { color: 0x00ff00 })); materials.push(new THREE.MeshFaceMaterial( { color: 0x0000ff })); // Plane var planegeo = new THREE.PlaneGeometry( 500, 500, 10, 10 ); planegeo.materials =

How to change android design support library FAB Button border color?

老子叫甜甜 提交于 2019-11-27 13:41:03
I want to change fab button border color. border color is white, inside color is black or transparent I'd like my button to look like this: fab.xml in drawable <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:innerRadius="0dp" android:shape="ring" android:thicknessRatio="2" android:useLevel="false" > <solid android:color="@android:color/transparent" /> <stroke android:width="3dp" android:color="@android:color/white" /> </shape> Floating Action Button in layout <android.support.design.widget.FloatingActionButton android:id="@+id

three.js updating geometry face materialindex

怎甘沉沦 提交于 2019-11-27 06:47:05
问题 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}));

Create the Layout with CardView and Floating Action Button Android

我的梦境 提交于 2019-11-27 06:16:45
问题 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

Flutter Widget

我们两清 提交于 2019-11-27 03:25:00
文章目录 一、Widget分类 二、widget的状态 三、根widget 四、Basics 4.1 模板和主题 4.2 Text文本 4.3 图片 4.4 凸起按钮 4.5 其他widget 4.5.1 Row 4.5.2 container 一、Widget分类 Widget的分类有很多类别,每个类别下面又包含很多Widget,主要包括以下几种类别: Basics:在构建第一个Flutter应用程序之前,需要知道的Basics Widget。 Material Components:Material Design风格的Widget。 Cupertino:iOS风格的Widget。 Accessibility:辅助功能Widget。 Animation and Motion:动画和动作Widget。 Async:Flutter应用程序的异步Widget。 Input:除了在Material Components和Cupertino中的输入Widget外,还可以接受用户输入的Widget。 Interaction Models:响应触摸事件并将用户路由到不同的视图中。 Layout:用于布局的Widget。 Painting and effects:不改变布局、大小、位置的情况下为子Widget应用视觉效果。 Scrolling:滚动相关的Widget。 Styling:主题

Angular Material 2 Table Mat Row Click event also called with button click in Mat Cell

走远了吗. 提交于 2019-11-27 01:50:26
问题 I am new to material 2 and I have implemented mat table and in which I have click event on row to open dialog and there is also a menu button in last column "Action" but on clicking on button it also open dialog box instead of opening menu. Table <mat-table #table [dataSource]="dataSource" matSort (matSortChange)="sortData($event)"> <ng-container matColumnDef="id"> <mat-header-cell *matHeaderCellDef > No. </mat-header-cell> <mat-cell *matCellDef="let element"> <mat-checkbox checked='true'><