Questions tagged [material-design]

Material design is Google's guide for visual, motion, and interaction design across platforms and devices, introduced with Android 5.0 Lollipop.

material-design
Filter by
Sorted by
Tagged with
599 votes
42 answers
796k views

How to change progress bar's progress color in Android

I'm using an horizontal progress bar in my Android application, and I want to change its progress color (which is Yellow by default). How can I do it using code (not XML)?
WhiteTigerK's user avatar
  • 6,941
597 votes
27 answers
453k views

This Activity already has an action bar supplied by the window decor

Trying to move over my stuff to use Toolbar instead of action bar but I keep getting an error saying java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tyczj.weddingalbum/com.xxx....
tyczj's user avatar
  • 72.4k
381 votes
36 answers
292k views

How to implement endless list with RecyclerView?

I would like to change ListView to RecyclerView. I want to use the onScroll of the OnScrollListener in RecyclerView to determine if a user scrolled to the end of the list. How do I know if a user ...
erdna's user avatar
  • 3,962
346 votes
12 answers
624k views

Android Material Design Button Styles

I'm confused on button styles for material design. I'd like to get colorful raised buttons like in the attached link., like the "force stop" and "uninstall" buttons seen under the usage section. Are ...
xsorifc28's user avatar
  • 5,132
335 votes
23 answers
334k views

Android "elevation" not showing a shadow

I have a ListView, and with each list item I want it to show a shadow beneath it. I am using Android Lollipop's new elevation feature to set a Z on the View that I want to cast a shadow, and am ...
AggieDev's user avatar
  • 5,025
287 votes
16 answers
237k views

How to use the new Material Design Icon themes: Outlined, Rounded, Two-Tone and Sharp?

Google has revamped its Material Design Icons with 4 new preset themes: Outlined, Rounded, Two-Tone and Sharp, in addition to the regular Filled/Baseline theme: But, unfortunately, it doesn't say ...
Ashil John's user avatar
  • 7,572
264 votes
25 answers
256k views

How can a divider line be added in an Android RecyclerView?

