material-design

Drawer like Google material design for iOS

放肆的年华 提交于 2019-12-03 12:38:54
问题 I'd like to implement navigation drawer like Uber into iOS(swift). I'm going to achieve it by using a library, called KYDrawerController. https://github.com/ykyouhei/KYDrawerController However, it cannot provide toggle button, only slide action. Thought I'd like to to implement toggle button that shows the navigation drawer,I have no idea how to add such a function to the library. If you know how to add the function to the library, or how to achieve my purpose the other way(such as to use the

How to make the overflow popup menu avoid obstructing the action bar?

丶灬走出姿态 提交于 2019-12-03 12:34:46
Background On my app , when I've updated to the new support library and also tried on Lollipop, I've noticed a weird issue: when clicking on the overflow button of the action bar (or even the new Toolbar class) will show the popup menu on top of the action bar, hiding other action items, as such: Here, the action items that got hidden are uninstallation and sharing. The problem I've tried to avoid this issue, by ovverriding the style of the overflow menu, but nothing has helped. Not only that, but it seems this is an intentional behavior , yet in many Google apps that were updated to have

Expansion-panel from material angular 4

家住魔仙堡 提交于 2019-12-03 12:31:40
I hava an angular 4.4.4 application with material 2.0.0-beta.12 and I want to use the mat-expansion-panel from material design. This is my code : <mat-expansion-panel class="parametersPanel"> <mat-expansion-panel-header> <mat-panel-title> PARAMETERS </mat-panel-title> </mat-expansion-panel-header> <table style="width:100%"> <tbody> <tr class="parameterListItem"> <td class="icon"><img src="assets/images/alert.png"></td> <td class="parameterName">Parameter 1</td> <td class="parameterValue">Value</td> <td class="unit">unit</td> </tr> </tbody> </table> </mat-expansion-panel> So it works well but

Horizontal divider with text in the middle in Flutter?

旧时模样 提交于 2019-12-03 12:10:22
Is there a built in widget in Flutter to create a divider with text in the middle? Any guide on how to do it? Like this: (the "OR" text in the middle of horizontal line) here's is the screenshot of what I want to achieve You can try to use the Row widget. Row( children: <Widget>[ Expanded( child: Divider() ), Text("OR"), Expanded( child: Divider() ), ] ) To expand on Jerome's answer - Here is an example that shows how to embed it with other content and also has additional edgeinsets for coming closer to the actual picture that you want: Column(children: <Widget>[ Row( children: <Widget>[Text(

How to show tick marks for Discrete Slider?

家住魔仙堡 提交于 2019-12-03 12:09:31
I'm trying to style a seekbar/slider like the one labeled Discrete Slider - Click (that has the little tick mark indicators) in the Material Design Guidelines . I can't figure out the magical incantation to have the tickmarks show up, does anyone know how to do this? I have a seekbar with 5 positions (0-4) <SeekBar android:layout_width="match_parent" android:layout_height="wrap_content" android:max="4" /> NameSpace Add tick marks with the style attribute: <SeekBar android:id="@+id/seekBar" style="@style/Widget.AppCompat.SeekBar.Discrete" android:layout_width="match_parent" android:layout

does angular material have a grid system?

拜拜、爱过 提交于 2019-12-03 12:01:49
I'm starting a project with angular material. Does it have a native system for positioning elements in a responive grid like bootstrap does ? Otherwise is it ok practice to combine material design with bootstrap for the grid system ? Maybe I am taking the wrong aproach to the problem. If you are using Material2, you can use Angular Flex Layout for responsiveness. It compliments Angular2 well and is lightweight. Basically Material2 + Flex-layout is equivalent to Bootsrap library. Here's an example of how flex-layout can be used for grid system/responsiveness with Angular/Material2. Sample Code

Align an icon with the Toolbar icon - Android Material Design

僤鯓⒐⒋嵵緔 提交于 2019-12-03 11:58:11
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 inside the image to properly align it? I have same problem with aligning radio buttons or checkbox with

Relation between dp - sp and PX

霸气de小男生 提交于 2019-12-03 11:31:25
问题 I am not asking what is the difference between dp,sp and px. I am designing a website based on google's new material design, all the measurements are in dp (for grid) and sp(for text). My question is how do they translate to pixels. I have been designing websites for more than 4 years and all the measurements (grid and font) are in pixels. For Example: A headline is 24sp, how many pixels does it equate to? (its not 24px, I've tried matching them, it's around 28px but there has to be a

How to Build AppCompatDialog From AlertDialog.Builder or Equivalent?

帅比萌擦擦* 提交于 2019-12-03 11:26:28
Before this I used a DialogBuilder to create AlertDialog like this AlertDialog.Builder builder = new AlertDialog.Builder(context); ... ... AlertDialog dialog = builder.create(); How can I build the new AppCompatDialog from a dialog builder, or is there another new equivalent way to do that? Just found the solution. I should import import android.support.v7.app.AlertDialog; and then AppCompatDialog dialog = builder.create() will work. If you would like to use an AlertDialog , just import the new supprt v 22.1 and use a code like this (pay attention to the import): import android.support.v7.app

How to use selectors to change icons with the new TabLayout

☆樱花仙子☆ 提交于 2019-12-03 11:25:41
I'm using the new support TabLayout from Android. The thing is that I wanted to use selectors to change the icon when a tab is selected. I've been looking into the source code and it seems to me that the it never changes the state of the view (and for that reason I can't use the selector). Does anyone knows some workaround? Thank you! There is way to set customView as a tab with setCustomView(View view) method. So you can create a textview and set a selector to it and set this view to tab. Hope it helps you! Assume your my_selector.xml is, <selector xmlns:android="http://schemas.android.com