material-design

How to bind knockout checkbox to a material design lite?

て烟熏妆下的殇ゞ 提交于 2019-12-06 04:08:11
I am having problems in bind a Knockout array with Material Design Lite checkbox. Basically it doesn't show the checkbox checked. How can that be fixed? var ViewModel = function() { this.uniqueTabsNames = ko.observableArray(['one', 'two', 'three']); } ko.applyBindings(new ViewModel()); <link href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en" rel="stylesheet" /> <link href="https://cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.3.0/material.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs

How to create Toolbar Tabs with ViewPager in material design

微笑、不失礼 提交于 2019-12-06 03:19:38
问题 Anyone know anything about how tabs are done in API 21/AppCompat Toolbar? A lot of materials and articles what I found were old. They used old methods with ActionBar which don`t work now. At this moment I just created toolbar and have no ideas about toolbar tabs. So can anyone give examples or articles about how to make toolbar tabs with viewpager? 回答1: Anyone know anything about how tabs are done in API 21/AppCompat Toolbar? There are no Toolbar tabs. The pattern of having tabs in the action

No resource found that matches the given name (at 'android:color Primary')

时光怂恿深爱的人放手 提交于 2019-12-06 03:11:11
问题 <resources> <!-- inherit from the material theme --> <style name="AppTheme" parent="android:Theme.Material"> <!-- Main theme colors --> <!-- your app branding color for the app bar --> <item name="android:colorPrimary">@color/primary</item> <!-- darker variant for the status bar and contextual app bars --> <item name="android:colorPrimaryDark">@color/primary_dark</item> <!-- theme UI controls like checkboxes and text fields --> <item name="android:colorAccent">@color/accent</item> </style> <

Custom auto hide floatingActionButton behavior is not working

心已入冬 提交于 2019-12-06 02:44:36
问题 I'm trying to hide a FloatingActionButton when a NestedScrollView scroll down, and revealed itself when NestedScrollView scroll up. Here is my layout: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <android.support.design.widget

What package to download for material design icons?

这一生的挚爱 提交于 2019-12-06 02:30:00
问题 If I go to https://design.google.com/icons/ and I select an icon to download, it gives me the option of downloading the 18dp, 24dp, 36dp, or 48dp version. I downloaded the 24dp package and it came with the hdpi, mdpi, xhdpi, xxhdpi, and xxxhdpi images. So I'm not sure what the difference is from downloading the other packages of 18dp, 36dp, or 48dp. Does anyone know the difference? What would be the best one to download to have the best compatibility across the majority of android devices?

How to use Chips component from android support library?

人走茶凉 提交于 2019-12-06 00:16:09
问题 I have read the documentation on the official website. But I was unable to implement Chip in my project following the documentation. Android Studio can't find and import Chip class as well as Chip view. I have also noticed that on Google Developer site there is no reference for Chip class. There are some similar questions. But all answers point to use a third-party library. But I am trying to use Chips component from android support library. 回答1: The feature is included in support library

How to set Material design style to disabled EditText (android)?

倾然丶 夕夏残阳落幕 提交于 2019-12-05 23:33:24
问题 I'm trying to make my disabled EditText's style like in guidelines: https://www.google.com/design/spec/components/text-fields.html#text-fields-labels <EditText android:id="@+id/account_number" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/test_account" android:enabled="false" /> I've already implemented material design styles, so all my widgets look material. The question is: Is there any way to get this dotted underline using styles , without

white background for date picker dialog shadow

感情迁移 提交于 2019-12-05 22:34:48
I add datepicker to my application but my problem the shadow for the dialog have white background , use Android 21 for compile . please help me to remove white background ... You have a "bug" in your themes.xml or styles.xml material design support library is not working properly with dialogs. So remove the specific dialog code or separate it in different versions. Trying to explain a little bit further. Generally when we extend the original application theme we have an themes.xml and/or styles.xml files under the values folder. In there code you will find something like these: Application

MaterializeCss modal Error openModal is not a function

老子叫甜甜 提交于 2019-12-05 22:24:42
I have all requirements Jquery, Materialize.js sitting above my Js file however I get the warning openModal is not a function..I checked the modal name is right and I can run Materialize.toast so I know Materialize.js is working. Triggering with the button does not call the modal either. Here is the code.. Scripts: <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="/js/materialize.js"></script> <script type="text/javascript" src="/js/video.js"></script> <script src="/js/admin.js"></script> Trigger: <button data-target=

Ripple effect on Spinner dropdown items colored background (appcompat-v7 V21)

回眸只為那壹抹淺笑 提交于 2019-12-05 22:09:52
问题 I tried to apply ripple effect on Spinner dropdown items, like this: activity.java ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( this, R.array.array_name, R.layout.simple_spinner_dropdown_item); adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item); Spinner mSpinner = (Spinner) findViewById(R.id.spinner); mSpinner.setAdapter(adapter); simple_spinner_dropdown_item.xml <?xml version="1.0" encoding="utf-8"?> <CheckedTextView xmlns:android="http://schemas