toolbar

How to change navigation page back button in xamarin forms

好久不见. 提交于 2019-11-30 07:46:35
问题 I am trying to change back arrow image in navigation page. For this in android app i created navigation page renderer and then using method toolbar.SetNavigationIcon and its not working, but when i use toolbar.SetLogo its working fine. protected override void OnElementChanged(ElementChangedEventArgs<NavigationPage> e) { base.OnElementChanged(e); toolbar.SetNavigationIcon(Resource.Drawable.arrow); toolbar.SetLogo(Resource.Drawable.arrow); } public override void OnViewAdded(Android.Views.View

Android - Remove shadow between Toolbar and TabLayout

瘦欲@ 提交于 2019-11-30 07:18:34
I'm trying to make a layout with CollapsingToolbarLayout . But I do not get one thing. I want to remove the shadow between Toolbar and TabLayout . I've tried several ways and I have not managed to remove the shadow. Can anybody help me? Thank you <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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:background="@android:color/white" android:fitsSystemWindows

Android toolbar back arrow with icon like WhatsApp

强颜欢笑 提交于 2019-11-30 04:01:28
How to display icon with back arrow in android toolbar like WhatsApp ? I use below code to set back arrow & icon in toolbar. toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); toolbar.setLogo(icon); but i got result as below image. I want icon immediate next after back arrow. I don't want any gap between back arrow & icon like below image of WhatsApp. How to set icon with back arrow in toolbar like WhatsApp ?

Android : Change entire app layout directions programmatically

孤人 提交于 2019-11-30 02:58:49
How can I change entire app layout direction to RTL? I am writing an app that user must select it's language in first launch and the layout should change based on user selection to RTL or remains LTR. I used to add android:supportsRtl="true" to the AndroidManifest and android:layoutDirection="rtl" for each layout but this approach have some problems like below : One problem is when I change the direction to RTL the ActionBar home icon or navigation button (when home as up is enabled) remains LRT and just move to the right. I also tried to change direction programmatically and the result was

Create TToolbutton runtime

不问归期 提交于 2019-11-30 02:52:49
问题 I have a problem with creating TToolbuttons at runtime and how they appear in my TToolbar . Basically I got a toolbar with some buttons in it already. I can create buttons at runtime and set the parent to the toolbar. But they are always shown as the first buttons in my toolbar. How can I make them appear at the end of my toolbar? Or any position I want them to be. 回答1: Here is a generic procedure that takes a toolbar, and adds a button to it, with a specified caption: procedure

Eclipse RCP: Right aligned search field in toolbar

走远了吗. 提交于 2019-11-29 22:30:42
问题 I would like to have a right aligned search field in the toolbar of an Eclipse RCP application. I already created the text field as ControlContribution and the respective search action in the ActionBarAdvisor class: protected void fillCoolBar(ICoolBarManager coolBar) { IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); //... toolbar.add(new ControlContribution("searchText") { //... This works and I have the search field in the toolbar. But how can I align the search text (or

Change the color of Navigation Drawer indicator icon

帅比萌擦擦* 提交于 2019-11-29 22:07:45
I am using a toolbar in place of actionbar and i am also using a navigation drawer.My toolbar colour is black and i want my navigation drawer indicator colour to be white.So how to change the colour of the navigation drawer indicator or put a custom navigation indicator in v7.Can any one please help me? Try creating this style in your styles.xml <style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle"> <item name="color">@android:color/white</item> </style> And then add it to you Applications theme like so: <item name="drawerArrowStyle">@style/DrawerArrowStyle</item> In your

A vertical Separator control in a Menu, Toolbar, StackPanel, etc. - Is it possible?

怎甘沉沦 提交于 2019-11-29 22:05:05
I want to use the Separator control in a vertical way (Lets say in a horizontal StackPanel). Searching around I found this method but it doesn't use the Separator control rather it uses borders and rectangles. https://social.msdn.microsoft.com/forums/en-US/wpf/thread/eab865be-ad9b-45ed-b9d8-fc93f737b163 Is it possible to use the Separator control in a vertical way? Also: <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" /> Vertical Separator <Style x:Key="VerticalSeparatorStyle" TargetType="{x:Type Separator}" BasedOn="{StaticResource {x:Type Separator}}"> <Setter

Toolbar will not collapse with Scrollview as child of CoordinatorLayout

旧街凉风 提交于 2019-11-29 22:02:25
I am trying to follow the Google Docs on using the CoordinatorLayout but i am having an issue with the ScrollView inside the CoordinatorLayout. Basically, the Toolbar normally would collapse with a RecyclerView or a Listview when scrolling down. Now with a ScrollView it will not collapse. <android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" > <TextView android:id="@+id/tv_View"

Xcode/iOS: How to hide Navigation- AND ToolBar on scroll down?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 21:58:49
I would like to hide both bars on scroll down on my iPhone. When I scroll up, they should appear again.. How can I handle this? The accepted answer does not work for me, as scrollViewWillBeginScroll: is not a delegate method. Instead I do -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { [[NSNotificationCenter defaultCenter] postNotificationName:@"BarsShouldHide" object:self]; } -(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { if(!decelerate) [[NSNotificationCenter defaultCenter] postNotificationName:@"BarsShouldUnhide" object:self]; }