menu

Android menu item with both icon and text together when showAsAction is never

陌路散爱 提交于 2020-07-29 11:20:49
问题 Hi, how can I make my menu items have icons as well when showAsAction is never ? 回答1: Use android:actionLayout in menu item tag to specify custom lyout (icon with text). Menu item will look like: <item android:id="@+id/edit_menu" android:actionLayout="@layout/custom_edit_row" android:orderInCategory="100" android:title="@string/edit" app:showAsAction="always"></item> Edit custom_edit_row.xml will be: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android

Android menu item with both icon and text together when showAsAction is never

核能气质少年 提交于 2020-07-29 11:19:05
问题 Hi, how can I make my menu items have icons as well when showAsAction is never ? 回答1: Use android:actionLayout in menu item tag to specify custom lyout (icon with text). Menu item will look like: <item android:id="@+id/edit_menu" android:actionLayout="@layout/custom_edit_row" android:orderInCategory="100" android:title="@string/edit" app:showAsAction="always"></item> Edit custom_edit_row.xml will be: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android

Is it possible to force a menu popout to trigger on click instead of mouseover?

走远了吗. 提交于 2020-06-29 13:10:40
问题 I use a ASP.NET Menu control with Orientation=Horizontal. It is kind of irritating that the popout menus appear on mouseover, which causes it to show by accident if you move the mouse over the menu when you want to click on something right below the menu. Then the menu popout hides the element you actually wanted to click on! Is it possible to change the functionality so that the popout requires a mouse click instead of mouseover? 回答1: Well, I found a solution myself (kind of a hack...). This

I want a dropdown menu, but when I set the position “fixed” it doesn't work

落花浮王杯 提交于 2020-06-17 02:32:34
问题 I need the position to be fixed, I can't figure out how to align the menu otherwise with the top of the screen, I always get gaps between the edge of the screen and the menu. html: <ul> <li class="dropdown"> <a href="javascript:void(0)" class="dropbtn">Monitor</a> <div class="dropdown-content"> <a href="Index.html">Tube 1</a> <a href="#">Tube 2</a> </div> </li> <li><a href="Developer.html">Input</a></li> <li><a href="Information.html">Information</a></li> <li style="float:right" id="Credit">

horizontal scrolling Images like on Netflix

狂风中的少年 提交于 2020-06-12 07:14:08
问题 i'm trying to create a website with video content and i want to have a horizontal selection of cover pictures on the main page, like netflix does. Which means lots of pictures which spread over the screen size and will scroll via mouseover arrows on the right / left side of the screen. Screenshot: http://cdn3-i.hitc-s.com/180/netflix_redesign_70590.jpg Does anyone know how to create that? I'm using Dreamweaver and Muse, got some basic html and css skills, used a bit of jquery code, but i'm

How to set the title of a menu in Android

倾然丶 夕夏残阳落幕 提交于 2020-05-29 08:25:16
问题 I'm trying to dynamically set the title of my menu. Retrieving and setting it as such: ItemView menuTitle = ((ItemView) findViewById(R.id.menu_filter)); menuTitle.setTitle("TITLE_HERE"); works just fine so long as it's in the onOptionsItemSelected(MenuItem item) method. I haven't been able to find a way to set this from the onPrepareOptionsMenu or onCreateOptionsMenu methods as findViewById returns null (even after inflating the menu). Oddly enough there doesn't seem to be anything in the

How to show menu item icon without tint color in BottomNavigationView

家住魔仙堡 提交于 2020-05-27 06:01:13
问题 I have created a BottomNavigationView with three items. One of it was user tab . For the guest tab, there is an image but the TintColor is applying and we can't see that. So how to remove tint colour for that particular item? I have tried if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { item.setIconTintList(null); } But no luck. And it applies to above api 26 My activity <com.google.android.material.bottomnavigation.BottomNavigationView android:id="@+id/bottomNavigationView" android

How can I have one item of menu rtl and another one ltr?

时间秒杀一切 提交于 2020-05-22 09:44:13
问题 I have this menu: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/choosemap" android:title="اولین آیتم"/> <item android:id="@+id/choosespinner" android:title="abc" /> </menu> And this is output: I want to have Persian title rtl and English title ltr (now both of them are ltr ), how can I do this? 回答1: Use right-to-left mark or even left-to-right mark in the string when it's needed, left-to-right mark: ‎ or ‎ (U

Why does my extension's menu item not appear?

百般思念 提交于 2020-05-17 06:29:21
问题 I am building my first VS extension, to allow users to encrypt/decrypt the mailSettings/smtp section of web.config . I wish to add a menu item that has 2 sub-items to the main VS Tools menu: Config Encryptor Encrypt Mail Settings Decrypt Mail Settings The relevant (I hope) parts of the .vsct file are as follows: <Menus> <Menu guid="guidEncryptConfigCommandPackageCmdSet" id="ConfigEncryptorMenu" priority="0x0100" type="Menu"> <Parent guid="guidEncryptConfigCommandPackageCmdSet" id=

Horizontal menu?

橙三吉。 提交于 2020-05-16 07:50:34
问题 I want to create a horizontal menu across the top of my user control whose items fill the whole space horizontally. There are six items and it's one level only - so it's not really a menu as such. Can I do this with a menu? Or am I better off with using a six column grid with a button per col, or even a horizontal stack panel? Here is what I have so far: <DockPanel> <DockPanel DockPanel.Dock="Top" KeyboardNavigation.TabNavigation="None"> <Menu KeyboardNavigation.TabNavigation="Cycle"