toolbar

WPF: Button mnemonic does not work if placing the button in a toolbar

岁酱吖の 提交于 2019-12-04 23:10:20
问题 If I place a Button within a ToolBar in WPF: <ToolBar FocusManager.IsFocusScope="False" Grid.Row="1" Name="tools" DataContext="{Binding Path=WeekNavigator}"> <Button Content="_>" Command="{Binding Path=CommandNavigateToNextWeek}"/> </ToolBar> The text of the button displays "_>" instead of just ">" and the mnemonic doesn't work. If I move the Button outside of the ToolBar it works as expected. How can I get the button to behave the same way inside a toolbar (with regards to mnemonics) as

Toolbar - add the up button

一个人想着一个人 提交于 2019-12-04 22:44:29
I am trying to use the Toolbar instead of the ActionBar, but I can't figure out how to add the up button to return to the previous activity. I couldn't find any method that could relate to it. How do I add the up button? I guess what you are looking for is something like this: Toolbar toolbar = (Toolbar) findViewById(R.id.app_bar_detail); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); Or in case of using in Fragment: Toolbar toolbar = (Toolbar) view.findViewById(R.id.app_bar_detail); ((ActionBarActivity) getActivity()).setSupportActionBar(toolbar); (

I have to create one Toolbar for each activity in my Android app?

妖精的绣舞 提交于 2019-12-04 21:41:48
问题 I have this doubt about new Toolbar in Android. I have to create one Toolbar for each activity in my app or there are a best practice to create one Toolbar for all activities? I try create a Singleton inflating a layout and search a view ID to create a toolbar and return the same instance for all activities, but this don't work. Can anybody help me? :S 回答1: Toolbar is just a view and you have to add it to your each Activity in which you want to show it. One way is to just put it in a separate

iOS 7 - Fixed footer toolbar breaks on virtual keyboard

自作多情 提交于 2019-12-04 18:38:28
I have created an application which runs in the browser and provides chat support. This is for desktop and for mobile and appears as a fixed footer. On desktop, everything is working and looking great, but when it hits mobile I am seeing an odd issue. When I am not at the top of the page and open the keyboard, it all works okay: but if I am near the top of the page the toolbar breaks and appears half way up the page: I found the following link where someone else mentions it but I can not hide the footer as I need it shown: http://forum.jquery.com/topic/how-to-set-footer-fixed-at-bottom-even-if

QQ最新版布局猜想

為{幸葍}努か 提交于 2019-12-04 18:21:44
最近想实现类似QQ的布局,使用toolbar,tablayout,viewpager,drawerlayout等控件,碰到了一些问题。 底部按钮切换之后,每个页面头部布局不一样。使用toolbar的话,需要在每个fragment中使用单独的toolbar。这样又出现一个新的问题,drawerlayout如何操作,drawerlayout需要与activity关联,并且在每个fragment中应该只有一个实例。 toolbar放在fragment中之后,每个fragment menu不显示,因为fragment的menu依附于activity(就我个人理解)。 将toolbar放在activity中,可以保证drawer只有一个,但是这样得控制每个页面的toolbar 的布局。 最近通过截取QQ的布局,它的头像是放在framelayout中,在activity中保持同样的位置,这样每个页面打开个人资料都是一样的,也就是说activity不使用toolbar。每个页面使用 独立 的toolbar(当然它并没有使用这个控件)。但是 drawerlayout需要用到 toolbar,因此如果使用QQ的方式就不能用 drawerlayout . 最后采取的是类似QQ的布局,去掉 drawerlayout,使用其他侧滑菜单。 每个fragment需要使用toolbar来初始化menu。

Android控件之Toolbar + DrawerLayout的使用

巧了我就是萌 提交于 2019-12-04 18:21:29
载请标明出处: http://blog.csdn.net/u011974987/article/details/50963495 ; 最近闲着没事儿,在关注一些遵循最新的Material Design设计规范的应用和效果,感觉很高大上;一直都没有去尝试过Material Design的一些新控件,很多还是不熟悉的,所以最近就写Demo 来熟悉下这些控件的使用,接下来使用官方支持库来快速实现这类效果,需要使用到Toolbar和DrawerLayout,如果你还不知道这两个Widget,先去google看下文档吧~,详细步骤如下: 1、首先需要添加appcompat-v7支持: 如果是在Android Studio 2.1 Preview3 上创建的项目,默认已经添加了appcompat-v7和design支持了,如果不是最新版AndroidStudio则需要在build.gradle中添加如下代码: dependencies { compile fileTree( dir : 'libs' , include: [ '*.jar' ]) compile 'com.android.support:appcompat-v7:23.2.0' compile 'com.android.support:design:23.2.0' } 然后同步一下Gradle去下载。 2

How to hide arrow on right side of a Toolbar?

坚强是说给别人听的谎言 提交于 2019-12-04 17:42:05
问题 Figured out how to hide the grippy dots on the left side, now how do I hide that add/remove buttons drop-down arrow on the right side? 回答1: Google is full with the answer to this: private void ToolBar_Loaded(object sender, RoutedEventArgs e) { ToolBar toolBar = sender as ToolBar; var overflowGrid = toolBar.Template.FindName("OverflowGrid", toolBar) as FrameworkElement; if (overflowGrid != null) { overflowGrid.Visibility = Visibility.Collapsed; } var mainPanelBorder = toolBar.Template.FindName

Add EditText to Toolbar

我的未来我决定 提交于 2019-12-04 17:13:43
问题 My Toolbar and EditText look like this: I tried adding it as an ActionView but I got this result: It basically just added my words 'Tap Below' as a title without the TextView Here's what I did: menu.xml <menu> ... ... <item android:id="@+id/edit_text_menu" android:orderInCategory="300" android:title="Tap Below" android:actionLayout="@layout/edit_text_layout" app:showAsAction="ifRoom|collapseActionView" /> </menu> edit_text_layout.xml <?xml version="1.0" encoding="utf-8"?> <EditText xmlns

How to manage PagingToolbar in Ext-js 4.2 correctly?

风格不统一 提交于 2019-12-04 16:06:51
js 4.2), and I've got some problems when I manage a toolbar on a grid which use a Proxy (ajax). this.grid = new Ext.create('Ext.grid.Panel',{ region : 'center', loadMask : true, layout : 'fit', store : 'Contenedores', tbar: [ { text: 'Exportar Excel' }, '->', { text:'Buscar', handler: this.buscar, scope: this}, '-', { text:'Limpiar', handler: this.limpiar, scope: this} ], columns : [], bbar : new Ext.create('Ext.toolbar.Paging',{ store: 'Contenedores', displayInfo: true, displayMsg : 'Registros {0} - {1} de {2}', emptyMsg : 'No hay registros' }) }); The problems, I'm having are: When I call to

Toolbar title is not centered

懵懂的女人 提交于 2019-12-04 15:15:36
I added a Toolbar in my app. For that I am using the below xml code for custom toolbar layout. Toolbar.xml <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#212E42" android:minHeight="?attr/actionBarSize"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <RelativeLayout android:id="@+id/lefttoolbarContainer" android:layout_width="match_parent" android