toolbar

Use Toolbar across all activities (Android)

时间秒杀一切 提交于 2019-12-02 17:59:16
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.widget.Toolbar toolbar; protected void onCreate(Bundle savedInstanceState) { super.onCreate

How to create a drop down view like Google Calendar using Toolbar?

淺唱寂寞╮ 提交于 2019-12-02 17:46:41
I am trying to create something similar to Google Calendar drop down month widget. Any help would be really appreciated. So far I have an idea that I need to use Toolbar with expandable animation but not sure that's the right direction to move into. I was also trying to create something similar to the Google Calendar app. I've come with this implementation: I use the CompactCalendarView library for the month widget. And CollapsingToolbarLayout for the drop down. You can view the source of this implementation at GitHub: https://github.com/GerritHoekstra/CompactCalendarViewToolbar The main

AppCompat Toolbar: Change Overflow Icon Color in ActionMode

回眸只為那壹抹淺笑 提交于 2019-12-02 17:33:48
With the AppCompat Toolbar, I want to be able to change the color of the overflow menu icon on ActionMode change. For example, the overflow icon will be white in normal Toolbar mode. And will turn black on ActionMode. So far, I have managed to change the background of the action mode as well as the title text. But I have yet to find a way to change the overflow menu icon color. I know that there's an answer available: Change ActionMode Overflow icon I tried the first solution and I wasn't able to find the overflow icon. The second solution, even with a 50L delay causes the overflow menu icon

android hide toolbar in specific fragment

你。 提交于 2019-12-02 17:30:33
I have a problem that I don't know how to solve. How do you hide a toolbar in a specific fragment, I have already been searching around on the internet and what I found was communicating activity and fragment would solve it. But it doesn't work for me at all, here is my code: main_activity: public class MainActivity extends ActionBarActivity implements like_frag.OnHideToolbar{ .... public void onHidingToolbar(int position){ Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar); if(toolbar == null){ getSupportActionBar().hide(); }else{ getSupportActionBar().hide(); } } like_frag.java public

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

放肆的年华 提交于 2019-12-02 17:18:59
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">true</item> <item name="windowActionBar">false</item> <item name="colorPrimary">@color/colorPrimary<

IntelliJ 13 - Add Navigate Back/Forward to toolbar?

倖福魔咒の 提交于 2019-12-02 16:54:44
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? I am using Idea 13 and my toolbar already has these buttons: The icon groups are: file | undo/redo | cut/copy/paste | font size | back/forward | compile/run | vcs | config | help | jira | tasks You should be looking

What's the right way to add a ToolBar to a UITableView?

∥☆過路亽.° 提交于 2019-12-02 16:41:08
I'm writing a Navigation-Based iPhone app, and I'd like to have a UIToolBar docked at the bottom of my screen, with a UITableView scrolling between the tool bar and the navigation bar. I've seen a couple of forums where it's been suggested that the View Controller handling this view should be a standard UIViewController rather than a UITableViewController. The view controller would have to implement the UITableView delegate and data source methods in addition to all of the standard UIViewController overrides. What (if any) built-in functionality do I need to recreate in this view controller

How to unlock toolbars in Eclipse 4.2 (Juno)

橙三吉。 提交于 2019-12-02 16:33:36
I migrated from Eclipse Indigo (3.7) to Juno (4.2). In Juno all toolbars seem to be permanently locked. Is there a way to unlock them so they could be moved or rearranged? Viorel Stolea Try Windows- Preferences - Appearance See the print: Then type Theme in the Search box (or go General->Appeearance->Theme) and choose Window 7. restart and you'll be able to move the icons/groups in the toolbar (but not get rid of any) After you're done you'll be asked to restart/ I went to Classsic theme and THEN restarted. Hope it helps I posted this earlier as a comment to my question, but was suggested that

Make Toolbar transparent

蓝咒 提交于 2019-12-02 16:22:53
create_account.xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context="io.sleeko.board.CreateAccountActivity"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <android

Android - Standard height of toolbar

十年热恋 提交于 2019-12-02 16:04:29
I want to create a toolbar in my app, and I am wondering what is the standard height for the toolbar in android? I want it to be big enough for a finger, but not huge. Is there a standard size? Its best to use ?attr/actionBarSize as @Jaison Brooks commented. In the material guidelines , suggested height is 56dp: Toolbar: 56dp The recommended minimum size for touchable elements is 48 dp, see this page for more detailed metrics. In addition to @vedant1811 answer, you can programmatically obtain actionBarSize from attrs: TypedValue tv = new TypedValue(); if (context.getTheme().resolveAttribute