android-actionbar-compat

Android Material Design navigation drawer menu icon chage

旧街凉风 提交于 2020-01-05 14:12:46
问题 I implemented a Material Design nav drawer using this example. I customize it according to my theme. Everything is working perfectly. Just the last thing I want to customize it's menu icon. I googled it, but have not find any good solution. I want to change its color if possible , or add a custom drawable. Any solution on idea. Thanks in advance This is my Application theme which i set in menifest <style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> <item name=

Android actionbar items remain when popping fragment

隐身守侯 提交于 2020-01-03 08:42:00
问题 I'm using the support actionbar. I'm also using fragments. Typically, I change the fragment using navigation drawer and everything works fine. Each fragment is able to make changes to the action bar items. When I change to a new fragment, the changes (new buttons) are removed. Here's my problem. In one instance, I replace the fragment and add the existing fragment to the back stack. When I go back to the previous fragment, the actionbar still has the items from the previous fragment. Example:

Android actionbar items remain when popping fragment

北战南征 提交于 2020-01-03 08:41:23
问题 I'm using the support actionbar. I'm also using fragments. Typically, I change the fragment using navigation drawer and everything works fine. Each fragment is able to make changes to the action bar items. When I change to a new fragment, the changes (new buttons) are removed. Here's my problem. In one instance, I replace the fragment and add the existing fragment to the back stack. When I go back to the previous fragment, the actionbar still has the items from the previous fragment. Example:

popupBackground glitches with Material Design

◇◆丶佛笑我妖孽 提交于 2020-01-03 06:44:13
问题 I have been working on updating my apps to Material Design. I have an app that uses tabs. For some reason whenever I use android:popupBackground to set the drop down menu color it freaks out. I set up a default project with tabs and used the following theme and the same thing happened. Has anyone one else had this problem? My app is open source and so all the code is available here GitHub <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="Theme.AppCompat.Light

Use ShowCaseView with ActionBarCompat / ActionBarSherlock Android

末鹿安然 提交于 2020-01-02 08:19:13
问题 I am using ShowcaseView library from here in my android application. I want use ShowcaseView with Actionbar Compat . But i am not getting how to use it? I have tried following code but it throws NullPointerexception . Please help me solve this issue. Thank you. Code : public class Activity1 extends ActionBarActivity implements OnShowcaseEventListener { ShowcaseView sv; ShowcaseView.ConfigOptions co; @Override protected void onCreate(Bundle savedInstanceState) { try { super.onCreate

v7-21 ActionBarActivity not showing the app main icon on the left

孤人 提交于 2020-01-01 18:23:59
问题 I implemented a basic activity as public class MainActivity extends Activity and when I add an actionbar with the menu as below, the app icon defined in the AndroidManifest.xml shows up nicely <application android:allowBackup="true" android:icon="@drawable/logo_green" android:label="@string/app_name" android:screenOrientation="portrait" android:theme="@style/Theme.AppCompat.Light.DarkActionBar" > When I try to change to android.support.v7.app.ActionBarActivity ( and switch to compatible

How to change ActionBar's action text color using AppCompat

╄→гoц情女王★ 提交于 2019-12-30 01:59:05
问题 I am trying to change the text color of a action menu item on the action bar. Using app compat. Also the overflow icon doesnt change too. Here is my custom styled styles.xml files. res/values/styles.xml <style name="AppTheme" parent="@style/Theme.AppCompat.Light"> <!-- Setting values in the default namespace affects API levels 7-13 --> <item name="actionBarStyle">@style/MyStyledActionBar</item> </style> <style name="MyStyledActionBar" parent="@style/Widget.AppCompat.Light.ActionBar"> <!--

Couldn't show items with AppCompat library

爷,独闯天下 提交于 2019-12-29 07:43:09
问题 I am having some troubles to show items in the ActionBar with AppCompat. This code works on a normal actionbar <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/item1" android:showAsAction="always" android:title="Se connecter" android:visible="true"> </item> </menu> But with the AppCompat library the item isn't shown.. What should I do ? Thanks in advance :) 回答1: showAsAction is not in the android xml namespace for API < 11 try something like the

Both Fragment in ActionBar return true for fragment.isVisible()

不想你离开。 提交于 2019-12-25 09:22:13
问题 In my MainActivity with ActionBar I listen to a listener from a DialogFragment and based on which Fragment of ActionBar i am on, I need to do some things. I am using below code to get the current fragment and check which of the two ActionBar fragment i am on: private Fragment getVisibleFragment() { FragmentManager fragmentManager = getSupportFragmentManager(); List<Fragment> fragments = fragmentManager.getFragments(); if (fragments != null) { for (Fragment fragment : fragments) { if (fragment

Which Google document should be followed for Android icon sizes?

我的未来我决定 提交于 2019-12-24 10:21:16
问题 Google's Android document on Iconography says that action bar icons should be 32x32 while its document on Action Bar Icons says that they should be 24x24 for the baseline that is presumably mdpi. I thought that Android document on Iconography was obsolete, but Google usually is good at marking obsolete/deprecate features. Could anyone shed some light on this? 回答1: This is the first time I am hearing about the site you are referring to. I believe it was the older version of "developer.android