toolbar

Unable to make toolbar transparent in Android

倾然丶 夕夏残阳落幕 提交于 2019-12-19 10:42:38
问题 My tool bar always stays gray when I try to set the background as transparent. Here is my XML. <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="wrap_content" android:background="@android:color/transparent" android:minHeight="@dimen/abc_action_bar_default_height_material" app:theme="@style/Rushmore.Toolbar.Transparent" /> And my theme

How can I make a vertical UIToolbar?

人走茶凉 提交于 2019-12-19 10:33:16
问题 How can I make a vertical UIToolbar? 回答1: Try this #define M_PI 3.141 UIToolbar *tool; tool.transform = CGAffineTransformRotate(CGAffineTransformIdentity, 270.0/180*M_PI); 回答2: Subclass UIToolbar and do the following: CGFloat DegreesToRadian(CGFloat degrees) { return ((M_PI * (degrees))/ 180.0); } - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.transform = CGAffineTransformMakeRotation(DegreesToRadian(90)); } return self; } - (void)layoutSubviews {

How to set the Toolbar collapseIcon color programmatically

*爱你&永不变心* 提交于 2019-12-19 09:06:09
问题 I want to change the color of the back button in the toolbar when a search is displayed (the circled white arrow). I managed to change the color of all other elements and I am stuck with the back arrow color. I can set the collapseIcon (back arrow drawable) from xml: <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:layout_scrollFlags="enterAlways" app

Eclipse Juno Perspective tool bar

只愿长相守 提交于 2019-12-19 06:22:37
问题 While dragging the perspective tool bar to a different place in eclipse Juno, my eclipse got hang, and after restarting eclipse, the perspective bar gone. I tried googling but didnt find a solution to display that bar again. Anyone got a solution? 回答1: There are two things you can try: Reset your current perspective (Window/Reset perspective...). Although your configured set of views will get lost, it might bring back the perspective switcher. If that does not work, then you should reset the

How to remove space in Toolbar [duplicate]

為{幸葍}努か 提交于 2019-12-19 04:56:09
问题 This question already has answers here : How to reduce the gap between navigation icon and toolbar title? (3 answers) Closed 2 years ago . I want to remove this space between Toolbar and TextView as in this picture: I try to user contentInsetStart and contentInsetEnd but also not work. This is my full code to handle it <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="@dimen/app_bar_height" android:theme="@style/ThemeOverlay.AppCompat.Dark

Toolbar leaving white space with hide on RecyclerView scroll

自作多情 提交于 2019-12-19 03:45:34
问题 I'm trying to hide my Toolbar on the RecyclerView scroll and so far it seems to have hidden, but it's leaving a white blank with it. I'm pretty sure this has something to do with the overlay of my MainActivity's layout and the fragment in the FrameLayout. Here is my activity_main.xml . I need the FrameLayout because I am loading different fragments with selection of an item in the Navigation Drawer. <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res

Support Toolbar's custom view not using full width

北城以北 提交于 2019-12-19 02:08:31
问题 I'm using support v7's toolbar. I added a custom view, but the custom view doesn't seem to obey "match_parent". It would only stretch as far as the first icon it sees. Does anyone know a fix to this? Or is the toolbar not meant to be used this way? My code: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match

Change ActionBarDrawerToggle icon android in toolbar?

[亡魂溺海] 提交于 2019-12-18 20:47:55
问题 I have an activity with navigation drawer and toolbar Activity public class MainActivity extends AppCompatActivity { private Toolbar toolbar; private CustomTextViewMondaRegular tvTitle; private ListView mDrawerList; private DrawerLayout mDrawerLayout; private ActionBarDrawerToggle mDrawerToggle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); toolbar = (Toolbar) findViewById(R.id.tool_bar);

TinyMCE 4 toggle toolbar button state

落爺英雄遲暮 提交于 2019-12-18 17:31:05
问题 What is the simplest way to toggle the state of a toolbar button (like it works with the default bold-button)? I can't "get" to that class i Tinymce that changes the button's look from default to selected. This is my plugin code (simplified): tinymce.PluginManager.add('myplugin', function (editor) { editor.addButton('mybutton', { text: false, image: 'someimage.png', onclick: function () { /* Toggle this toolbar button state to selected (like with the tinymce bold-button)*/ /* and of course

Toolbar and TabLayout is not visible on Android 4.4 devices

我只是一个虾纸丫 提交于 2019-12-18 16:25:28
问题 I was trying to implement Toolbar and TabLayout using google design library by referring to [http://blog.grafixartist.com/material-design-tabs-with-android-design-support-library/] [blog]. Output works as expected on Lollipop devices but it doesnot show ToolBar and TabLayout on Kitkat devices. But i can still swipe through 3 fragment as expected on kitkat device as well. How come same code written using google support libraries works differently on different devices! I tried referring to