material-design

Android full screen dialog appears transparent and in the wrong position

拈花ヽ惹草 提交于 2019-12-12 10:53:17
问题 I'm trying to add a dialog to my android app which is full screen on small devices (e.g. mobile phone) but a standard dialog on large devices (e.g. tablets). This follows the logic laid out in the material design specification. Using the official android dialog guide, using a DialogFragment, I end up with a transparent dialog that overlays the action bar: Below is the source code. main.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android=

What is the way to add horizontal scroll on material-ui table with many columns?

旧巷老猫 提交于 2019-12-12 10:43:31
问题 I follow this table example for react material-ui framework and I am looking for a possibility to make my table scrollable horizontally when I have a lot of columns. For instance I have many columns that are squeezed to fit page width, hence their content is shortened. I think it's described in material-ui spec by link Display the full column content and enable horizontal scrolling in the table container. So I wonder if it's possible in material-ui. 回答1: Only overflow-x is not enough. Adding

Android API 21 changes my custom button background

a 夏天 提交于 2019-12-12 10:14:13
问题 I am testing out my app for API21 on Android! Unfortunately, my buttons seem weird - there is some kind of background color added. The background images did not change - they are completely transparent except for the border. (The different text and size is due to the screenshot). Here you see the buttons before and since API 21: http://imgur.com/9EEcl0o,yVEnJkI#0 I already tried android:elevation="0dp" and android:background="@android:color/transparent". Anybody knows why my buttons change?

How to remove this gray color from topbar/status bar

只愿长相守 提交于 2019-12-12 09:45:49
问题 I have an app where I have set the top bar / status bar to ascent colors, its working for most screens on lollipop but having an issue on one of the screen its an activity. The code is as follows: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.realsales.reatsalesapp.activities.EditContactActivity"> <android.support.v7.widget

How do I add elevation (shadow) to my BottomNavigationView. It doesn't come by default

寵の児 提交于 2019-12-12 09:34:01
问题 I tried setting elevation from xml and programmatically both. But nothing works. 回答1: It only works if you set white as android:background in the BottomNavigationView. This is my code and it's working: <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="bottom" android:background="@color/white" app:elevation="8dp" app:itemIconTint="@color/bottom_color_state" app

How to set the color of icon in Android toolbar?

て烟熏妆下的殇ゞ 提交于 2019-12-12 09:19:41
问题 I forked a GitHub project from https://github.com/nglauber/playground/tree/master/android/DemoSearch I would like to set the color of the search icon to be pure white. At the moment, the search icon is gray in color, and is obviously different from the white text of "Demo Search". Edit: Based on some suggestions, I created a new icon using pure white (to be exact, RGB=255,255,255), and use it in place of the android:ic_menu_search. Android will tint it with a gray tone (verified with color

Importing a lot of modules in Angular

吃可爱长大的小学妹 提交于 2019-12-12 09:12:01
问题 I'm building an app with Angular 4 and Angular Material, each Material directive requires me to import its module separately.. For example, i'm building a navigation bar, this is how the nav.module.ts starts to look like: import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {NavComponent} from './nav.component'; import { AngularFontAwesomeModule } from 'angular-font-awesome/angular-font-awesome'; import { MdInputModule } from '@angular/material'; import

Change Material design theme for Angular 2

寵の児 提交于 2019-12-12 08:49:15
问题 I am trying to use Angular Material 2 with my Angular 2 application. I did not found how to change material theme globally ( primaryColor , etc). I know that Angular Material 2 is still in alpha, but is there currently a way to do that? 回答1: Here's an example of dynamic Angular Material theme implementation as of Angular 5.1 and Angular Material 5.0. (edit) - Currently tested and working in angular 7+ as well. Working editable example - https://stackblitz.com/edit/dynamic-material-theming In

Implementing Ripple Effect in Toolbar

送分小仙女□ 提交于 2019-12-12 08:18:19
问题 I am trying to add this Ripple effect on my toolbar https://github.com/traex/RippleEffect but currently I'm lost on how to do this. base on how to add toolbar <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="56dp" android:background="@color/app_secondary_color" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:theme="@style/ThemeOverlay.AppCompat.ActionBar" > </android.support.v7.widget.Toolbar> then setting in

Align an icon with the Toolbar icon - Android Material Design

自古美人都是妖i 提交于 2019-12-12 07:47:49
问题 In the new Material Design (using AppCompat), I am trying to align some action icons with the drawer icon of the new toolbar. Something like: I think I am looking in all the metrics correctly... Touch Target Size The problem is that I can't perfectly align it, because after that left padding of 16px, the icons should start, but the icon itself has also some "padding" (icon from material github), like: Maybe is silly but I do not know what I am missing. How can I take into account the padding