android-menu

What is orderInCategory in ActionBar menu item & why it is use for..?

十年热恋 提交于 2019-11-28 04:18:29
Im working on action menu item and its over flow item this is my main_menu.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/menu_search" android:icon="@drawable/search" android:title="@string/start_new_project" app:showAsAction="always" /> <item android:id="@+id/menu_dts_overflow" android:icon="@drawable/ic_action_overflow_round" android:orderInCategory="11111" android:title="Service" app:showAsAction="always"> <menu> <item android:id="@+id/menu_newProject"

Android App development error: “Bad XML block: header size 60 or total size 3932356 is larger than data size 0” [closed]

与世无争的帅哥 提交于 2019-11-28 02:32:10
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . I checked other posts that were similar and they recommended to clean the build path, but that did not help at all. I have started android app

Having two single-selection groups in ActionBar doesn't work, but attaching a pop up menu instead doesn't work either

一个人想着一个人 提交于 2019-11-28 01:33:09
问题 I am writing an Android app where the user must choose how and what to display on a graph. These options are expressed in two single-selection menu groups (radio buttons), both of which should be accessible from the action bar. The first group works fine. It's added at the end of my ActionBar XML like this: <group android:checkableBehavior="single" android:showAsAction="never" > <item android:id="@+id/menu_choice_1" android:title="Choice 1" /> <item android:id="@+id/menu_choice_2" android

How to make overflow menu like Chrome app?

杀马特。学长 韩版系。学妹 提交于 2019-11-28 00:16:13
I would like to make an overflow menu similar to the chrome app in android in which it has the forward, backward and bookmark button inside it. This is the overflow menu in the chrome app. Any ideas? Please i need help. Thanks in advance. You can't have custom views for your overflow menu items, so Chrome is not using the standard action bar. It's weird that Google doesn't even use its own standard tools that it pushes for everyone else to use, but that's just how it goes. If you load up an app that uses the real standard ActionBar (for example, Calendar or Messaging), it'll have a view in the

Sub Menu in App

蹲街弑〆低调 提交于 2019-11-27 22:47:50
问题 Is having a sub menu possible in Android? And what do you call this view in Android? 回答1: As others have mentioned, this is an ExpandableListView, within a NavigationDrawer. There are several tutorials you can use (see my list below). One piece of advice based on personal experience: the baseline behavior for the SimpleExpandableListAdapter is pretty limiting and often not what you're looking for in your customization. If you're looking to have your own specific behavior and look-and-feel to

Android - Correct use of invalidateOptionsMenu()

时光总嘲笑我的痴心妄想 提交于 2019-11-27 22:41:51
I have been searching a lot on invalidateOptionsMenu() and I know what it does. But I cannot think of any real life example where this method could be useful. I mean, for instance, let's say we want to add a new MenuItem to our ActionBar , we can simply get the Menu from onCreateOptionsMenu(Menu menu) and use it in any button's action. Now to my real question, is following the only way of using invalidateOptionsMenu() ? bool _OtherMenu; protected override void OnCreate (Bundle bundle) { _OtherMenu = false; base.OnCreate (bundle); SetContentView (Resource.Layout.Main); Button button =

Android: java.lang.IllegalArgumentException: Invalid payload item type

我是研究僧i 提交于 2019-11-27 21:52:28
Some users tell me about the exception the got: java.lang.IllegalArgumentException: Invalid payload item type at android.util.EventLog.writeEvent(Native Method) at android.app.Activity.onMenuItemSelected(Activity.java:2452) at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:846) at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:153) at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:956) at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:534) at com.android.internal.view.menu

Reduce Menu items width,height and textview size

耗尽温柔 提交于 2019-11-27 20:47:53
问题 I had done a menu overflow items.I need to reduce menu items width,height and textview size. I referred this post.But it is not working for me.I am posted the code and screenshot related to that: <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/add" android:icon="@drawable/down" android:title="Read" android:showAsAction="never" /> <item android:id="@+id/add2" android:icon="@drawable/down" android:title="write" android:showAsAction="never" /> <item

anchor popup menu over overflow button

孤人 提交于 2019-11-27 19:23:37
问题 I'm trying to create a custom popup menu that I would like to position on the overflow menu button of the actionbar (am using a Toolbar with setSupportActionBar() for this if it matters). I found out that this can be done with the setAnchorView() (from reading Custom Menu item in Overflow menu). However I cant seem to figure out how to retrieve the overflow menu as a view (that I could use to set the anchor with). Also I did try anchoring this to the parent layout of the activity itself but

dynamic adding item to NavigationView in Android

安稳与你 提交于 2019-11-27 18:50:55
I want to build NavigationDrawer with the possibility of adding new items (such as yahoo weather App with adding new cities). I have working NavigationDrawer with NavigationView , in menu I have permanent fields: <group android:id="@+id/group" android:checkableBehavior="single"> <item android:checked="false" android:id="@+id/item1" android:icon="@drawable/ic_inbox_black_24dp" android:title="Item1" /> <item android:checked="false" android:id="@+id/Item2" android:icon="@drawable/ic_inbox_black_24dp" android:title="Item2" /> </group> I'm trying to add new Item this method: public boolean