material-design

Import font into React application

六眼飞鱼酱① 提交于 2021-02-07 11:55:14
问题 I'm trying to use the Roboto font in my app and having tough time.. I did npm install --save typeface-roboto and added import 'typeface-roboto' to my React component. But still can't get my font to change. I am trying to do like this : const React = require('react') import 'typeface-roboto' class Example extends React.Component { render() { let styles = { root: { fontFamily: 'Roboto' } } return ( <div style={styles.root}> <p> This text is still not Roboto ?!???!!1 </p> </div> ) } } module

Flutter Custom Title Dropdown (Material Page Filter)

纵饮孤独 提交于 2021-02-07 07:26:47
问题 Following the concept of the app bar "page filter" I'd like to put a DropdownButton as the title of the AppBar . I tried, but it doesn't look good. https://material.io/guidelines/layout/structure.html#structure-app-bar class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => new _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { String _value = 'one'; @override void

Getting right position of clicked button (ripple effect)

半世苍凉 提交于 2021-02-07 03:52:19
问题 I have problem with finding the right position of click. I want to make google material design - ripple effect on clicked button. Circle need to be on button not somewhere else. So when you click on button white circle is showing somewhere else not above the wanted button. Where is the mistake i made? $(function () { var btnClick, bWidth, bHeight, x, y, posX, posY,d; $(".btn").click(function (e) { e.preventDefault(); posX = $(this).offset().left; posY = $(this).offset().top; bWidth = $(this)

Getting right position of clicked button (ripple effect)

╄→гoц情女王★ 提交于 2021-02-07 03:48:02
问题 I have problem with finding the right position of click. I want to make google material design - ripple effect on clicked button. Circle need to be on button not somewhere else. So when you click on button white circle is showing somewhere else not above the wanted button. Where is the mistake i made? $(function () { var btnClick, bWidth, bHeight, x, y, posX, posY,d; $(".btn").click(function (e) { e.preventDefault(); posX = $(this).offset().left; posY = $(this).offset().top; bWidth = $(this)

Getting right position of clicked button (ripple effect)

佐手、 提交于 2021-02-07 03:46:23
问题 I have problem with finding the right position of click. I want to make google material design - ripple effect on clicked button. Circle need to be on button not somewhere else. So when you click on button white circle is showing somewhere else not above the wanted button. Where is the mistake i made? $(function () { var btnClick, bWidth, bHeight, x, y, posX, posY,d; $(".btn").click(function (e) { e.preventDefault(); posX = $(this).offset().left; posY = $(this).offset().top; bWidth = $(this)

How to show/hide BottomAppBar programmatically?

岁酱吖の 提交于 2021-02-07 02:56:54
问题 I try to use an BottomAppBar and I would like to be able to hide or show it programmatically like a setExpanded in an AppBarLayout. My layout is like <androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"> ... </com.google.android.material.appbar

How to show/hide BottomAppBar programmatically?

心不动则不痛 提交于 2021-02-07 02:56:32
问题 I try to use an BottomAppBar and I would like to be able to hide or show it programmatically like a setExpanded in an AppBarLayout. My layout is like <androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"> ... </com.google.android.material.appbar

How to show/hide BottomAppBar programmatically?

非 Y 不嫁゛ 提交于 2021-02-07 02:56:02
问题 I try to use an BottomAppBar and I would like to be able to hide or show it programmatically like a setExpanded in an AppBarLayout. My layout is like <androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/coordinator" android:layout_width="match_parent" android:layout_height="match_parent"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"> ... </com.google.android.material.appbar

Lollipop Progress Bar Tinting

依然范特西╮ 提交于 2021-02-06 07:20:50
问题 I'm on a Lollipop device (MotoG 2014), I read about progress bar tinting, but this is not working...I get the default progress bar color. What am I missing here? <ProgressBar style="?android:attr/progressBarStyleLarge" android:layout_width="50dp" android:layout_height="50dp" android:backgroundTintMode="src_in" android:indeterminate="true" android:indeterminateTint="#f00" /> Many thanks. 回答1: The accepted solution wasn't working for me on pre-Lollipop, but I found this solution to fit all APIs

Lollipop Progress Bar Tinting

喜你入骨 提交于 2021-02-06 07:18:22
问题 I'm on a Lollipop device (MotoG 2014), I read about progress bar tinting, but this is not working...I get the default progress bar color. What am I missing here? <ProgressBar style="?android:attr/progressBarStyleLarge" android:layout_width="50dp" android:layout_height="50dp" android:backgroundTintMode="src_in" android:indeterminate="true" android:indeterminateTint="#f00" /> Many thanks. 回答1: The accepted solution wasn't working for me on pre-Lollipop, but I found this solution to fit all APIs