Questions tagged [android-design-library]

The Design package provides APIs to support adding material design components and patterns to your apps.

The Design Support library adds support for various material design components and patterns for app developers to build upon, such as navigation drawers, floating action buttons (FAB), snackbars, and tabs.

744 questions
46
votes
9 answers

How to use TextInputLayout in new android design library

Recently google introduced new Android Design Library in that how to use TextInputLayout field to enable the Floating Hint feature of EditText. Not much guidance is available here. This page says you can now wrap it in a TextInputLayout But No…
Kamalanathan
  • 1,747
  • 3
  • 22
  • 33
46
votes
10 answers

AppBarLayout with FrameLayout container as scrolling content doesn't work

I'm trying to use the newest design library to make my toolbar hide/show on scroll. My issue is the scrolling content I have is in the fragment, I'm just injecting it into the FrameLayout container and it doesn't work. Here's my activity:…
44
votes
10 answers

Don't collapse Toolbar when RecyclerView fits the screen

I've made an app using Android Design Library, with a Toolbar and TabLayout. Actually 2 tabs are present, both with 2 RecyclerView, that automatically collapse the Toolbar when scrolled. My question is: can I disable Toolbar collapsing when…
43
votes
5 answers

Dynamically add and remove tabs in TabLayout(material design) android

I have a TabLayout and inside that I have ViewPager. I need to dynamically add and remove tab in tablayout(material design). I can able to add the tabs dynamically but while removing the tab, tab is removing correctly. But viewpager last item is…
42
votes
18 answers

How to use a TabLayout with Toolbar inside CollapsingToolbarLayout?

I am looking at the chrisbanes/cheesesquare and I am trying to put TabLayout with a Toolbar inside a CollapsingToolbarLayout, and here is my code
41
votes
8 answers

onClick method not working properly after NestedScrollView scrolled

I used NestedScrollView with CoordinatorLayout to enable scroll animation for Toolbar (by app:layout_scrollFlags="scroll|enterAlways"). NestedScrollView contain the LinearLayout as the root child, I put the 2 TextViews into LinearLayout to enable…
toidv
  • 842
  • 2
  • 9
  • 19
41
votes
10 answers

how to remove left margin of Android Toolbar?

I'm trying to use toolbar for my project. Here is the code I am using:
natuan241
  • 751
  • 3
  • 7
  • 11
41
votes
7 answers

Android TabLayout Android Design

I'm trying to get the new TabLayout in the android design library working. I'm following this post: http://android-developers.blogspot.com/2015/05/android-design-support-library.html and the documentation:…
TWilly
  • 4,863
  • 3
  • 43
  • 73
40
votes
6 answers

Smooth animated Collapsing Toolbar with Android Design Support Library

Are there anyway to make Android Design Support Library's Collapsing animation smoother while scrolling? When I release scrolling, it stops suddenly. But what I want is: collapsing animation will continue smoothly even if you stop…
39
votes
7 answers

Error text in TextInputLayout is covered by keyboard

The TextInputLayout contains an EditText which in turn receives the input from the user. With TextInputLayout introduced with the Android Design Support Library we're supposed to set the error to the TextInputLayout holding the EditText rather than…
35
votes
5 answers

NestedScrollView and CoordinatorLayout. Issue on Scrolling

I have a strange issue with the CoordinatorLayout and the NestedScrollView (with the design support library 22.2.0) Using a content smaller than NestedScrollView I should have a fixed content. However trying to scroll up and down the content I can…
34
votes
5 answers

How I can multiline the expanded title of CollapsingToolbarLayout?

My problem is the next. I would use relatively large texts as CollapsingToolbarLayout title so I need to show it as multiline mode. When I try to change text appearance through the setExpandedTitleTextAppearance() method it doesn't work. The code…
34
votes
12 answers

Change font of the floating label EditText and TextInputLayout

Someone tried to change the font of the floating label? I changed the source of EditText but the font of the floating label did not change, I am very grateful to those who help me Code:
34
votes
8 answers

What are the new features of Android Design Support Library and how to use its Snackbar?

Android M Preview for developers was released yesterday. As usual, many amazing new features are introduced. I noticed that Snackbar is one of them. I have read the document about Snackbar, from which I learnt that Snackbar is in the library of…
33
votes
4 answers

Changing the background color of a Tab in TabLayout (Android design support library) doesn't occupy the entire tab space

I have a TabLayout (design support library) which is tied up to a ViewPager containing three tabs. I have designed a custom layout and set that to each tab in the TabLayout. I have been trying to change the background color of the currently…
Itapu Vinay
  • 687
  • 2
  • 9
  • 18