Questions tagged [appcompat-v7-toolbar]
9 questions
4
votes
2 answers
Robolectric 3.0 not working with AppCompat 21+
After upgrading to AppCompat 21, a lot of our Robolectric tests fail. It looks like there is an issue with the Toolbar and AppCompatDelegate
I tried both with support-v4/appcompat 22.2.1 and the versions used in the official sample for…

Philipp E.
- 3,296
- 3
- 34
- 52
3
votes
1 answer
How to make the distance between left edge of Toolbar and Search Icon same as that between the right edge of the toolbar and the Cancel Icon?
I am trying to add a SearchView to Material Design Toolbar/ActionBar such that the SearchView is expanded by default and takes up the entire space of the Toolbar width-wise. I have the following Toolbar so far.
The problem with it is:
I want the…

Solace
- 8,612
- 22
- 95
- 183
3
votes
1 answer
How do I add icons to a second Toolbar
I have more than one appcompat.v7 Toolbar in my layout.
Given this is the case the solution of "main" toolbars - setSupportActionBar() and then use the hooks in onCreateOptionsMenu() and onOptionsItemSelected() - isn't what I'm looking for.
The only…

Graeme
- 25,714
- 24
- 124
- 186
1
vote
0 answers
implementing android navigation drawer in my existing extended Activity
I have an activity that already extended with An Activity But now I want App Compat Activity in my App. Actually I want my menu from left side. How can I Do this ?
public class MainContentActivity extends DraggableNowPlayingSheetActivity {
…

Imraj Hossain
- 41
- 7
1
vote
0 answers
Migrating from appcompat-v7:21.0.1 to appcompat-v7:23.1.1 now im sad
Migrating from appcompat-v7:21.0.1 to appcompat-v7:23.1.1 OnPrepareOptionsMenu is not called, now im sad.
Before I migrated the support library there was no issue at all. Then between 2-3 builds/runs(If i add code or add resources) menu suddenly…

david
- 2,900
- 5
- 28
- 48
0
votes
1 answer
Appcompat toolbar showAsAction doesn't work properly
My device allows to show up to 3 icons in the taskbar, if I exceed this number all the icons are hidden even if I have showAsAction="always" or showAsAction="ifRoom".
This is my code:
menu.xml
0
votes
0 answers
When I say to import (Cannot resolve symbol V7)
When I say to import
(Cannot resolve symbol V7)
0
votes
2 answers
Why does the SearchView appear twice on the toolbar/actionbar?
In the following SSCCE, the SearchView appears twice on the Toolbar/ActionBar. The question is why!
SSCCE
MainActivity.java
public class MainActivity extends AppCompatActivity {
private TextView textView;
@Override
protected void…

Solace
- 8,612
- 22
- 95
- 183
-1
votes
1 answer
Does Google recommend to use v7 appcompat support Toolbar or androidx?
I am learning how to implement the App/Action bar in Android and I found the Add the app bar Google's guide, which recommends using the v7 appcompat support libraries. The guide is updated to December 2019.
At the same time, I believe Google…

Michele Dorigatti
- 811
- 1
- 9
- 17