1,267 questions
0
votes
0
answers
22
views
How to change menu actionitem background Color?
Ok I feel like an idiot,
my menu action item has this dark color that does not even exist in my theme,
But my menu_item xml is setting it to be a tan color,
xmlns:app="http://schemas.android....
0
votes
1
answer
130
views
Remove extra menu when search view is click
In my project, I try to remove the extra menu when the search view is clicked and return the menus when canceling the search view. Please find the screenshot below
I use this below code to hide and ...
1
vote
1
answer
2k
views
Android : Options Menu not showing up
I am new to Android programming and wanted to try implementing an options menu in an Android app, so I first created a test app and tried to create an options menu there. I wrote the code and ...
0
votes
0
answers
34
views
Menu Bar not visible
I made an app for menu in Android studios. I have done everything correct i belive still not getting the desired output. Made xml file and inflated it but its not visible when we run the app.Menu xml ...
0
votes
1
answer
809
views
Android MenuProvider does not invoke onMenuItemSelected() when a MenuItem is selected
On my working project we need to use SearchView in a few Fragments. The search bar itself have to be placed in Toolbar and opened by clicking the search button at the end of the Toolbar (see the image)...
0
votes
1
answer
53
views
How to remove bottom margin from Activity?
How do I make my Activity fit the entire screen? There is this black bar at the bottom of the screen, and a menu bar on the top of the screen with the apps name. I'd like to have it be just the ...
0
votes
1
answer
141
views
Xamarin.Android, top bar, how add shortcut button ON/OFF
enter image description hereI can't find way to add button with icon to top screen menu. I don't even know name of this bar. I mean swiping down of top screen menu however your are, there are buttons ...
1
vote
1
answer
612
views
Options menu inflate wrongly in viewpager2
I have 4 fragments but for each fragments it has different different menu options in my app with viewpager2 so the user swipe through these all fragments and when the app starts the menu option for ...
0
votes
1
answer
4k
views
How to use the new ComponentActivity with ViewBinding and the other old AppCompatActivity components
According to this question, I tried to update my deprecated menus codes like setHasOptionsMenu , onCreateOptionsMenu and onOptionsItemSelected in my fragments and all app, but I should replace ...
0
votes
0
answers
44
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
2k
views
DropdownMenu not aligned to width of Textfield in Dialog composable
The DropdownMenu composable is not aligning to the width of the OutlinedTextField which is inside a Dialog composable. It is shifted slightly to the right. However, placing the DropdownMenu outside ...
0
votes
1
answer
584
views
Android Menu Items don't show as checkable
Here's my xml code
<group
android:id="@+id/group1"
>
<item android:id="@+id/btnNightMode"
android:title="Night Mode"
android:icon="@drawable/...
-1
votes
1
answer
626
views
How to go from one fragment to another fragment by click on menu item
I want to move from the fragment I am in by the add (+) item to the add fragment.
How do I switch between fragments in the menu?enter image description here
@Override
public void onCreateOptionsMenu(@...
0
votes
0
answers
286
views
Create a Customized Menu in Kotlin
I'm needing help creating a customizable menu for my Android app. Is it possible to create a RecyclerView for the menu, create a layout for the cell, and do a for loop for the menu item name and image?...
1
vote
1
answer
915
views
Change Menu Items Order programmatically Android Java
Basically I have an android popup menu, when any menu item is clicked, it should reshuffle the order of the menu items
<menu xmlns:android="http://schemas.android.com/apk/res/android">
...
2
votes
3
answers
903
views
How to remove end padding of checkable menu item?
I have an overflow menu with a checkable menu item. I would like to align the CheckBox all the way to the end, but I don't know how this can be done.
My menu is defined like so:
<menu xmlns:android=...
1
vote
0
answers
80
views
How to style menu items
I have added two items in appbar menu. But it's taking too much space to appear. How can I reduce the space between those icons and how can I change the text size?
Menu
<item
android:id="@+...
0
votes
0
answers
139
views
Second menu option leads to a crash in Android Kotlin
I am creatinga menu for my app. First I only had one menu option (Informationen) and everything worked perfectly fine. Now I want to add a second screen (Impressum). I added the code below, but every ...
-3
votes
1
answer
165
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
vote
1
answer
111
views
androidx.appcompat.app.AppCompatActivity#closeOptionsMenu doesn't close the menu
I'm using a click on the menu to open a bottom sheet.
When this was initially implemented just returning false from AppCompatActivity#onMenuOpened didn't do the job.
I see that someone already ...
1
vote
1
answer
652
views
TextView selection, event for the moment when selection is done?
How can I get notified at the moment when the selection menu appears for TextView?
See the screen recording below. If you select some text, context menu (copy/share/select all) appears. If you begin ...
1
vote
0
answers
599
views
Navigation component crash onOptionsItemSelected
I have started to receive this crash in Firebase Crashlytics. It is quite scarce.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'androidx.navigation.q androidx....
1
vote
2
answers
692
views
Bottom navigation menu based on the user logged in Kotlin
Is it possible to hide/show the bottom navigation menu item in Kotlin based on the user logged in?
I have some items in the bottom navigation which I do not want to show to all the users.
Edit:
Here ...
0
votes
2
answers
348
views
How to close the Navigation drawer in android
My application has a navigation drawer. From drawer options, I am opening different activities. At that time a blank screen is displayed before the new Activity.
@Override
public boolean ...
0
votes
0
answers
98
views
My options menu is not showing on my tablayout Android Studio
I am making an app where the main activity has a App bar layout with tabs already and I want to add an options menu on the top right. I created the xml file and added the code into my java activity ...