Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
108 views

Back Navigation Issue (Nav Graph) Issue (android)

I am stuck in this issue of back navigation button for long while, I have tried different methods but still the problem is not resolved Here is the IMAGE This is my issue So, I have a home ...
Jadu's user avatar
  • 699
0 votes
1 answer
58 views

Unable to hide Action Bar while implementing Navigation Drawer

This is the full code of the xml. <?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/...
Arya_'s user avatar
  • 70
0 votes
1 answer
49 views

Can't center title in ActionBar

I need to center a title in ActionBar, so I've created custom ActionBar and function that sets custom title, but title is still not at the center. class MainActivity: BaseActivity() { override fun ...
Kiparisov's user avatar
1 vote
0 answers
141 views

How do i add overflow menu on custom action bar?

I want use custom toolbar because of title and subtitles but I also want to add overflow menu and I did everything and my toolbar doesn't showing overflow menu what I'm suppose to do Main Activity ...
indiebloog's user avatar
0 votes
1 answer
42 views

Why action bar appears in AVD but not in Physical device?

I am building a bus ticket booking app. The action bar on top appears in my AVD, but it doesn't appear in my physical device. The themes.xml file <resources xmlns:tools="http://schemas....
CypherZ's user avatar
  • 87
0 votes
0 answers
47 views

Getting rid of unmodifiable blank area under actionBar?

I read a half-dozen of threads(particularly this one, who share the issue) about actionBar height, but it seems to no one already get this issue : My actionBar has an unmodifiable blank(bg color) ...
Phaeron's user avatar
  • 33
0 votes
2 answers
63 views

NoActionBar still displaying on physical devices

