material-design

md-datepicker view should display the months only

假装没事ソ 提交于 2019-12-11 02:09:17
问题 I am working on a project and I have a md-datepicker on it and I want this md-datepicker to show only the months of the year(January, February, and so on ......). How can I do this? Here is my code so far: HTML <md-datepicker ng-model="currentDate" md-current-view="month" md-date-filter="monthlyDate"></md-datepicker> JS var app = angular.module("DashboardApp", ['ngMaterial', 'ngAnimate','md.data.table']); app.controller('rptController', ['$scope', function ($scope) { $scope.currentDate = new

(Material) EditText underline color

蓝咒 提交于 2019-12-11 01:29:05
问题 My problem is that I don't know how to change underline color of EditText - I have LG Nexus 5 ( Android 6 ). I would like to change normal underline color to white . I used all params like (style): colorControlNormal colorControlActivated colorControlHighlight textColorSecondary colorPrimary colorPrimaryDark e.g. <style name="FormFont" parent="@android:style/TextAppearance.Medium"> <item name="android:textColor">@color/white</item> <item name="android:textSize">@dimen/form_text_size</item>

TabLayout cannot be resolved to a type- Eclipse

末鹿安然 提交于 2019-12-11 00:58:02
问题 I want to create a TabLayout with ViewPager . I'm using api version 22. I'm getting this error TabLayout cannot be resolved to a type I'm using Eclipse for development. 回答1: You were remaining with adding support library in your project. Before use the design support library, you have to import support-v7-appcompat library from android-sdks\extras\android\support\v7\appcompat. Then, you have to: create an android library project in eclipse for design support library put the contents of

Why does FAB appear different on different Android devices/OS versions?

依然范特西╮ 提交于 2019-12-10 23:31:50
问题 Can anyone tell me why exactly the same image (same image resource file as PNG, and same XML definition below) looks perfect on Android 5.1 and 7.1.1 (the image above) but bad on Android 4.1 (the image below). The above image appears perfect on: Samsung real device 5.1 Pixel API 25 (7.1.1) emulator The below image looks bad on: Samsung real device 4.3 Nexus One API 18 4.2 emulator The XML code: <android.support.design.widget.FloatingActionButton android:id="@+id/myFAB" android:layout_width=

ActionBar covering my activity

女生的网名这么多〃 提交于 2019-12-10 22:31:00
问题 I have an activity whose xml is: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context="ivykoko.com.likechecker.MainActivity"> <android.support.v7.widget.RecyclerView xmlns:android=

Material Button not properly showing on Preview

柔情痞子 提交于 2019-12-10 22:17:42
问题 This question is related to my other question: Material Button - Styles not being applied correctly, ugly as hell Works fine when run on an emulator. API is 21, Android Studio v3.2.1. Is there a way to fix that? Preview: Layout: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width=

Bootstrap material design- floating labels are not floated when data is loaded dynamically

断了今生、忘了曾经 提交于 2019-12-10 20:39:33
问题 I am using bootstrap material design for my angular app. Everything works fine except when I change the models associated with inputs (floating label inputs) programmatically after the page has been loaded, the floating labels are not floated. 回答1: You must fire a change event when you change the value programmatically. 回答2: If you are using Angular2 then no custom directive is needed. On the label do something like this. <label [class.active]="name && name.length > 0">Some Label</label> 来源:

Angular 2 Material Design Multi-select Drop-down Hierarchy Parent Selection State

蓝咒 提交于 2019-12-10 19:49:44
问题 I am working on creating a multi-select drop down in Angular 2 using Material Design. There is a hierarchy in the data elements and I need to implement the Parent-Child selection logic similar to a typical tree structure, wherein upon selecting the parent, all children get selected and de-selecting the parent, de-selects all children. That part is working fine for me. However, I'm facing an issue in showing the state of parent when a partial list of children is selected. In that condition, I

Angular Material Dialog not closing after navigation

假如想象 提交于 2019-12-10 17:22:04
问题 I'm working on an application that shows an overview of entities in a datatable. Every entity has linked entities that are shown as 'xxx linked entities' in a column. When the user clicks on the value of that column, a material dialog opens showing the list of the linked entities. These are all links to other entities. Upon clicking one of these links, the correct page of the entity is shown, but the dialog doesn't close. I does close when using the back button. I am using the

How do I access mat menu trigger from typescript

拜拜、爱过 提交于 2019-12-10 17:09:46
问题 I have the following html: <button mat-icon-button #notificationMenuBtn [matMenuTriggerFor]="notificationsMenu"> </button> <mat-menu #notificationsMenu="matMenu" [overlapTrigger]="false"> </mat-menu> How to I access thematMenuTriggerFor on the notificaitonMenuBtn from typescript? I tried using a View Child (shown below) but I can't seem to bind it to the trigger, only to the button. @ViewChild('notificationMenuBtn') notificationMenuBtn : MatMenuTrigger; this.notificationMenuBtn.openMenu();