material-design

No material widget found textfield widgets require a material widget ancestor

两盒软妹~` 提交于 2020-02-19 09:48:22
问题 Hi I am trying to build a login screen in flutter but I am getting below error when opening it. No material widget found textfield widgets require a material widget ancestor import 'package:flutter/material.dart'; Widget LoginPage() { return new Container( height: MediaQuery.of(context).size.height, decoration: BoxDecoration( color: Colors.white, image: DecorationImage( colorFilter: new ColorFilter.mode( Colors.black.withOpacity(0.05), BlendMode.dstATop), image: AssetImage('assets/images

No material widget found textfield widgets require a material widget ancestor

元气小坏坏 提交于 2020-02-19 09:48:05
问题 Hi I am trying to build a login screen in flutter but I am getting below error when opening it. No material widget found textfield widgets require a material widget ancestor import 'package:flutter/material.dart'; Widget LoginPage() { return new Container( height: MediaQuery.of(context).size.height, decoration: BoxDecoration( color: Colors.white, image: DecorationImage( colorFilter: new ColorFilter.mode( Colors.black.withOpacity(0.05), BlendMode.dstATop), image: AssetImage('assets/images

How to set up flexible grid in Vue Material

ε祈祈猫儿з 提交于 2020-02-09 02:16:40
问题 I am attempting to build an interface that uses Vue-Material to render user-inputted cards in a grid. the cards render properly. However, I want my grid to flex, justify, and stagger the different-sized cards in a way that removes gaps, as seen below: The following code corresponds with the above grid: <template> <div class="content"> <div class="md-layout"> <div v-for="post in posts.slice().reverse()" :key="post.id" class="md-layout-item md-size-20 md-xsmall-size-100" > <md-card> <md-card

Cannot apply style for custom edit text

坚强是说给别人听的谎言 提交于 2020-02-05 04:26:07
问题 I'm trying to apply TextInputLayout theme programmatically to create a custom edit text once and use it anywhere. This is my Custom edit text class: package com.enjoyapps.weddingapp.view; import android.content.Context; import android.graphics.Color; import android.util.AttributeSet; import androidx.appcompat.view.ContextThemeWrapper; import com.enjoyapps.weddingapp.R; import com.google.android.material.textfield.TextInputLayout; public class CustomEditText extends TextInputLayout { public

How can I design a Google+ like, nav-bar using angular material

≯℡__Kan透↙ 提交于 2020-02-05 03:37:05
问题 How can I design a nav-bar styled like the one Google+ has using angular material ? I don't know how to get this nav bar, and with the search box styled this way, it thought material design made by google was used for this, but i can't see such things in angular material implementation. I wanted to make a style similar to G+ for an app, coz it's very nice and suitable for that one. 回答1: Here you go! It´s not exactly as the design but it´s a good starting point for you.. http://codepen.io

Removing the extra top space in CoordinatorLayout- Android

你说的曾经没有我的故事 提交于 2020-02-03 05:11:10
问题 I am trying to use BottomSheetBehavior to make a layout similar to what google maps is providing. I am successful in using the BottomSheetBehavior and create slide up layout. The problem I am having now is CordinatorLayout takes extra space even when my layout is collapsed. Below is a screenshot of my layout. White background in my main activity layout Pink is my collapsed layout with peekHeight And the grey background is the one which should be transparent but takes the extra space. My main

@Viewchild can not see matSort

梦想的初衷 提交于 2020-02-02 11:28:12
问题 In my Angular application, my @ViewChild instance is failing to fill HTL matSort. mycomponent.ts: import { MatSort } from '@angular/material'; export class MyClassComponent { @ViewChild(MatSort) sort: MatSort; } ngOnInit() { console.log(this.sort); // undefined } mycomponent.html: <mat-table #table [dataSource]="dataSource" matSort> ....................................................... ....................................................... </mat-table> I need to use sortChange from matSort

AppBarLayout CollapsingToolbar how to disable expand on EditText click?

懵懂的女人 提交于 2020-02-02 04:39:05
问题 In my test app I disable expansion of AppBarLayout when it is collapsed (by scrolling RecycleView ). I do that by adding addOnOffsetChangedListener to AppBarLayout . However, when I click EditText it expands again but, I do not want it to expand. How to disable the expansion of AppBarLayout when I click EditText ? I have put the whole code, so that everyone can copy/paste the code, create new project and test this fast. Here is how the .gif looks Here is XML code: <?xml version="1.0" encoding

Wrong button style when creating AlertDialog with androidx DialogFragment

你。 提交于 2020-02-02 03:08:09
问题 Here is my root style: <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> And here is how I create dialog: override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { return AlertDialog.Builder(requireActivity()) .apply { setMessage(R.string.dialog_delete_service_message) setPositiveButton( R.string.dialog_delete_service_positive_button ) { _, _ -> listener?.onConfirmed() } setNegativeButton(R.string.dialog_delete_service_negative_button, null) }.create() }

What does TranslationZ actually do in Android?

这一生的挚爱 提交于 2020-02-01 17:40:59
问题 Hi I am developing android application in which I am trying to implement new material design features. I tried to apply both elevation property and TranslationZ property but it is not working. <Button android:id="@+id/button1" style="@style/ButtonStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" android:text="Name" /> <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape=