android-actionbar-compat

How to change color of ActionBar's Title Text on Android 4.3 api 18

有些话、适合烂在心里 提交于 2019-11-30 15:50:42
问题 I am using appcompat v7 library to support action bars in api level 8 and up. I am trying to change the color of title text of action bar. Color of title text is changing in GingerBread but when I run the app on my phone with JellyBean the color doesn't change. On GingerBread Title Color changes to Red: On JellyBean it remains black: Here are my styles.xml: styles.xml: <resources> <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light"> <item name="actionBarStyle">@style

How to change color of ActionBar's Title Text on Android 4.3 api 18

♀尐吖头ヾ 提交于 2019-11-30 15:22:42
I am using appcompat v7 library to support action bars in api level 8 and up. I am trying to change the color of title text of action bar. Color of title text is changing in GingerBread but when I run the app on my phone with JellyBean the color doesn't change. On GingerBread Title Color changes to Red: On JellyBean it remains black: Here are my styles.xml: styles.xml: <resources> <style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light"> <item name="actionBarStyle">@style/ActionBarStyle</item> </style> <style name="ActionBarStyle" parent="@style/Widget.AppCompat.Light.ActionBar.Solid">

Android Support Toolbar colorControlNormal color

纵饮孤独 提交于 2019-11-30 12:49:35
问题 I would like to set my spinner drop down color to white, whilst keeping the other elements in my theme the default color. Here is the situation: <android.support.v7.widget.Toolbar android:layout_height="@dimen/action_bar_height" android:layout_width="match_parent" android:minHeight="?attr/actionBarSize" android:background="?attr/colorPrimary" app:theme="@style/ToolbarTheme.Base" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> <Spinner android:layout_width="wrap_content" android:layout

Actionbar items are duplicating

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 11:20:42
I have Action Bar in my application. I am adding action items using menu.xml. I am using action bar-compat as my support library. I observed a weird issue where my action items are getting duplicated. I am finding this issue randomly when leave my device idle or work with other applications. Please find the screen shot and my code below: private LoginWebActivity mContext; private final String TAG = "LoginFragment"; // for metrics private String mPageNameSignIn = "signin"; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mView =

Action Bar Fragment Activity

帅比萌擦擦* 提交于 2019-11-30 08:22:01
I'm triying to migrate my app from actionbarsherlock to Google's actionbarcompat, but ActionBarFragmentActivity does not exist. Do I have to use ActionBarActivity or there is another way? Thanks in advance, Diego. Look here. This should help you out. http://android-developers.blogspot.in/2013/08/actionbarcompat-and-io-2013-app-source.html An Excerpt: Extend Activity classes from ActionBarCompat: ActionBarCompat contains one Activity class which all of your Activity classes should extend: ActionBarActivity. This class itself extends from FragmentActivity so you can continue to use Fragments in

ActivityUnitTestCase and startActivity with ActionBarActivity

╄→尐↘猪︶ㄣ 提交于 2019-11-30 08:18:21
I try to test a Activity which uses ActionBarActivity (from the appcompat library). I need a custom Application to be able to manipulate the DI system to load my test service instead of the real service. If I have my test written and call startActivity I get the following error: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. If I call launchActivityWithIntent the Activity starts without any problems but It is using my Real Application class instead of the Mocked Application class. Any ideas how I can fix that or how I can execute

How to change ActionBar's action text color using AppCompat

瘦欲@ 提交于 2019-11-30 06:40:21
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"> <!-- Setting values in the default namespace affects API levels 7-13 --> <item name="background">@drawable/bg

Android ActionBar compat overflow menu not showing on sdk 10

≡放荡痞女 提交于 2019-11-30 04:56:48
问题 Hello and thank you for the time you take in reading this question. I am trying to develop an android app which will use the ActionBar compat library. I have followed (as far as I see it) all the recommendations when using the compat library. My Manifest looks like this(only relevant code shown): <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8"

Android center custom view in actionbar

故事扮演 提交于 2019-11-30 04:17:51
问题 Trying to set a custom view for my actionbar, but have the problem that it doesn't fill up the entire width of the actionbar which makes it har for me to center objects. How can i set a custom view in my actionbar that fills up the entire actionbar? Code for setting up my actionbar: actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowCustomEnabled(true); actionBar.setDisplayShowTitleEnabled(false); LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT

Change actionbar to overlay from within Fragment

别说谁变了你拦得住时间么 提交于 2019-11-30 03:48:19
问题 I have a fragment (Fragment 1) that is replaced by another fragment (Fragment 2). Fragment 1 is placed on the stack. I'm using compatibility mode (not ActionBarSherlock). Here's my problem. I want the actionbar to be displayed as overlay in some fragments, but not in others. Specifically, when Fragment 2 is shown, I want it to appear in overlay and then go back to the normal actionbar once Fragment 2 exits. Fragment 1 has an regular actionbar that is always visible. But, when I replace