Questions tagged [toolbar]
The toolbar tag is for issues relating to the configuration, design, and use of toolbars.
3,637
questions
403
votes
10
answers
242k
views
How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?
I've seen in the new material design Side Nav spec that you can display the drawer over the action bar and behind the status bar. How can I implement this?
337
votes
27
answers
266k
views
In android app Toolbar.setTitle method has no effect – application name is shown as title
I'm trying to create simple application using android-support-v7:21 library.
Code snippets:
MainActivity.java
public class MainActivity extends ActionBarActivity {
Toolbar mActionBarToolbar;
...
143
votes
16
answers
183k
views
How do you set the title color for the new Toolbar?
I'm using the new v7 Toolbar and for the life of me can't figure out how to change the color of the title. I've set the @style of the Toolbar to a style declared in styles.xml and applied a ...
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....
134
votes
18
answers
203k
views
How to set Toolbar text and back arrow color
Toolbar background is dark color, I want text and back arrow to be white. I tried following, but it doesnt work.
<style name="Theme.MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
129
votes
8
answers
75k
views
IntelliJ 13 - Add Navigate Back/Forward to toolbar?
Jetbrains changed the toolbars in IntelliJ 13.
The Navigate Back & Forward arrows, shown here, used to be in the top toolbar and easily clickable.
Now the only way I can find to access these ...
120
votes
14
answers
169k
views
How to change Toolbar home icon color
I am using a android.support.v7.widget.Toolbar and learned from this post how to change the color of the hamburger icon to white, but the up/back arrow remains a dark color when I call
...
118
votes
5
answers
111k
views
How to change the toolbar text size?
I want to change the size of text in Toolbar. Because in my application, Toolbar text has different sizes both for landscape and portrait mode.
Is it possible to change the text size of text in ...
112
votes
9
answers
77k
views
MenuItem tinting on AppCompat Toolbar
When I use drawables from the AppCompat library for my Toolbar menu items the tinting works as expected. Like this:
<item
android:id="@+id/action_clear"
android:icon="@drawable/...
107
votes
6
answers
77k
views
WPF ToolBar: how to remove grip and overflow
In a nested WPF ToolBarPanel-ToolBar-Menu we want to get rid of the grip handle to the left and the overflow area to the right. they are both grayed out, but we'd like them to not be displayed at all.
...
98
votes
7
answers
100k
views
Android - Standard height of toolbar
I want to create a toolbar in my app, and I am wondering what is the standard height for the toolbar in android?
I want it to be big enough for a finger, but not huge. Is there standard size?
92
votes
9
answers
69k
views
How to change CollapsingToolbarLayout typeface and size?
I want to change CollapsingToolbarLayout font size and its typeface. How I can achieve that?
74
votes
14
answers
64k
views
How to fix getActionBar method may produce java.lang.NullPointerException
I am using a toolbar as my actionbar in an activity. I am trying to add the method getActionBar().setDisplayHomeAsUpEnabled(true); to the Activity.java file for Up navigation for older devices.
The ...
65
votes
5
answers
31k
views
Toolbar will not collapse with Scrollview as child of CoordinatorLayout
I am trying to follow the Google Docs on using the CoordinatorLayout but i am having an issue with the ScrollView inside the CoordinatorLayout. Basically, the Toolbar normally would collapse with a ...
65
votes
6
answers
162k
views
Hiding the toolbars surrounding an embedded pdf?
Though I think the answer maybe in this other question's answer concerning the pdf specification, is it possible to not display the adobe acrobat toolbars in an embedded pdf document?
64
votes
10
answers
58k
views
android hide toolbar in specific fragment
I have a problem that I don't know how to solve. How do you hide a toolbar in a specific fragment, I have already been searching around on the internet and what I found was communicating activity and ...
63
votes
4
answers
66k
views
How to catch navigation icon click on toolbar from fragment?
I have a dialog fragment in which I have toolbar in layout.
I want to make back button(Navigation Icon) working in toolbar and exit the fragment when clicked. But I am unable to catch the click event ...
62
votes
2
answers
72k
views
How can I align Android Toolbar menu/icons to the left like in Google Maps app?
Here is a screenshot of Google Maps Toolbar.
As you can see icons are aligned to the left instead of right (default behavior). I've tried adding android:layout_gravity="left" and android:gravity="...
56
votes
13
answers
205k
views
setSupportActionBar toolbar cannot be applied to (android.widget.Toolbar) error
I've been looking for an answer and I've tried many possible solutions, but nothing seems to work..
I'm trying to setup a Material Action Bar following this tutorial.
Here's my code:
tool_bar.xml:
...
54
votes
24
answers
69k
views
How to set a custom font to the title in toolbar android
I am doing this:
toolbar = (Toolbar) findViewById(com.sports.unity.R.id.tool_bar);
setSupportActionBar(toolbar);
setTitle("hello");
I want to set a custom font for the text here in the title "hello"....
54
votes
5
answers
54k
views
Change the color of Navigation Drawer indicator icon
I am using a toolbar in place of actionbar and i am also using a navigation drawer.My toolbar colour is black and i want my navigation drawer indicator colour to be white.So how to change the colour ...
54
votes
2
answers
30k
views
A vertical Separator control in a Menu, Toolbar, StackPanel, etc. - Is it possible?
I want to use the Separator control in a vertical way (Lets say in a horizontal StackPanel).
Searching around I found this method but it doesn't use the Separator control rather it uses borders and ...
47
votes
7
answers
41k
views
How do I make DrawerLayout to display below the Toolbar?
How to make the drawer layout be below the actionbar/toolbar? I'm using v7:21 app compat library with the new ToolBar view.
Examples that I see looks like
<android.support.v4.widget.DrawerLayout
...
47
votes
7
answers
88k
views
Set up toolbar as actionbar in fragment
I want to set up my toolbar as an actionbar, but since your toolbar is a layoutelement it has to be in your layout. Now my layout is in my fragment.
I added the toolbar in my layout and I call it ...
45
votes
5
answers
39k
views
Android RecyclerView below Toolbar
I have a custom RecyclerView and a toolbar which hide when scrolling down and appears when scrolling up. I have a problem about the position of RecyclerView, it is below the Toolbar, I use the ...
45
votes
9
answers
45k
views
Appcompat v21 Toolbar elevation pre-lollipop
First off, I know that this question has been asked before, but it hasn't been answered before. I hope someone can give me an answer.
In my application, I use the Toolbar from Appcompat_v7 (API 21). ...
45
votes
10
answers
39k
views
Android : Change entire app layout directions programmatically
How can I change entire app layout direction to RTL?
I am writing an app that user must select it's language in first launch and the layout should change based on user selection to RTL or remains LTR.
...
45
votes
10
answers
18k
views
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 ...
44
votes
8
answers
19k
views
How to unlock toolbars in Eclipse 4.2 (Juno)
I migrated from Eclipse Indigo (3.7) to Juno (4.2). In Juno all toolbars seem to be permanently locked. Is there a way to unlock them so they could be moved or rearranged?
44
votes
2
answers
50k
views
Collapsing Toolbar layout with logo, title, subtitle in toolbar
I want do this but with Collapsing toolbar layout or display the logo and title in toolbar after scroll.
<!-- Toolbars -->
<android.support.design.widget.AppBarLayout
android:id="@+...
43
votes
6
answers
21k
views
AppCompat v7 Toolbar onOptionsItemSelected not called
I changed from the original ActionBar to the AppCompat Toolbar and setSupportActionBar(toolbar).
When I am using getSupportActionBar() and setDisplayHomeAsUpEnabled(true) for the back arrow, the click ...
42
votes
10
answers
36k
views
how to remove shadow below actionbar with AppCompat.Light.NoActionBar?
I tried to remove the shadow below the toolbar with the Theme.AppCompat.Light.NoActionBar, using every recommendation of people who have ever answer it before, but no one worked. I tried
<item ...
41
votes
10
answers
27k
views
how to remove left margin of Android Toolbar?
I'm trying to use toolbar for my project.
Here is the code I am using:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:...
41
votes
2
answers
32k
views
How to enable/disable toolbar scrolling programmatically when using design support library
I use support design library to show/hide toolbar when scrolling a recyclerView inside a fragment, as mention here https://github.com/codepath/android_guides/wiki/Handling-Scrolls-with-...
40
votes
12
answers
52k
views
AppCompat Toolbar: Change Overflow Icon Color in ActionMode
With the AppCompat Toolbar, I want to be able to change the color of the overflow menu icon on ActionMode change.
For example, the overflow icon will be white in normal Toolbar mode. And will turn ...
35
votes
10
answers
38k
views
android title won't show in toolbar
I have an xml that I use with so many activities with fragments file but my problem is that I can't display the text I want in the toolbar, I use that xml that way because I have a navigation drawer ...
33
votes
2
answers
70k
views
Custom toolbar with Summernote
How do I know which functions can be enabled for the toolbar of summernote, and how to do it?
In the API docs all I can find is "toolbar : Array (optional)" without further explanation.
I've ...
33
votes
2
answers
43k
views
How animate Burger to Arrow with Appcompat v7 21, Toolbar and DrawerLayout
I am using the android.support.v7.widget.Toolbar with a android.support.v4.widget.DrawerLayout. It works fine, the Burger icon is shown when the Navigation Drawer is closed, and the Arrow icon is ...
32
votes
2
answers
43k
views
Use Toolbar across all activities (Android)
I'm using a Toolbar to replace the ActionBar. All is going well with one problem:
The toolbar shows only on the main activity.
If I try call the toolbar on any activity the same way I did with the ...
31
votes
8
answers
24k
views
Toolbar not visible after setting jupyter notebook theme
The toolbar and notebook name does not show when I call and load the themes from the notebook.
I can load the themes from notebook using a code but I am not sure how to use the switches like -T and -...
31
votes
1
answer
35k
views
CollapsingToolbarLayout with a custom view
I'm trying to implement the CollapsingToolbarLayout with a custom view, but I'm unable to do it :
What I want to do (sorry I can't post images so it's on imgur) :
Expanded, the header is a profile ...
30
votes
3
answers
8k
views
How to restore Collapsing Toolbar Layout State after screen orientation change
I've been searching for the solution of my problem for some time and didn't find solution.
I want to restore my fragment's layout after screen orientation change. I have Collapsing Toolbar Layout ...
28
votes
6
answers
17k
views
Android Toolbar menu text color
I'm trying to change my Toolbar's menu item text color here, but it doesn't work. Here's my style:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="...
27
votes
6
answers
23k
views
How to make Toolbar not overlap other content in Android?
I am trying to develop an activity with a toolbar (the example is more or less taken from a tutorial), but the Toolbar always overlaps part of the other content.
Here is a screenshot:
The blue ...
27
votes
10
answers
54k
views
Translucent/Transparent status bar + CoordinatorLayout + Toolbar + Fragment
I have following setup:
I'm using AppCompat
MainActivity, that holds a fragment and has a toolbar, that's hiding when scrolling down
Fragment with RecyclerView
all views that should fit the screen ...
27
votes
4
answers
38k
views
How to show the hidden toolbar of Eclipse
Eclipse has a context menu item to hide the entire toolbar of RCP.
Where is the corresponding menu item to show the hidden toolbar?
I know it should be shown if using a new workspace. However I hope ...
27
votes
1
answer
2k
views
Menubar + Commandbar on WM 5.0 and WM 6.5.3
I'm developing a Windows Mobile application, and I faced a problem with CCommandBar, which combines toolbar and menubar. Well, I mean the following:
m_wndCommandBar.InsertMenuBar(IDR_MAINFRAME);
...
26
votes
5
answers
34k
views
How to add undo / redo buttons to toolbar in Eclipse?
I feel a bit embarrassed asking this questions, but how the heck can I get regular undo/redo buttons into the toolbar of eclipse?
I've often to switch between German and English keyboard layout. Y ...
26
votes
4
answers
46k
views
How to make a toolbar in Google Chrome?
I'm exploring Google Chrome extensions for the first time. I would like to create what appears as a toolbar along the top of the page when you click the extension icon, much like the StumbleUpon ...
25
votes
9
answers
18k
views
Toolbar - add the up button
I am trying to use the Toolbar instead of the ActionBar, but I can't figure out how to add the up button to return to the previous activity.
I couldn't find any method that could relate to it.
How ...