menuitem

App Crash When Trying to Change textsize in textView by clicking on button

折月煮酒 提交于 2019-12-06 01:36:08
In One Of my Activity I have a Menu Option With Text Option When user Click That it redirect to Another Layout where I Kept Two Buttons one is Plus Button and Another One is Minus Button When user Click that Button I want to Change The TextView Text Size of the BackStack Activity Here is My Code Below When i click that MenuOPtion the App was Crash and it Report NullPointerException in Logcat My Detail Activity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.detail_activity); detailtext= (TextView) findViewById(R.id

WPF MenuItem with Image and IsCheckable set

穿精又带淫゛_ 提交于 2019-12-06 00:13:14
问题 I've noticed that if you set IsCheckable and have an image for a MenuItem, when the item is checked, the image goes away. Is is possible to get it to work similarly to the old .Net 2.0 so that when it's checked, the image has a border around it? Thanks Paul. 回答1: You would need to restyle the MenuItems to achieve that. You can take the default Styles from here, for say Aero, and pull out the Style (and relevant brushes) for the MenuItem. Once you have that, you can customize it all you want.

How to give color to menu items for Navigation drawer?

放肆的年华 提交于 2019-12-05 23:22:52
问题 I was creating Navigation Drawer and i saw playtore have colored menu icons i want to know how can i do this. I tried to apply colors by colorFilter on menu icons but app force closes This is my code <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <group android:id="@+id/grp1" android:checkableBehavior="single"> <item android:id="@+id/navigation_songs" android:checked="true" android:icon="@drawable/ic_audiotrack_white_24dp" android

Sliding menu gesture overwrites the scrollable gesture of a graph gesture-android

倖福魔咒の 提交于 2019-12-05 21:13:50
I am using a sliding menu from here in my application. My app also has a GraphView in which I set some data in real time. The graph is a linear graph which is scrollable, to the left and to the right. But, having the sliding menu by a left to right gesture, the user cannot scroll in the graph because the menu keeps popping out. Is there any way I can overwrite the menu functionality when a certain item is pressed? The graph item is just a LinearLayout. I am also using fragments, so each menu item is a fragment. Make sure you call setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN); and not

changing text size of popup menu item

白昼怎懂夜的黑 提交于 2019-12-05 20:05:59
I want to change the text size of popup menu item. I have written this code to create a popup menu. But my problem is I couldnot access the textView of popupmenu ie"EXIT" so that i could use exitItem.setTextSize(40); //my code popupmenu = new PopupMenu(MainActivity.this, findViewById(R.id.actionbar_item)); popupmenu.getMenu().add(Menu.NONE, 0, Menu.NONE, "Exit"); popupmenu.setOnMenuItemClickListener(this); I have not created any seperate xml file to inflate these items. I want to do it programatically as these popupitems are dynamically generated. Thanks in advance. Dmide Unfortunately, it's

ActionBarSherlock with multiple MenuItems?

不羁的心 提交于 2019-12-05 18:40:09
I've been using ABS 4.0 with two MenuItems in one of my apps, but have discovered a little error: When pressing the second MenuItem, it does exactly the same as the first one... I've tried just about everything I can think of, but it isn't working. I've altered onOptionItemSelected, as I thought that was the method I need to edit. EDIT: I've been looking at @Ollie's suggestions, but neither LogCat nor Debug is showing weird things. Maybe it's in some other part of the code, or a declaration for ABS? Here's the entire code, if you could look through it, that would be great! The code for the

asp.net menu with submenu items, redirect by code behind

戏子无情 提交于 2019-12-05 12:24:36
I have a menu control with 2 levels of menu items! I would like to navigate via code behind OnMenuItemClick event because when i use NavigationUrl property my ajax UpdateProgress wont start! The Problem is, whatever submenu item i click, when the event raises it gets every time the first item?! <asp:Menu ID="Menu1" runat="server" onmenuitemclick="Menu1_MenuItemClick" > ... <Items> <asp:MenuItem Text="WorkFlows"> <asp:MenuItem Text="Overview" Value="Workflow"></asp:MenuItem> <asp:MenuItem Text="Edit" Value="Workflow"></asp:MenuItem> <asp:MenuItem Text="Create" Value="Workflow"></asp:MenuItem>

Twitter Bootstrap responsive menu/small devices: close/collapse menu on clicking a menu item

一世执手 提交于 2019-12-05 10:53:25
I want to change the behaviour of the Twitter Bootstrap Menu on small devices to close the expanded menu by either clicking on a menu item or clicking the menu button. Currently (default) I can only collapse it by clicking the menu button in the top right corner, no matter if I'd clicked on a link/menu item or not. How would I do that? I coudln't figure it out from the TB documentation and searching the internet didn't provide any answers. Thanks for the fix Skelly. It worked great on the "mobile" menu, but unfortunately it was causing a visual defect in "desktop" mode as it was targeting .nav

How do I disable Mnemonics in a WPF MenuItem?

心不动则不痛 提交于 2019-12-05 04:55:16
I have dynamic strings appear as the MenuItem's header, which sometimes contains '_'. WPF treats the underscores as signs for mnemonics, but I don't want that. How do I disable that? Omer Raviv After trying all the solutions in the thread WPF listbox. Skip underscore symbols in strings , which didn't seem to work on MenuItems, I did this: public class EscapeMnemonicsStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string str = value as string; return str != null ? str.Replace("_", "__") : value; } public object

How to add menu items separators which work as expected on OSX?

我怕爱的太早我们不能终老 提交于 2019-12-05 03:52:38
On Windows platform, with the VCL , when we want to add a separator in a menu, we add a TMenuItem with a Caption := '-' ; With FireMonkey , we add a TMenuItem with a Text := '-' ; It works as expected on Windows platform, the item with the Text='-' is displayed as a separator. But, when I run the same application on OSX , I have the minus sign visible... I haven't found any property on the TMenuItem to specify it is a separator ... I have tried with a TMainMenu and a TMenuBar ( UseOSMenu := True|False; ) and I still have this issue. Any idea to create a real separator? (otherwise, I will check