I am developing an android application where I am using RecyclerView. I need to add a divider in RecyclerView. I tried to add - recyclerView.addItemDecoration(new DividerItemDecoration(...
Priya's user avatar
  • 2,667
261 votes
28 answers
194k views

Coloring Buttons in Android with Material Design and AppCompat

Before the AppCompat update came out today I was able to change the color of buttons in Android L but not on older versions. After including the new AppCompat update I am unable to change the color ...
mail929's user avatar
  • 2,768
222 votes
30 answers
164k views

Round corner for BottomSheetDialogFragment

I have a custom BttomSheetDialogFragment and I want to have round corners in top of Bottom View This is my Custom class that inflates my layout that I want to appear from bottom View mView; @Override ...
Russell Ghana's user avatar
219 votes
14 answers
247k views

Adjust icon size of Floating action button (fab)

The new floating action button should be 56dp x 56dp and the icon inside it should be 24dp x 24dp. So the space between icon and button should be 16dp. <ImageButton android:id="@+id/fab_add" ...
vovahost's user avatar
  • 35.2k
212 votes
1 answer
84k views

What is the difference between Action Bar and newly introduced Toolbar?

After Google introduced Material Design, I have heard about a new widget class called Toolbar. What is the Toolbar, and what is the exact difference between ActionBar and ToolBar?
김준호's user avatar
  • 16.1k
211 votes
16 answers
282k views

Flutter: Setting the height of the AppBar

How can I simply set the height of the AppBar in Flutter? The title of the bar should be staying centered vertically (in that AppBar).
Buğra Ekuklu's user avatar
194 votes
12 answers
188k views

Selected tab's color in Bottom Navigation View

I'm adding a BottomNavigationView to a project, and I would like to have a different text (and icon tint) color for the selected tab (to achieve greying out non-selected tabs effect). Using a ...
Javad's user avatar
  • 5,885
190 votes
5 answers
176k views

Android Design Support Library expandable Floating Action Button(FAB) menu

Now that the Android Design Support Library is out, does anyone knows how to implement expanded Fab menu with it, like the fab on Inbox App? Should look like this:
geekkoz's user avatar
  • 3,674
189 votes
1 answer
130k views

Choosing bootstrap vs material design [closed]

I'm going to start new project using AngularJS (full stack). My project needs to be responsive and I'll be creating templates from scratch. So I need an advice on whether to choose bootstrap 3 (with ...
Asik's user avatar
  • 7,977
188 votes
7 answers
124k views

Import material design icons into an android project

Is there an easy way to import all the icons of the Material Design icons repository into an android project with out the hazard of doing it manually?
Ivan Aranibar's user avatar
187 votes
10 answers
129k views

Toolbar overlapping below status bar

I want to have appcompat v21 toolbar in my activity. But the toolbar I'm implementing is overlapping below status bar. How can I fix it? Here is the activity layout xml: <LinearLayout xmlns:...
emen's user avatar
  • 6,150
185 votes
6 answers
165k views

How to achieve ripple animation using support library?

I am trying to add a ripple animation on button click. I did like below but it requires minSdKVersion to 21. ripple.xml <ripple xmlns:android="http://schemas.android.com/apk/res/android" ...
N Sharma's user avatar
  • 33.9k
181 votes
16 answers
134k views

How to set a ripple effect on textview or imageview on Android?

I want to set a ripple effect on textview and imageview in Android Studio. How can I do it?
Vasant's user avatar
  • 3,565
179 votes
21 answers
150k views

No shadow by default on Toolbar?

I'm updating my app with the new Toolbar from the support library v21. My problem is that the toolbar does not cast any shadow if I don't set the "elevation" attribute. Is that the normal behavior or ...
MrBrightside's user avatar
  • 2,669
165 votes
8 answers
106k views

Material Design not styling alert dialogs

I've added the appCompat material design to my app and it seems that the alert dialogs are not using my primary, primaryDark, or accent colors. Here is my base style: <style name="...
Matthew's user avatar
  • 3,421
165 votes
4 answers
373k views

Is there an official or exhaustive list of all mat-icons in Angular?

I have started using <mat-icon> from Angular Material, and I'm wondering if there is any official list of the names of all the included icons. A few months ago I found a page where a bunch of ...
Pablo's user avatar
  • 1,852
164 votes
3 answers
106k views

How can I use custom theme palettes in Angular?

I want to use my company's brand colors throughout the app. I have found this issue: AngularJS 2 - Material design - set color palette where I can build an allegedly custom theme, but it's basically ...
Narxx's user avatar
  • 8,139
159 votes
13 answers
171k views

How to add multiple classes in Material UI using the classes props?

Using the css-in-js method to add classes to a react component, how do I add multiple components? Here is the classes variable: const styles = theme => ({ container: { display: 'flex', ...
Fatah's user avatar
  • 2,236
144 votes
21 answers
187k views

CardView not showing Shadow in Android L

My Cardview inside Listview is not showing shadow in Android L(Nexus 5). Also the round edges are not properly shown. Here is the code for Listview's Adapter View : <?xml version="1.0" encoding="...
isumit's user avatar
  • 2,333
143 votes
11 answers
153k views

Flutter: How do you make a card clickable?

I just have a simple Card like new Card(child: new Text('My cool card')) and I want to be able to click anywhere on it to run some function, except there's no onPressed method for a Card. I could add ...
Jus10's user avatar
  • 15.1k
141 votes
9 answers
147k views

Creating a SearchView that looks like the material design guidelines

I'm currently in the process of learning how to convert my app to Material design and I'm a bit stuck right now. I've got the Toolbar added and I have made my navigation drawer overlay all the content....
Mike's user avatar
  • 2,593
136 votes
12 answers
171k views

How to change the new TabLayout indicator color and height

I was playing around with the new android.support.design.widget.TabLayout, and found a problem, in the class definition, there are no methods to change the indicator color, and default height. Doing ...
David_E's user avatar
  • 7,200
132 votes
10 answers
82k views

How can I modify ripple color when using ?attr/selectableItemBackground as background?

I've seen some SO questions and they gave some possible methods to achieve what I want. For example: Use colorControlHighlight attribute in styles.xml. Here is my styles-v21.xml: <style name="...
ywwynm's user avatar
  • 11.7k
131 votes
11 answers
180k views

How to show Snackbar when Activity starts?

I want to show android Snackbar (android.support.design.widget.Snackbar) when the activity starts just like we show a Toast. But the problem is we have to specify the parent layout when creating ...
Sudheesh Mohan's user avatar
127 votes
7 answers
124k views

Material UI and Grid system

I'm playing a little bit with Material-UI. Are there any options for creating a grid layout (like in Bootstrap)? If not, what is the way to add this functionality? There is a GridList component but ...
kharandziuk's user avatar
  • 12.5k
123 votes
21 answers
107k views

How to change background color of the snackbar?

I am showing snackbar in a DialogFragment within the positive touch of the alert dialog. Here is my code snippet: Snackbar snackbar = Snackbar.make(view, "Please enter customer name", ...
Ajinkya's user avatar
  • 2,286
119 votes
4 answers
40k views

How to mimic Google Maps' bottom-sheet 3 phases behavior?

Background I'm assigned to make a UI that behaves similarly to how Google Maps shows a bottom-sheet for a found result. It has three different phases: Bottom content. The upper area is still ...
android developer's user avatar
113 votes
16 answers
132k views

Android Support Design TabLayout: Gravity Center and Mode Scrollable

I am trying to use the new Design TabLayout in my project. I want the layout to adapt to every screen size and orientation, but it can be seen correctly in one orientation. I am dealing with Gravity ...
Javier Delgado's user avatar
113 votes
10 answers
247k views

How get data from Material UI TextField, DropDownMenu components?

I created a form, I have several TextField, DropDownMenu Material UI components included, question is how I can collect all data from all TextFields, DropDownMenus in one obj and sent it to the server....
Vitalii Trachenko's user avatar
112 votes
6 answers
61k views

Apply Material Design Touch Ripple to ImageButton?

I have an imagebutton that doesn't respond with a touch animation when it is clicked because it is a static image unlike regular buttons on lollipop which come with the built in ripple effect. I would ...
sanic's user avatar
  • 2,085
111 votes
17 answers
124k views

Display badge on top of bottom navigation bar's icon

I have implemented the bottom navigation view in my app and I have looked every where to display badges on top of the icons like this I was wondering whether this is even possible to implement. Any ...
heisenberg91's user avatar
  • 1,576
111 votes
20 answers
139k views

How do you adjust the height and borderRadius of a BottomSheet in Flutter?

I'm probably missing something obvious here, but my BottomSheet only takes up the bottom half the screen, even though the widgets in it take up more space. So now there is scrolling behavior inside ...
Mary's user avatar
  • 19.5k
111 votes
13 answers
45k views

How can I be notified when a Snackbar has dismissed itself?

I'm using a Snackbar from the com.android.support:design:22.2.0 library. I'm using it to undo deletions. To make my life easier, I'm going to make the UI look like things are actually deleted from the ...
Tyler Pfaff's user avatar
  • 4,960
107 votes
19 answers
126k views

Change the TextInputLayout outline color

I'm trying to customize a TextInputLayout with material style. I managed to set the focused state to the colors I want: Using <com.google.android.material.textfield.TextInputLayout style=&...
Addev's user avatar
  • 32.3k
107 votes
12 answers
119k views

FloatingActionButton with text instead of image

I'm trying to figure out how can be modified FloatingActionButton from android support library. Can it be used with the text instead of image? Something like this one: I see it extends ImageButton ...
comrade's user avatar
  • 4,640
106 votes
10 answers
86k views

Angular - 'Could not find HammerJS'

I'm working on a simple angular project where I am trying to import Material Design into my project but some of the components aren't working properly and a console warning says: Could not find ...
Danoram's user avatar
  • 8,231
105 votes
8 answers
166k views

Binding element 'index' implicitly has an 'any' type

Using the demo project of angular2-mdl as a guide I ported the tab component and tried to implement it as follow: import { Component } from '@angular/core'; @Component({ selector: 'my-dashboard',...
InsaneBot's user avatar
  • 2,532
103 votes
19 answers
104k views

How do I change the color of icon of the selected tab of TabLayout?

I'm using a TabLayout with a ViewPager and I'm wondering how I can most efficiently change the color of the icon of the selected tab in the TabLayout. A perfect reference for how this is implemented ...
waylonion's user avatar
  • 6,896
102 votes
13 answers
80k views

Error : IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents

Below are my dependencies implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1....
Goku's user avatar
  • 9,402
102 votes
9 answers
126k views

How to use <md-icon> in Angular Material?

I was wondering how to use Material's icons, as this is not working: <material-icon icon = "/img/icons/ic_access_time_24px.svg"> </material-icon> I guess there is a problem with the ...
Mahammad Adil Azeem's user avatar
101 votes
3 answers
24k views

Ionic directives VS Angular material directives with Ionic Framework

I want to use ionic with material design. I am stuck between using ionic directives with custom CSS and angular-material I have read that using ionic directives we get lot of efficient features like ...
Vamsi's user avatar
  • 9,660
100 votes
17 answers
55k views

TextInputLayout not showing EditText hint before user focus on it

I am using recently released Android Design Support Library to show floating label with EditTexts. But i am facing the problem that the Hint on the EditText is not showing when UI is rendered, but i ...
Shajeel Afzal's user avatar
99 votes
10 answers
285k views

How to provide shadow to Button

As you can see in image, I want shadow behind a Button. I have created Button with rounded corners. But problem is I can't generate a shadow behind that Button. How can I achieve this?
Chintan Rathod's user avatar
97 votes
8 answers
52k views

MaterialComponents theme alert dialog buttons

Recently I switched from support library to com.google.android.material:material:1.0.0 But now I have a problem, in this pages there's a note https://github.com/material-components/material-...
antanas_sepikas's user avatar

1
2 3 4 5
173