So here is my problem : I put NoActionBar on my themes and when i run my app in an emulated device no action bar are shown (so everthing is fine) BUT when I install and run the app on my smartphone (...
rico's user avatar
  • 47
0 votes
1 answer
40 views

Is it possible to seperate elements in actionbar?

Is it possible to seperate elements in actionbar, like in the picture and how to do it? Button on right side is from the menu of actionbar, where app:showAsAction="always" I just need to ...
Diset's user avatar
  • 39
0 votes
3 answers
1k views

Removing Action Bar (Android Studios)

Newer templates provided by android studio make use of themes.xml instead of styles.xml and changing parent="Theme.MaterialComponents.DayNight.DarkActionBar" to parent="Theme.AppCompat....
Mehrshad's user avatar
0 votes
1 answer
779 views

Move navigation menu to the top, below action bar Android / XML

Hello Stackoverflow! I'm designing an android application, as you see in the photo below: Screenshot of Application run test I cannot embed photos yet, please check the link I have a navigation menu ...
Amin Kadkhodaee's user avatar
0 votes
0 answers
34 views

Unable to set badge on action bar

I am trying to put badge count on cart icon in action bar but app is crashing and showing error. Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'android.view.View ...
Digvijay's user avatar
  • 3,231
1 vote
1 answer
1k views

How to change fragment action bar title color in bottomnaviagtionview

following is the navigation xml I wish there could be option as labelcolor any other solution to change label color as label appears on action bar <?xml version="1.0" encoding="utf-...
Ashish k's user avatar
1 vote
1 answer
52 views

Android Layout beneath Action Bar

I want to make a screen with multiple buttons, however, it keeps coming out something like this with the buttons under the action bar.Wrong Buttons The buttons are added later programmatically to ...
Michiel's user avatar
  • 100
0 votes
2 answers
39 views

How to center logo while having no action bar menu

I'm hidding my action bar base on some condition. But when it's hided, the logo inside my toolbar is not center. How can I fix that ? <android.support.design.widget.AppBarLayout android:...
Projet Sin's user avatar
0 votes
1 answer
2k views

Change the position of menu item to left side

I have a toolbar like below picture and i want to change it to this or this Below code is my menu <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/...
AminA2's user avatar
  • 197
0 votes
2 answers
28 views

I have removed the action bar for a specific activity and it is still showing in the preview

I have removed the action bar for a specific activity and it is working perfectly and the action bar is removed when I run the app on Emulator/Device but the problem is that it is still showing in the ...
Haroon khan's user avatar
  • 1,058
0 votes
1 answer
1k views

Set gradient for background actionbar

I try set gradient for background actionbar but background not match parent actionbar Here is code gradient_actionbar <gradient android:angle="360" android:centerColor="@color/color2" ...
Đăng Khoa's user avatar
6 votes
7 answers
9k views

Removing action bar in BottomNavigation view

As the title says I am not able to remove the action bar present in the bottom navigation bar. I tried different NoAction bar themes but it won't work for some reason. Can someone tell me what am I ...
random1132's user avatar
0 votes
1 answer
33 views

Android ActionBar disappeared in some of the layouts

Here is my manifest file : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bankaspace.servicefinder"&...
Banka's user avatar
  • 90
0 votes
0 answers
56 views

Android Action bar not showing up anymore?

I am making an android app and while changing themes for the design I by mistake remove the actionbar at the top. Here is my Styles.xml : <?xml version="1.0" encoding="utf-8"?> <resources&...
user3794667384's user avatar
1 vote
3 answers
186 views

Top ActionBar covers pages content

I'm creating an android app and I've just added a Navigation drawer into one of my activities. I've successfully added it in, however, it now overlaps the content of the page. The jobs text and the ...
Craig Martin's user avatar
0 votes
1 answer
405 views

How to create a transparent toolbar and status bar and overlay an image for this class?

I have an xml layout file called fragment_about_sl.xml and the class associated to that called aboutSLFragment.java which is extended to fragment.java. Anyway all I want to do is make the toolbar ...
C. Chan's user avatar
  • 57
3 votes
2 answers
16k views

How to change Action Bar and Status Bar color in activity? [duplicate]

I want to change the color of my action bar and status bar programmatically only on one activity, depending it's state, green for go and red for stop. I want to keep the system wide theme of orange ...
user avatar
0 votes
1 answer
68 views

Unable to Get Navigation Drawer Items to Display Items Correctly

I have got a working Navigation drawer in a blank project, however whenever I try to implement the navigation drawer in to an existing project, it doesn't seem to be working properly. The navigation ...
Krishan's user avatar
2 votes
1 answer
521 views

Show buttons inside SearchView on onMenuItemActionExpand

I have SearchView on toolbar and i want add time button inside SearchView when expand and hide when collapse. onCreateOptionsMenu @Override public void onCreateOptionsMenu(final Menu menu, final ...
androidXP's user avatar
  • 1,719
0 votes
1 answer
10k views

Settings button with icon in Action Bar [duplicate]

As title says i don't know how to add button to android action bar near title of app with icon. I need to add it here as shown on picture enter image description here
Čika Tuna's user avatar
0 votes
3 answers
362 views

Overflow Menu doesn't show

I have a problem with my app...the overflow menu is invisible! I can physically tap on the top-right part of my phone and the menu items show, but the three dots do not show. Here is my xml: <...
Sachin Rammoorthy's user avatar
0 votes
2 answers
47 views

Custom ActionBar Issues

I have removed the default action bar from my application and added a custom one from scratch by using the ToolBar. I have placed an imageView inside my action bar but i'm facing two issues: 1) The ...
Stelios Papamichail's user avatar
0 votes
2 answers
595 views

Failed to instantiate one or more calsses (android.support.v7.widget.AppCompatTextView)

Background I am facing this error: java.lang.NullPointerException at android.content.res.Resources_Delegate.getValue(Resources_Delegate.java:788) at android.content.res.Resources.getValue(...
omer's user avatar
  • 562
1 vote
5 answers
2k views

How to set the ActionBar title in middle instead of the default left aligned position?

Trying to set the ActionBar title in middle instead of the default left aligned position. To do so, based on other answers this is what I've done: Toolbar myToolbar = (Toolbar) findViewById(R.id....
OBX's user avatar
  • 6,114
1 vote
1 answer
42 views

custom layout has space in left side

The problem is that i have back-arrow along with an ImageView with a profile image as WhatsApp has in its chat layout. I want this back arrow to extreme left of action bar and image should be go with ...
Uttam Meerwal's user avatar
6 votes
1 answer
3k views

Android Search menu item disappears when pressing back button/collapsing search field

I'm using android SearchView to have a search button in my action bar. I followed this tutorial from Google Developers on YouTube, and added a few tweaks based on my own needs. However, whenever I ...
Magnus E-F's user avatar
0 votes
0 answers
107 views

Options menu dose not show in android 4.3

I'm trying to add options menu, but for some reasons it does not show up in android 4.3, the options menu button is not even shown! Here is my codes: My activity is: public class MainActivity ...
Meysam Hasanloo's user avatar
1 vote
3 answers
549 views

Android setLogo isnt placed on the center of Action Bar

Hi I am using a toolbar and trying to set a logo to the center of action bar. But in the center there was title and (I think) thats why logo was starting from the left side of the action bar. Then I ...
Cem's user avatar
  • 155
0 votes
2 answers
642 views

Error comes in connect the activity in navigation drawer

This error comes at the time of click the create one and go to the signup Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not ...
user avatar
1 vote
1 answer
3k views

SearchView with rounded corners in ActionBar

I am working on an app needing a SearchView in the search fragment. I obviously know how to create a classic SearchView, but how is it possible to customize it to get a result like this :
D. Math's user avatar
  • 329
5 votes
2 answers
1k views

Android: CardView Coming On Action Bar

I have used recycler View to display CardView. I have done this in the navigation drawer Main Activity. But my card View is being displayed on Action Bar. app_bar_main <RelativeLayout xmlns:...
niranjan kurambhatti's user avatar
0 votes
3 answers
40 views

Unable to show icon on toolbar

I tried all the solutions but still unable to show icon on toolbar, in my main project I have a toolbar and under it toolbar and inside toolbar, fragments, no matter what I tried I'm unable to show ...
blackHawk's user avatar
  • 6,297
0 votes
1 answer
58 views

Android actionbar behaving strangely

I am trying to create a good looking SearchView. I used this code and integrated it in my DrawerLayout. This is the current XML of my main activity:` <?xml version="1.0" encoding="utf-8"?> <...
user2988879's user avatar
0 votes
2 answers
8k views

Position a menu item at the left end of the actionbar

How to move a menu icon to the left end of the bar, to the left of the app's name, as shows in this picture? Is there a way to do this by xml only, without adding java codes? activity_main.xml <?...
Robin's user avatar
  • 1,537
0 votes
1 answer
230 views

Arrow missing from share icon within action bar

After creating a menu for my action bar. The little arrow doesn't appear next to the share icon and I'm not sure why this has happened or if it's intentional based on my code. <?xml version="1.0" ...
wbk727's user avatar
  • 8,378
2 votes
1 answer
2k views

How do I set focus to the title on the Action bar?

I don't seem to be able to set focus to top and beginning of the Action Bar. Right now it goes to the editText box in the middle of the screen. I am using the default method for creating the Action ...
Grady McGhee's user avatar
6 votes
2 answers
4k views

how to remove double Tool/Actionbar?

i don´t know why this second Toolbar appears... I have attached my xml files for the Activit "ListActivity". After deleting one line in the XML the doublebar were gone in the Deign Preview in ...
skm's user avatar
  • 609
0 votes
0 answers
22 views

populate data from sqlite to action bar overflow

Action Bar Overflow (No. 4) Hi, I'm trying to add a list of data to the Action Bar Overflow (No. 4). I know how to add the fixed items from here, but not sure how to get it from sqlite table and ...
Arthas's user avatar
  • 1
0 votes
2 answers
2k views

Where to put main menu's XML?

Where do you put main_menu.xml in project? I am trying to make a action bar. If main_menu.xml is the xml for the action bar, Where do I store the action bar's xml? NOTE: Not Duplicate! Yes, there are ...
RedLight's user avatar
0 votes
1 answer
737 views

Change ActionBar text color using AppCompat

I'm trying to change ActionBar text color like this. <style name="AppTheme" parent="Theme.AppCompat.Light"> <item name="actionBarStyle">@style/MyTheme.ActionBarStyle</item> </...
Ariorick's user avatar
0 votes
1 answer
104 views

How can I theme my action bar to match this image?

I'm working on an app's UI and I want to get the action bar to look like this: This is what it looks like right now: This is my styles.xml <resources> <!-- Base application theme. --...
intA's user avatar
  • 2,671
0 votes
1 answer
72 views

Extra padding showing between WindowTitleBar and Toolbar on Lollipop and later versions when Fragment replace

I couldn't remove the padding above toolbar But there is no such issue on below Lollipop devices activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="...
Hisham's user avatar
  • 11
0 votes
5 answers
869 views

How to disable the title on the ActionBar in Main Launcher Activity

I checked this issue, couldn't find an answer. there are 3 places I checked that show the label on 3 separated places in my android phone or app. Under the logo of the app In the app processes which ...
LamaTo's user avatar
  • 552
0 votes
3 answers
474 views

xml layout look weird (Add button or icon in action bar)

I want to add a save button in action bar but it shows below the action bar. What is the correct to solve ? Any help would be greatly appreciated. Code <?xml version="1.0" encoding="utf-8"?> &...
user avatar

1
2 3 4 5 6