material-design

Fatal Exception: NoSuchMethodError: No static method setOnApplyWindowInsetsListener

有些话、适合烂在心里 提交于 2019-12-20 01:13:04
问题 How I can fix this ? FATAL EXCEPTION: main Process: a6e69.materialdesigntest, PID: 1981 java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener(Landroid/view/View;Landroid/support/v4/view/OnApplyWindowInsetsListener;)V in class Landroid/support/v4/view/ViewCompatLollipop; or its super classes (declaration of 'android.support.v4.view.ViewCompatLollipop' appears in /data/data/a6e69.materialdesigntest/files/instant-run/dex/slice-internal_impl-24.2.0

Angular Material mdTabs - how to get only the effect of tabs animation not the content?

不羁的心 提交于 2019-12-19 19:47:21
问题 I want to get the animation effect of when someone clicks on the tab and the border below that tab slides to right with the button having a nice ripple effect. I don't want to use the content inside the tab, I just want the tab effect. As you can see, clicking on the second tab will make the border slide to the right but content will also move to left. I only want tab button sliding to the right as part of my effect. How can I achieve this? 回答1: You can use the md-tabs directive without the

getActionBar().setDisplayHomeAsUpEnabled(true); nullpointer in preferenceActivity

假装没事ソ 提交于 2019-12-19 09:58:29
问题 I searched a lot for this issue, but didn't found nothing relevant . I' updated my app project to use api 21, now when i run preferenceactivity i get a nullpointer on that row. This is my code (it's the same code provided from eclipse when creating a new settingsactivity). package com.example.prova; import android.annotation.TargetApi; import android.content.Context; import android.content.res.Configuration; import android.media.Ringtone; import android.media.RingtoneManager; import android

How to change change text and arrow color on Toolbar?

拜拜、爱过 提交于 2019-12-19 05:23:37
问题 I am currently building an app using the new material design guidelines. I am using a Toolbar rather than an action bar. I want the text, overflow icon, and the arrow/hamburger icon (thing that flips over when you pull out the navigation draw) to be white rather than black, but the rest of my theme needs to be the AppCompat.light theme. If someone could please explain how i would go about changing these things, i would be very greatful. I also need to change the colors both in xml and via

Android Status Bar transparent with Navigation Drawer - Appbar elevation

风流意气都作罢 提交于 2019-12-19 04:21:44
问题 I am working on an app with Material Design Guidelines. I have a boilerplate app created by Android Studio. For some reason the status bar has a little gradient at the bottom which creates an illusion of Appbar (Toolbar) being on a higher elevation than status bar. I took a look on Chris Bane's Cheesesquare app for reference and it doesn't look like he is doing anything special to achieve that. Here are the screenshots for reference - Boilerplate app Cheesesquare app Notice that Cheesesquare

Custom seekbar with material design

我的梦境 提交于 2019-12-19 03:39:05
问题 I've got a seekbar in a layout for a custom dialog preference. I changed my styles.xml to use the new material desing. It works because it change text and checkboxes of my settings but I can't apply the color to my seekbar. It works only if I put a seekbar in an activity, it means I have to do something in my custom layout but I don't know what. I post styles.xml and the layout with the seekbar: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppBaseTheme" parent="android

how to use google material icons as class instead of <i> tag

…衆ロ難τιáo~ 提交于 2019-12-19 03:24:38
问题 According to the guideline in the Google Material website we have to use material icons in _ i _ tag. the question is how to add the icons as font-awesome. something like : Class="material-icons face" instead of <i class="material-icons"> face </i> 回答1: Yes,you can add the material icons as classes using the after pseudo elements.check out the fiddle <span class="material-icons face"></span> .face { position:relative; display:inline-block; } .face:after { content: "face"; } 来源: https:/

How do I create an Android material design UI widget?

只愿长相守 提交于 2019-12-19 02:49:22
问题 I did read new android material design guide but i am not able to find anything about how to create this UI widget(element). Apps like Gmail, S converter etc has updated their apps to support new material design. I have added screenshot of it. Here is the link to it. because of low points i can't put the picture. sorry about it Any suggestions on how shall i make it?? 回答1: You are talking about the Floating Action Button. Bottom line is: there is no native "FAB" widget (at least for now), it

How to prevent Snackbar from closing?

我们两清 提交于 2019-12-18 18:54:00
问题 I'm using a control, called Snackbar, from a 3rd party library - github.com/navasmdc/MaterialDesignLibrary. The problem is that it is closing automatically , like a Toast. What i am trying to do: It should stay until i click btn Code snippet i am using new SnackBar(ActSplash.this, "Do you want change color of this button to red?", "yes", new View.OnClickListener() { @Override public void onClick(View v) { ButtonFlat btn = (ButtonFlat) findViewById(R.id.buttonSnackBar); //btn.setTextColor

How to center toolbar back button?

旧街凉风 提交于 2019-12-18 18:48:20
问题 I'm having a problem trying to center the back button on the support toolbar. I'm using it inside an ActionBarActivity. <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:toolbar="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:minHeight="?attr/actionBarSize" toolbar:popupTheme="@style/ThemeOverlay