toolbar

How to change the toolbar text size?

荒凉一梦 提交于 2019-11-26 11:57:19
问题 I want to change the size of text in Toolbar . Because in my application, Toolbar text has different sizes both for landscape and portrait mode. Is it possible to change the text size of text in Toolbar ? 回答1: Use app:titleTextAppearance: <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="?actionBarSize" android:id="@+id/toolbar" app

How to set Toolbar text and back arrow color

半世苍凉 提交于 2019-11-26 11:49:58
问题 Toolbar background is dark color, I want text and back arrow to be white. I tried following, but it doesnt work. <style name=\"Theme.MyTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\"> <item name=\"colorPrimary\">@color/blue</item> <item name=\"colorPrimaryDark\">@color/blue_darker</item> <item name=\"colorAccent\">@color/purple</item> <!-- item name=\"android:textColorPrimary\">@color/white</item--> // I don\'t want to set this, changes everywhere. <item name=\"android:textColorSecondary

jqGrid:Font Awesome Icons

时间秒杀一切 提交于 2019-11-26 11:19:22
问题 I am trying to use Font Awesome icons in place of the jqueryUI icons for the toolbar in my jqGrid (add,edit,delete,view icons). This demo is exactly what I would like to accomplish. I\'ve read Oleg\'s answer that demonstrates removing the icon class and adding the Font Awesome icons in its place. But when I try to do that nothing changes. I believe I\'m possibly referencing the icons wrong. I downloaded Font Awesome 4.0.3 and I have jqGrid 4.5.4--In the _icons.scss file of the FA file tree

How to make a toolbar in Google Chrome?

允我心安 提交于 2019-11-26 10:29:30
问题 I\'m exploring Google Chrome extensions for the first time. I would like to create what appears as a toolbar along the top of the page when you click the extension icon, much like the StumbleUpon toolbar. I can\'t see how to do this. The examples mainly show a popup.html, and not a fixed toolbar. 回答1: Although this answer shows two ways to create a toolbar in Chrome, I strongly recommend using page action or browser action badges. These do not take as much space as toolbars, and can also be

MenuItem tinting on AppCompat Toolbar

旧城冷巷雨未停 提交于 2019-11-26 09:16:03
问题 When I use drawables from the AppCompat library for my Toolbar menu items the tinting works as expected. Like this: <item android:id=\"@+id/action_clear\" android:icon=\"@drawable/abc_ic_clear_mtrl_alpha\" <-- from AppCompat android:title=\"@string/clear\" /> But if I use my own drawables or actually even copy the drawables from the AppCompat library to my own project it will not tint at all. <item android:id=\"@+id/action_clear\" android:icon=\"@drawable/abc_ic_clear_mtrl_alpha_copy\" <--

How to change Toolbar home icon color

a 夏天 提交于 2019-11-26 08:48:10
问题 I am using a android.support.v7.widget.Toolbar and learned from this post how to change the color of the hamburger icon to white, but the up/back arrow remains a dark color when I call setDisplayHomeAsUpEnabled(true); How can I make the arrow white as well? Here is what my toolbar looks like when I call setDisplayHomeAsUpEnabled(): ...and here is the relevant portion of my styles.xml file: <style name=\"AppTheme\" parent=\"Theme.AppCompat.NoActionBar\"> <item name=\"colorPrimary\">@color

Android: How to Center title in ToolBar

可紊 提交于 2019-11-26 08:26:24
问题 I am using ToolBar in my project first time, so i do not know how to customized the toolbar in android. I need to centered title in to the tool bar and how to do that please tell me. Thank in advance. 回答1: Remember that Toolbar is just a ViewGroup like the others. So you can stuff View s into it. In your case, you need a TextView inside a Toolbar . <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_height="wrap_content" android:layout_width="match_parent"> <TextView

How can I align Android Toolbar menu/icons to the left like in Google Maps app?

自古美人都是妖i 提交于 2019-11-26 07:56:27
问题 Here is a screenshot of Google Maps Toolbar. As you can see icons are aligned to the left instead of right (default behavior). I\'ve tried adding android:layout_gravity=\"left\" and android:gravity=\"left\" to the toolbar but it didn\'t work. Also tried adding an internal LinearLayout (with same gravity values) to the Toolbar but didn\'t worked either. Any ideas? I want to be able to use a regular Android menu with the Toolbar widget instead of recreating everything from the scratch. 回答1:

How do I make DrawerLayout to display below the Toolbar?

孤人 提交于 2019-11-26 07:29:09
问题 How to make the drawer layout be below the actionbar/toolbar? I\'m using v7:21 app compat library with the new ToolBar view. Examples that I see looks like <android.support.v4.widget.DrawerLayout xmlns:android=\"http://schemas.android.com/apk/res/android\" android:id=\"@+id/my_drawer_layout\" android:layout_width=\"match_parent\" android:layout_height=\"match_parent\"> <!-- drawer view --> <LinearLayout android:layout_width=\"304dp\" android:layout_height=\"match_parent\" android:layout

In android app Toolbar.setTitle method has no effect – application name is shown as title

巧了我就是萌 提交于 2019-11-26 04:06:47
问题 I\'m trying to create simple application using android-support-v7:21 library. Code snippets: MainActivity.java public class MainActivity extends ActionBarActivity { Toolbar mActionBarToolbar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mActionBarToolbar = (Toolbar) findViewById(R.id.toolbar_actionbar); mActionBarToolbar.setTitle(\"My title\"); setSupportActionBar(mActionBarToolbar); } activity_main