material-design

How to do a custom app bar from large title to small with animation?

南楼画角 提交于 2019-12-24 10:49:06
问题 I means this: The transition occurs as the content on the layer begin to scroll. It's similarly to prominent from material.io. But I don't know how to do it. I could not find an example. 回答1: Introduce This is implemented by View : Toolbar and CollapsingToolbarLayout inside AppBarLayout . Solution New project -> Choose Scrolling Activity -> Next -> Finish You will see similar activity_main.xml <com.google.android.material.appbar.AppBarLayout android:id="@+id/app_bar" android:layout_width=

Which Google document should be followed for Android icon sizes?

我的未来我决定 提交于 2019-12-24 10:21:16
问题 Google's Android document on Iconography says that action bar icons should be 32x32 while its document on Action Bar Icons says that they should be 24x24 for the baseline that is presumably mdpi. I thought that Android document on Iconography was obsolete, but Google usually is good at marking obsolete/deprecate features. Could anyone shed some light on this? 回答1: This is the first time I am hearing about the site you are referring to. I believe it was the older version of "developer.android

Align Toolbar title and SearchView with list content with avatars

♀尐吖头ヾ 提交于 2019-12-24 09:49:49
问题 I'm trying to follow the material guidelines and I aligned the Toolbar title with the avatar like the image below following the instructions of @ChrisBanes in this answer. My issue now is that when the SearchView is activated, it's not aligned anymore as seen in the second image. (It was aligned before changing the inset) Any ideas of how I can align both things instead of having to choose between one or the other? 回答1: If you want to align avatar with search-view then you need remove space

How to set five column in row with Materialize Design?

…衆ロ難τιáo~ 提交于 2019-12-24 08:02:05
问题 I am using materialize design framework for responsive html page. We can easily manage 2, 3, 4 column in a row. But right now i want to show 5 column in a row. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css"> <!-- Compiled and minified JavaScript --> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/js/materialize.min.js"></script> <div class="container"> <div class="row"> <div class="col l3"> <img src="https

Material Design Table is not accepting dataSource object

我的未来我决定 提交于 2019-12-24 05:08:10
问题 I am getting following error: compiler.js:486 Uncaught Error: Template parse errors: Can't bind to 'dataSource' since it isn't a known property of 'table'. I am inserting a table into a custom material modal component which should show a list of history entries. HistoryComponent: import { Component, OnInit, ViewChild } from "@angular/core"; import { MatTableDataSource, MatSort } from "@angular/material"; @Component({ selector: "app-history", templateUrl: "./history.component.html", styleUrls:

DividerItemDecoration doesn't show up in RecyclerView

人盡茶涼 提交于 2019-12-24 03:27:50
问题 I found that DividerItemDecoration work fine with simple, one line list items, but with more complex one it refuses to show up. Here's the XML of list item: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:orientation="horizontal" xmlns:android="http://schemas.android.com/apk/res/android" > <ImageView android:layout_width="60dp" android:layout

How to avoid Material UI Select focus when option is chosen?

天涯浪子 提交于 2019-12-24 02:08:46
问题 I am trying to make an interface with a pair of Select and Input from Material UI components library. I want the current behaviour for my UI/UX in the next order: 1. User chose option from Select element 2. Input will be focused when user chose something from Select You can see how it's works (see the second Select , because the first one is a native Select , and it's not suitable for my purpose): https://codesandbox.io/s/l4nq3pjjrm The first one in the example above works great, but I need

InflateException Error inflating class android.support.design.widget.CoordinatorLayout

醉酒当歌 提交于 2019-12-24 01:44:36
问题 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.atech.a_business, PID: 30662 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.atech.a_business/com.atech.a_business.layout.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3124) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3233) at

Angular - mat-grid-list not displaying children passed by <ng-content>

人走茶凉 提交于 2019-12-24 01:13:22
问题 I'm using angular material design components and want to create a custom grid-list component. The component would adapt the number of grid-list-columns based on its size. The components template would look like this: <mat-grid-list [cols]="adaptiveCols"> <ng-content></ng-content> </mat-grid-list> And the component will be used like this: <my-grid> <mat-grid-tile>tile_content</mat-grid-tile> <mat-grid-tile>tile_content</mat-grid-tile> <mat-grid-tile>tile_content</mat-grid-tile> </my-grid> So

?attr/selectableItemBackground effect shows only on longtap

我是研究僧i 提交于 2019-12-24 01:04:09
问题 I've noticed that the effect created by the attribute ?attr/selectableItemBackground only shows when I long tap the view. But I want it to be shown on every tap. View is clickable and has on click listener. How to do that? 回答1: I've noticed there was a change in the behavior between Lollipop and Marshmallow: Lollipop - it would start the ripple on press. Marshmallow - the ripple starts on release. Could that be the issue? I would stick to the device Look & Feel but you could try this