toolbar

Use Toolbar across all activities (Android)

懵懂的女人 提交于 2019-12-03 04:46:32
问题 I'm using a Toolbar to replace the ActionBar. All is going well with one problem: The toolbar shows only on the main activity. If I try call the toolbar on any activity the same way I did with the main activity the app will crash when I call that activity. If I try to inflate the toolbar onCreateOptionsMenu, that activity will crash when I call it. How can I call/use the same toolbar across all my activities and not just the main one. here is some pieces of the code: public android.support.v7

Toolbar with EditText material design

99封情书 提交于 2019-12-03 04:44:27
问题 I'm trying to make Toolbar with EditText within it like this: Right now I can do some thing similar but only with static title, Any ideas to get started? 回答1: I have done this like below: There is Toolbar as AppBar (aka ActionBar ) at the top and second toolbar below it with two EditText . First Toolbar is under CollapsingToolbarLayout in case you want it to be collapsed. Java : public class MainActivity extends AppCompatActivity { Toolbar toolbar; @Override protected void onCreate(Bundle

how to change the color of the toolbar and status bar colors according to image color in android material design?

六月ゝ 毕业季﹏ 提交于 2019-12-03 03:55:02
问题 I started learning Android material design. I learnt some new features in the lollipop version. Today I am trying to change the color of the tool bar and status bar according to an image's color. Can anyone guide me or provide any links for how to do this? For example, here the color of the status bar and toolbar changes when changing view pager tabs. Thank you in advance. styles.xml: < style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="windowNoTitle"

How to add a toolbar to the BOTTOM of a UITableView obj-c/ios/xcode

徘徊边缘 提交于 2019-12-03 03:41:12
how do I add Programmaticaly a toolbar with uitextfield at the bottom of a tableview? Like a chat or sms app.. thank you in advance.. First create a view to hold the whole thing. Then add a UITableview and UIToolbar programmatically set frame so that it appears under the tableview .Add the textfield to the toolbar UIView *placeholderView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 400, 440)]; UITableView *tv=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, 400, 400)]; [placeholderView addSubview:tv]; UIToolbar *toolBar=[[UIToolbar alloc]initWithFrame:CGRectMake(0, 400, 400, 40)];

IntelliJ 13 - Add Navigate Back/Forward to toolbar?

这一生的挚爱 提交于 2019-12-03 03:23:15
问题 Jetbrains changed the toolbars in IntelliJ 13. The Navigate Back & Forward arrows, shown here, used to be in the top toolbar and easily clickable. Now the only way I can find to access these fields is to go to Navigate -> Back or Navigate -> Forward. Does anyone know of a way to add these back/forward locations into an always visible toolbar like they were located in IntelliJ 12? 回答1: I am using Idea 13 and my toolbar already has these buttons: The icon groups are: file | undo/redo | cut/copy

how to set NAVIGATION_MODE_LIST on Toolbar new appcompat v7 21

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Now all methods related to navigation modes in the ActionBar class, such as setNavigationMode() ... are now deprecated. The documentation explains: Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other common navigation patterns instead. In my current application, there is a spinner on ActionBar. How do I apply NAVIGATION_MODE_LIST on the new widget Toolbar in the new version appcompat v7 21. Thanks in advance. 回答1: With the API 21 the method setNavigationMode(ActionBar.NAVIGATION

adding button adjacent to filter toolbar

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: the button should be exactly in the same row as the filter toolbar text boxe exactly after the filter toolbar ends i.e. i want a button exatly in the same row as the filter toolbar text boxes. i tried this but it is not working $('#gridTable').after("div.ui-jqgrid-view").find("div.ui-jqgrid-hdiv table.ui-jqgrid-htable tr.ui-search-toolbar").each(function () { $('<button>').css({ float: "right", height: "16px", width: "16px" }).appendTo(this).button({ icons: { primary: "ui-icon-refresh" }, text: false, title: "Clear Filters" }).click(function

How to reset the Toolbar position controlled by the CoordinatorLayout?

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The app I'm working on consists of a Navigation Drawer which is implemented in an Activity. The activity layout is as follows: This is a very common pattern, only thing that changes frequently is the Fragment inside the container layout. If any of the Fragment has a scrolling element, upon scrolling, the CoordinatorLayout will happily make position translations, including the Toolbar/AppBarLayout. The real problem here is, when the Fragment gets replaced, the position for the Toolbar remains the same, i.e., if the Toolbar is hidden, it will

Toolbar overlaps status bar

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've got a problem with my status bar which gets overlapped by the toolbar. I wanted to have the function that when the user scrolles the ListView down, the toolbar disappears behind the status bar so that only the tabs are visible, just like in the WhatsApp and YouTube apps. To achieve this effect or to get this function I used this line: app:layout_scrollFlags="scroll|enterAlways" into my android.support.v7.widget.Toolbar , but know as I said before, the status bar gets overlapped by the toolbar. <?xml version="1.0" encoding="utf-8"?>

How to create a option menu in android?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to create a simple option menu in Android application with c# and Xamarin Studio. How can I do it? I haven't found any C# example of this. Can someone simply explain how to create a option menu, please? 回答1: Defining the menu One way to create a menu is using a XML file placed in the Resources/menu/ folder of your Xamarin.Android project. For example: Resources/Menu/mymenu.xml <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/item1" android:title="Item 1"/> <item android:id="@+id/item2" android