I made an application for my Samsung device. Samsung phones generally have a menu button on the bottom side of the phone which is a problem for those devices who do not. I tried my app out on a Nexus, but since it did not have the physical menu button, I couldn't open the menu.
Now I want to make another option to to open the menu in my app. I though a slide out menu would be nice. I want to use the same menu but another way to open it. I want to be able to open it from the side of the screen by swiping to the right, and from the menu button.
P.S. Normally there is a titlebar on top of the screen in an app with a menu button/option on it to. But I hide my titlebar (in my AndroidManifest), so that's the issue why I need another solution..
Use Navigation Drawers for slide out menu. You can use Navigation for two menus, one from left other from right using different listview.
If you want to design a custom slide out menu using navigation drawer here is a tutorial.
http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/
Related
I designed a menu using Java language and now I want each menu item to go to the desired page when clicked.
And one more thing is that I want to have a light and dark mode in my menu, how do I do it?
But I don't know, can you please introduce me the pages that have this trainingenter image description here
I have made the menu but I don't know how to add day and night mode
and opening each menu item in a separate page
It is called Navigation Drawer, you can follow tutorial in this link to learn how to create it:
https://guides.codepath.com/android/Fragment-Navigation-Drawer
I noticed this half screen wifi selection menu in some Android Apps.
I would like to use this menu in my own app, to give the user the possibility to select the wifi without jumping to settings app.
I didn't find any instruction how to do this. However AndroidStudios Layout Inspector showed me that its belonging to the system, not to the app.
Anyone knows how to open this menu ?
It's called a Settings Panel:
https://medium.com/google-developer-experts/exploring-android-q-settings-panels-d308525b8345
You are looking for Settings Panel
This is for Android Q.
Here's an example to how to call it.
startActivityForResult(Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY), INTERNET_SETTINGS_REQUEST)
I don´t know if it's possible, but I would like to know if it´s possible open widgets screen from a button inside in my app.
thanks and best regards.
You cannot bring app widget to home screen by code because Android not supported. Only by user action because you can not know does home screen has space to place widget.
I want make an app by which I want to open it in small screen/view like popup window instead of Full Screen Activity.
Suppose,when a user click on the application icon in his device it will show a popup window (contains various buttons/options) instead of opening any full screen activity!
Is there any way ? If possible then, How can I proceed ?
Wishing code snapshots or any demo or necessary suggestions regarding this problem!
Not exactly a popup, but you can use the Dialog theme and make your Activity appear like a dialog box by using:
<activity android:theme="#android:style/Theme.Dialog">
I have around 10 or 12 option menus, when I press the menu key, 6 menus appear as a grid including More, but when clicking More menu, the rest of menus appear as list. How can I make them look like a grid too?
The Android API (10 and below) only supports 6 menu button items, after that it adds the "More" button as you noticed. (API 11+ recommends using an ActionBar, not an options menu.) I don't know of anyway to change the Android code to display more items in the grid. But you could write your own code to do what you want.
From the Developer's Guide:
If you've developed your application for Android 2.3.x (API level 10) or lower, the contents of your options menu appear at the bottom of the screen when the user presses the Menu button, as shown in figure 1. When opened, the first visible portion is the icon menu, which holds up to six menu items. If your menu includes more than six items, Android places the sixth item and the rest into the overflow menu, which the user can open by selecting More.
Try creating custom menu, this helped me a lot. Hope this works for you.