android-toolbar

Xamarin Forms Android AppCompatActivity Toolbar background color is not changing

左心房为你撑大大i 提交于 2019-12-13 20:43:31
问题 In my Xamarin Forms Android Project I need to change the ToolBar Title color and background color I have tried with many workarounds suggested in Google but unfortunately I am unable to find the correct solution to me What I Need is What I am getting Now is by using below codes MainActivity.cs [Activity(Label = "Sample.Droid", Icon = "@mipmap/icon_launcher", Theme = "@style/MyTheme")] public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity { protected

ToolbarAlphaScrollBehavior CoordinatorLayout

这一生的挚爱 提交于 2019-12-13 20:17:40
问题 Hi I've been following this link to accomplish the opacity effect on the toolbar My Layout File : <?xml version="1.0" encoding="utf-8"?> <layout> <android.support.design.widget.CoordinatorLayout android:id="@+id/coordinator_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".ProductDetailActivity"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="?attr

Android Support v7 Toolbar setTitleTextAppearance not working

巧了我就是萌 提交于 2019-12-13 18:34:51
问题 I am trying to change the font of the toolbar's title. Here is my toolbar layout: <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" android:layout_height="wrap_content" android:layout_width="match_parent" android:minHeight="?attr/actionBarSize" android:background="#666666" app:titleTextAppearance="@style/MyText" app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>

Android - Should pass resolved color instead of resource id here: `getResources().getColor(R.attr.colorPrimary)`

家住魔仙堡 提交于 2019-12-13 12:42:58
问题 I am following this tutorial Flexibal Space with Image For design pattern for a toolbar called Flexibal Space with Image in android. While using Palette here I am stuck in following error in java file causing application to crash. Should pass resolved color instead of resource id here: `getResources().getColor(R.attr.colorPrimary)` Follwing is my java file YoutubeActivity.java public class YoutubeActivity extends AppCompatActivity { Toolbar toolbar; CollapsingToolbarLayout collapsingToolbar;

How to add TextView in same location of title in Toolbar?

泄露秘密 提交于 2019-12-13 08:33:47
问题 I have a toolbar in my xml file, with no child views defined in it. I want to add a TextView on exact location of default title in toolbar when we call setSupportActionBar(toolbar) . On particular events, I like to fade in or out these two views in case of particular events. I tried to do the following in onCreate() of the activity, but nothing is visible except the default title in toolbar. TextView tv = new TextView(this); tv.setLayoutParams(toolbarTitle.getLayoutParams()); tv.setHeight

on clicking hamburger icon navigation drawer not opening

偶尔善良 提交于 2019-12-13 08:22:14
问题 The navigationDrawer is not opening on clicking hamburger icon,I have used onOptionsItemSelected but it's of no use: public class CardDashBoard extends Fragment implements View.OnClickListener { View view; private ArrayList<String> mtext=new ArrayList<>(); private ArrayList<String> mimage=new ArrayList<>(); ImageView image1,image2,image3,image4; TextView text1,text2,text3,text4; CardView cardViewMap; DrawerLayout drawerLayout; Toolbar toolbar; ActionBarDrawerToggle actionBarDrawerToggle;

Collapsing toolbar blur image when collapsed

本小妞迷上赌 提交于 2019-12-13 08:18:16
问题 i need some help with my toolbar. Right now i use a collapsing toolbar with image wich collapsed when i scroll up. I know i can use contentScrim to make the Toolbar transparent and therefore see the image as "toolbar background". However, i want the image to blur(/fade) when the toolbar is collapsed. Any suggestions how to achieve this? 回答1: You can use this library. (RealTimeBlurView) For the blur effect, just put the imageview behind the blurview. To achieve what you want just change

Toolbar not showing elevation in Android 9, API 28

℡╲_俬逩灬. 提交于 2019-12-13 05:06:01
问题 In my app, the Toolbar is not showing shadow at its bottom, my target API is from Android 6 M to Android 9 P , I am testing my app on device having Android 9 Pie . There is a same question here but no answer. toolbar.xml <androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:elevation="4dp"> </androidx.appcompat.widget.Toolbar> activity_main

ActionBar aka Toolbar is black after upgrade to Support Library v21

不羁岁月 提交于 2019-12-13 02:38:07
问题 I have just upgraded to the newest library version after Android Lollipop was released. After I fixed serveral doublicated attributes (which where caused by the Support Library) I updated my android-switch-backport, and it compiled again. However now I have no more the ActionBar, it is now a Toolbar. So far so good, but now is that Toolbar black and I have no idea why. So how can I change it back to my custom colors, I used Android Action Bar Style Generator, for generating all required

Android toolbar without overflow menu

匆匆过客 提交于 2019-12-13 02:11:38
问题 I want to use a toolbar instead of an actionBar since i can't use the split actionbar option, so i implemented two toolbars one in the top and the other in the bottom but im having a problem : that some of the items are in the overflow menu leaving a huge empty space this is how my toolbar looks like : and what i need is somthing like this : 回答1: Add this line in your xml layout: android:showAsAction="always" so that your items never appear in the overflow menu. 来源: https://stackoverflow.com