Questions tagged [android-actionbar]
The ActionBar is Android's window feature that identifies the application and user location, and provides user actions and navigation modes.
8,886
questions
0
votes
0
answers
17
views
Navigation Drawer Custom Action bar [ Icon ] problem?
My custom navigation drawer is working properly but as mentioned in the solved answer but I am confused about this line of code
Problem !
Press the back button to cress the app
It would be my pleasure ...
0
votes
1
answer
13
views
Hide Shadow on androidX Toolbar
I want to hide the shadow below the ActionBar to make the ActionBar look flat. There should be no line, shadow, border between ActionBar and the layout.
Constraints
Unfortunately I have a constraint ...
0
votes
1
answer
23
views
keep getting Cannot resolve symbol 'logout' error [duplicate]
Keep getting error with keyword logout in switch statement as as cannot resolve symbol logout.
want to put icon on action bar but don't know how to setup action bar. help me setup action bar resolve ...
0
votes
0
answers
25
views
Is it possible to hide the action bar only from the main activity and not from fragments?
I have an application with a single activity and some fragments. I want to hide the action bar from the main activity page, but I want to have the action bar/toolbar on the fragments with a back ...
0
votes
0
answers
28
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) ...
0
votes
0
answers
20
views
Android Progress bar inside menu item is not updating properly
I have two sensor connected with my android app. Both apps are connecting over BLE and I get two types of data from these sensors.
Sensor Data
Power Value
To show the power status, I followed a ...
0
votes
0
answers
25
views
Android action bar overflow is inconsistent based on device orientation
I have an action bar item set up to only show if there is room. When clicking onto the problematic screen when the device is in a vertical orientation, the item does not appear in the action bar. ...
0
votes
1
answer
31
views
How to remove app bar in fragment without .NoActionBar in themes
I need to remove this home_fragment action bar, but I can't write NoActionBar in themes.xml because bottom navigation won't work that way. Anyone has any solution?
Also, take a look at the photo, it ...
0
votes
2
answers
30
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 (...
0
votes
1
answer
30
views
Objects.requireNonNull error in Android Studio
The line of code crashes my app :-
Objects.requireNonNull(getSupportActionBar()).hide();
I don't know why, can anyone help me...?
0
votes
0
answers
34
views
How to make LinkedIn like hiding toolbar and bottom navigation bar in Android?
When we scroll down in LinkedIn Android App, the toolbar and bottom navigation bar got hidden.
And when we scroll up the toolbar and bottom navigation bar appear again.
How can I create such effect in ...
0
votes
1
answer
42
views
How to make Navigation drawer toggle button visible on Toolbar?
I am getting error message : ActionBarDrawerToggle: DrawerToggle may not show up because NavigationIcon is not visible. You may need to call actionbar.setDisplayHomeAsUpEnabled(true);
But I have ...
0
votes
0
answers
11
views
Back icon in android fragments [duplicate]
In my android project written using Android Studio, I added a new Basic Activity. This activity comes by default with two fragments. When run the project, always with the default fragments, in the ...
1
vote
0
answers
27
views
Android Bottom App Bar with FAB curve position
Is it possible to change the FAB cradle curve position from bottom curve to top curve?
As I saw in the official Material Design documentation are all bottom curve.
Thank you.
0
votes
0
answers
32
views
Actionbar background style not changing in dark theme
Creating the first app, I changed the actionbar's background to teal.
The problem is that it worked on light theme but not on dark theme.
Tested on both pixel 3 XL emulator and 2 different samsung ...
1
vote
1
answer
32
views
How can I create a filter bar like on YouTube?
I would like to know how I can create a bar like the one in the image. I guess it's with a horizontal scrollview, but I don't know what elements are the "buttons", also I tried with any ...
1
vote
0
answers
28
views
why onBackPressed() syntax is closing the app?
the onBackPressed() in the signup page is okay and i put the same code in another activity and when i pressed it, the app will go back to previous activity but it will close first..
this is the code ...
0
votes
1
answer
142
views
Android: Returning to same scroll position via back button on Action Bar
I have an activity which present a list of items through a RecyclerView.
When I click on an item, it goes for another activity to show it.
Problem is: when I press the back button on the Action bar it ...
1
vote
0
answers
21
views
Android App emulator shows a blue bar at the bottom of the screen
I am facing a strange issue when i execute my android application on the android emulator. A strange blue bar appears at the bottom of the screen. This cannot be related with application top bar.
Here ...
1
vote
1
answer
63
views
Change actionBar color only in fragment
I am making a movie app and I want to change the action bar color to transparent but only in a specific fragment.
I thought about making an action bar style in theme.xml but I couldn't do it without ...
0
votes
1
answer
27
views
Element shown all the time with scrollable ActionBar
I have activity showing list of elements to allow user select one of them. This activity (same as every other activity in the app) has ActionBar with activity title. This bar is scrollable, so when ...
0
votes
2
answers
116
views
How to change navigation icon size
I want to design an activity with different sizes but my problem is i cant change the size of the navigationView icon in the action bar.
NavigationView :
<com.google.android.material.navigation....
0
votes
1
answer
26
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 ...
0
votes
0
answers
31
views
How to cut status bar OR actionbar from a bitmap?
bitmap?.let {
cropimg = Bitmap.createBitmap(
it,
0,
56+28,//each mobile has ...
0
votes
0
answers
47
views
Is it possible to programmatically indicate section headings inside a navigation drawer?
I have a basic hamburger menu in my native Android app which, when expanded, looks a little bit like this:
I want to be able to support TalkBack users by programmatically indicating that "Fruit&...
1
vote
1
answer
148
views
Changing action bar title dynamically not working
I want to change the text of the action bar in a fragment dynamically when that fragment is created,but activity?.actionBar?.title = movie.title is not working.
I tried this too
activity?.actionBar?....
0
votes
0
answers
31
views
Setting order of ActionBar
final Drawable upArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_material);
upArrow.setColorFilter(Color.parseColor("black"), PorterDuff.Mode.SRC_ATOP);
getSupportActionBar()....
0
votes
0
answers
194
views
How Create Different action bar in fragments, with navGraphHost. ANDROID
I'm new in android, So basically what I want to achieve is to have appBottomBar with navGraphHost. I have one activity_main where is hosted NavGraph and have 3 fragments. I implemented it and its ...
0
votes
0
answers
27
views
Unable to set ActionBar text colour in Android project
I am using Material Themes in my Android project and am trying to set the Title colour of my app's action bar. The following code works, in my theme file, to set the background colour of the action ...
0
votes
0
answers
49
views
Avoid showing default title when a fragment is displayed
I am working on the codelab:
https://codelabs.developers.google.com/codelabs/kotlin-android-training-add-navigation/index.html?index=..%2F..android-kotlin-fundamentals#0
I have the following function ...
0
votes
1
answer
43
views
Center action bar title - Android
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
setTitle(Html.fromHtml("<font color=\"white\">" + "Settings" + "</font>&...
0
votes
0
answers
51
views
Android You need to use a Theme.AppCompat theme (or descendant) with this activity
I am building a 3rd party library which provides a UI. Many apps are using my library. But, some apps report a crash with the following exception.
java.lang.IllegalStateException: You need to use a ...
1
vote
0
answers
27
views
Removing white blank space on top after NoActionBar
I am trying to get rid of white blank space on the top after removing action bar, but It is keep living a white space no matter what I try I have NoActionbar, windowNoTitle true
windowActionbar false ...
0
votes
2
answers
64
views
Android Custom Action Bar / Tool Bar / Tab Bar
I was able to get the custom navigation
Got the custom navigation correctly using the following link:
https://thedeveloperworldisyours.com/android/put-image-navigation-drawer/#sthash.2ThTJIlx.dpbs
...
0
votes
1
answer
41
views
Why Toolbar is Overriding another activity's fragment?
Im not added toolbar in this fragment but it is overriding from Recyclerview's xml file
Im added toolbar in this specific recyclerview's xml file
Manifest file
<?xml version='1.0' encoding='utf-8'...
-1
votes
2
answers
59
views
After I removed action bar it leaves a blank space
I don't know how to solve this. Kindly please help me to solve this problem.
themes.xml
<style name="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar&...
0
votes
0
answers
89
views
add item to action app bar menu programmatically on button click android
When clicking a button on the screen, an item should be added to the menu action bar
Initially, I have 3 items in the action bar menu. When I click on the button "Item 4 " should be added ...
2
votes
1
answer
2k
views
How to hide ActionBar with Jetpack Compose
I want to hide default action bar, so in the Manifest file I have following code:
<style name="Theme.MyCompose" parent="Theme.Material.DayNight.NoActionBar">
</style&...
0
votes
0
answers
29
views
Disabled homeAsUp button shows agian when bottom sheet dialog is dismissed
I set up the action bar with custom homeAsUp button by below code on the MainActivity, that only Fragment A is the top fragment
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_arrow_left)
val ...
4
votes
3
answers
4k
views
How to use Jetpack compose app bar backbutton
getActionBar().setDisplayHomeAsUpEnabled(true) this i was using for normal android appCp,pact activity to switch between two or more activity.can any one tell me how to do this in jetpack Compose ?
0
votes
1
answer
23
views
Hide tools and title bar in transition between shared activity elements
Customer request:
I want to create smooth transition between all activity by moving 2 png elements of my background (customer request).
In detail: I have a right element that should move to the left ...
0
votes
3
answers
325
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....
0
votes
4
answers
73
views
How to hide the default fragment actionBar create our own actionBar in android & kotlin
I have an android app with bottom navigation containing 3 fragments and all have their own actionBar by default. I want to hide all the default actionBar of three fragments and create my own actionbar ...
1
vote
1
answer
28
views
how to hide/remove icon menu items in actionbar when moving bottomnavigation kotlin?
in actionbar home fragment bottomnavigation
in action bar favorite fragment bottomnavigation
how to hide or remove actionbar icon when moving to favorite fragment?
0
votes
2
answers
35
views
how to set backspace button in place ActionbarDrawerToggle to navigate to previous fragments?
I am calling fragments from Main_activity.java and also calling fragments from other fragments but i want to show backspace(<-) arrow button when any fragment is loaded(either from Main_activity or ...
1
vote
0
answers
53
views
How to make ripple effect not over fillet boundary for Actionbar's option menu by using AppCompatActivity?
In Activity‘'s option menu, It has a fillet boundary in default and the ripple effect is not over it.
Option_Menu_In_Activity:
I implement a activity by AppCompatActivity, But It is not default ...
0
votes
1
answer
28
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 ...
1
vote
3
answers
346
views
How to change status bar color on entering contextual action mode
My application uses the app theme that inherits Theme.MaterialComponents.Light.NoActionBar. When user selects a list item and enters the contextual action mode, I want to change the action bar to dark ...
-3
votes
1
answer
80
views
How to remove the menu name from the action bar? [closed]
How can I set a custom title for my action bar/toolbar ?
I am using android:theme="@style/AppTheme.NoActionBar".
-1
votes
1
answer
60
views
Dynamic titles in Action bar
I have a MainActivity with an Action bar (App title, Search icon) and a simple RecyclerView (list of items from a string array) + onClickListener.
When a user clicks on one of the items in the ...