android-toolbar

Animation issues when using BottomNavigationView with NavController and each Fragment has its own Toolbar

本秂侑毒 提交于 2019-12-10 18:28:41
问题 The bounty expires in 12 hours . Answers to this question are eligible for a +100 reputation bounty. Josh Hardman wants to draw more attention to this question. I'm developing an app in Kotlin using some of the latest Android Jetepack components. I've recently had a bit of a hitch with the following case: This issue seems to occur when using BottomNavigationView with NavController , and when each Fragment has its own Toolbar . The problem is that when transitioning from Fragment A to Fragment

Android toolbar overflow menu change text color and fill menu to the screen

天大地大妈咪最大 提交于 2019-12-10 18:06:33
问题 there I facing problem to change the text colour of toolbar/action bar overflow menu item. I do too many googling and reading Stackoverflow answers but it can not solve my prblem currenlt i am getting black colour into overflow menu item. what i want is 1. I want to change the colour of menu item black to WHITE. 2. I want to change the width of the overflow menu to match parent screen my code: <resources> <!-- Base application theme. --> <style name="AppTheme" parent="AppTheme.Base"> <!--

Change the size of hamburger icon in toolbar?

安稳与你 提交于 2019-12-10 17:26:40
问题 I have 2 questions which can be strange but anyway... I have toolbar with a title of application. How to change it to picture which is not the logo? The next question: Is it possible to set, change the size of hamburger icon in toolbar? I made classic navigation drawer with the help of next code below (I used ActionBarDrawerToggle also) but the size is too small if you will compare it with another items(icons) of my toolbar. toolbar = (Toolbar) findViewById(R.id.application_toolbar);

Why should I use AppCompatActivity instead of a standalone Toolbar to create an Activity's app bar?

谁都会走 提交于 2019-12-10 17:18:22
问题 There are two principal ways of creating an app bar for an activity in API 21+ using the Toolbar. Create an activity which extends AppCompatActivity and then follow the instructions here Create a standalone Toolbar which acts as an app bar (define the Toolbar in xml using android.support.v7.widget.Toolbar ) and then inflate a menu into it like this: ` toolbar.inflateMenu(R.menu.homeview_menu_common); My question is: what are the benefits and drawbacks of doing one over the other?` A related

Space between Up Navigation and Toolbar title is too large [duplicate]

跟風遠走 提交于 2019-12-10 15:55:22
问题 This question already has answers here : Padding / space in Toolbar between icon and title (Android 24) (2 answers) Closed last year . Does anyone knows why is it happening? The first one is how it's look like and the second one is how I want it to look like OBS: When I enable the app icon in the toolbar, it almost has no space between it and the title 回答1: Yeah, that happening with everyone using v24.0.0 and above support library version. Toolbar title has an extra 16dp padding since version

NullPointerException while setting toolbar

旧巷老猫 提交于 2019-12-10 15:38:09
问题 I've got the following XML Layout : <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mycloud"> <include android:id="@+id/app_bar" layout="@layout/tool_bar" /> </LinearLayout> With the include tool_bar being : <?xml version="1.0" encoding="utf-8"?> <android

How to set drawerlayout below toolbar with coordinator layout

99封情书 提交于 2019-12-10 15:28:46
问题 I have an xml like this, when I show drawer layout, It overlays Toolbar , I want my drawerlayout below my Toolbar , I cannot figure out how to do it, I tried lots of stuff and I tried it all day long. How can I use CoordinatorLayout with DrawerLayout without overlapping the Toolbar ? This is my actionbar style: <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/ColorPrimary</item> <item name="colorPrimaryDark">@color/ColorPrimaryDark</item>

Collapsing toolbar with floating action Menu

帅比萌擦擦* 提交于 2019-12-10 15:21:35
问题 I followed this link to create floating toolbar with fab .. Collapsing toolbar with floating action Menu I tried to change the fab to a floating menu with few options when i click on the flab but when i attached the fab along with the toolbar,I couldn't collapse the toolbar along with the fab and hide the floating menu. This is the link which i followed to create floating menu Sub menu items in fab Can any one help me please.... My layout <?xml version="1.0" encoding="utf-8"?> <android

Toolbar title textsize decreases on orientation change

﹥>﹥吖頭↗ 提交于 2019-12-10 14:44:54
问题 The Toolbar title textsize gets decreased when I change orientation from portrait to landscape and gets reset when I change back to portrait. The activity in which this happens extends ActionBarActivity which uses getSupportActionBar() . 回答1: Use the below solution: <android.support.v7.widget.Toolbar android:id="@+id/main_toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:titleTextAppearance="@style/ToolbarTitle

Getting Toolbar in Fragment

房东的猫 提交于 2019-12-10 14:43:47
问题 I set up a toolbar in my main activity and when I go inside a fragment, I want to add a slider on it. If I had had the access to the Toolbar object, I would simply do: Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayShowTitleEnabled(false); Spinner mNavigationSpinner = new SpinnerTrigger(getSupportActionBar().getThemedContext()); toolbar.addView(mNavigationSpinner); But if I get it using ((ActionBarActivity) getActivity())