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.

734 questions
261
votes
26 answers

TabLayout tab selection

How should I select a tab in TabLayout programmatically? TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs); tabLayout.setupWithViewPager(viewPager);
222
votes
25 answers

How to change the floating label color of TextInputLayout

With reference to the new TextInputLayout released by Google, how do I change the floating label text color? Setting colorControlNormal, colorControlActivated, colorControlHighLight in styles does not help. This is what I have now:
176
votes
8 answers

NavigationView get/find header layout

In my NavigationView I have a header layout with id 'viewId' with active buttons. To setup those buttons, I do the following in activity's onPostCreate: final View panel = findViewById(R.id.viewId); panel.setOnClickListener(new…
171
votes
19 answers

Flinging with RecyclerView + AppBarLayout

I am using the new CoordinatorLayout with AppBarLayout and CollapsingToolbarLayout. Below AppBarLayout, I have a RecyclerView with a list of content. I have verified that fling scrolling works on the RecyclerView when I am scrolling up and down the…
159
votes
28 answers

Change EditText hint color when using TextInputLayout

I am using the new TextInputLayout from the design library. I am able to get it to show and to change the color of the floating label. Unfortunately the actual EditText hint is now always white. I have tried changing the hintColor in XML, styles,…
159
votes
14 answers

How to create a simple divider in the new NavigationView?

Google introduced the NavigationView in the Design Support Library version 22.2.0 with which you can create a drawer very easily using a menu resource. How can I create a simple divider line between two items? Grouping the items didn't work.…
133
votes
25 answers

How to add footer to NavigationView - Android support design library?

How can I set footer settings and profile items to NavitationView? to looks like the Inbox by email navigation drawer. The NavitationView items are inflated by menu resource, but I don't know how to set bottom items to a menu resource, or how can I…
epool
  • 5,871
  • 6
  • 32
  • 39
131
votes
13 answers

how to change color of TextinputLayout's label and edittext underline android

I am using android design library's TextinputLayout. But couldn't customize the hint color, label color and the underline color of EditText inside TextinputLayout. Please help.
Nitesh Verma
  • 2,281
  • 4
  • 16
  • 33
131
votes
11 answers

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 some research, found that the default indicator…
David_E
  • 6,244
  • 4
  • 21
  • 27
130
votes
5 answers

FloatingActionButton example with Support Library

Recently, I read these posts: Android Design Support Library Android Support Library, revision 22.2.0 FloatingActionButton But, none of them give me a detail example about creating a new FloatingActionButton. It's so hard to understand, which is…
122
votes
18 answers

Change the font of tab text in android design support TabLayout

I'm trying to work on the new TabLayout from the android design library. I want to change tab text to custom font. And,I tried to search some styling related to TabLayout,but ended up to this. Please guide how can I change the tab text fonts.
Dory
  • 6,944
  • 7
  • 30
  • 54
119
votes
12 answers

Android CollapsingToolbarLayout collapse Listener

I am using CollapsingToolBarLayout alongside with AppBarLayout and CoordinatorLayout, and they are working Fine altogether. I set my Toolbar to be fixed when I scroll up, I want to know if there is a way to change the title text of the Toolbar, when…
114
votes
4 answers

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 touchable and won't scroll anything at the…
113
votes
17 answers

Android design support library for API 28 (P) not working

I've configured android-P SDK environment successfully. When I attempt to use the android design support library I face project build errors. Project configurations are: IDE: 3.2 Canary 17 Target API: 28 Compile API: 28 apply plugin:…
110
votes
7 answers

Android Design Library - Floating Action Button Padding/Margin Issues

I'm using the new FloatingActionButton from the Google Design Library and I am getting some strange padding/margin problems. This image (with developer layout options on) is from API 22. And from API 17. This is the…
1
2 3
48 49