android-actionbar

Changing action bar searchview hint text color

江枫思渺然 提交于 2020-01-10 06:47:02
问题 How can I change the action bar search view hint text colour? This question explains how to get the EditText when using ABS: Android ActionBar Customize Search View Is there a android.R.id I could use to get a reference to the EditText so I could change the hint colour? Or is there some other way to change the colour? 回答1: android:actionBarWidgetTheme of your main theme should point to a style that has a android:textColorHint in it. That one will allow changing the hint text color of the

Changing action bar searchview hint text color

亡梦爱人 提交于 2020-01-10 06:46:21
问题 How can I change the action bar search view hint text colour? This question explains how to get the EditText when using ABS: Android ActionBar Customize Search View Is there a android.R.id I could use to get a reference to the EditText so I could change the hint colour? Or is there some other way to change the colour? 回答1: android:actionBarWidgetTheme of your main theme should point to a style that has a android:textColorHint in it. That one will allow changing the hint text color of the

SherlockActionBar: How to adjust CustomView against actionBar

此生再无相见时 提交于 2020-01-09 19:04:48
问题 Question: How can I have the title back? Here's the screenshot (Missing title): Actionbar setting: ActionBar actionBar = getSupportActionBar(); actionBar.setTitle("My Title"); actionBar.setIcon(drawable.dropdown_user); View mLogoView = LayoutInflater.from(this).inflate(R.layout.mLogoView, null); actionBar.setCustomView(mLogoView); actionBar.setDisplayShowCustomEnabled(true); actionBar.setDisplayShowTitleEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); mLogoView.xml: <?xml version="1

Android Navigation Drawer over the tabs

谁都会走 提交于 2020-01-09 04:29:25
问题 I am using the new navigation drawer available from the support library. When using the drawer along with tabs, the drawer menu is getting displayed below the tabs as shown below. How can i make sure the drawer menu is shown on the tabs. (It should display the drawer menu as if there are no tabs) Drawer menu without tabs Drawer menu with tabs 回答1: I got the same issue and the answer I got from Roman Nurik (Android team) is that the Navigation Drawer should not be used with the Action Bar tabs

Action Bar menu item text color

旧街凉风 提交于 2020-01-09 01:56:13
问题 How to change text color of menu item title. I tried to change it as below <style name="Theme.Kanku.ActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title"> <item name="android:textColor">@color/white</item> </style> But it change color only of Action Bar title text, but not menu item text. 回答1: Try something like this : <style name="ThemeName" parent="@style/Theme.Sherlock.Light"> <item name="actionMenuTextColor">@color/white</item> <item name="android

Android: Unable to style action bar

爷,独闯天下 提交于 2020-01-07 09:07:18
问题 I want to get something like this for this I have written title_layout which looks something like this <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center"> <TextView android:id="@+id/mytext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"

Android ActionBar change Item color on click

久未见 提交于 2020-01-07 06:43:26
问题 In the action bar I have items that are presented in text, not icons. On click I want to change the color of this text from blue to white. I don't want to change the background with the <item name="selectableItemBackground"></item> only the text color. Anyone has any ideas? 回答1: <style name="AppTheme" parent="android:Theme.Holo"> <item name="android:actionMenuTextColor">@color/action_item_text_color</item> </style> R.color.action_item_text_color : <?xml version="1.0" encoding="utf-8"?>

Android ActionBar change Item color on click

帅比萌擦擦* 提交于 2020-01-07 06:43:04
问题 In the action bar I have items that are presented in text, not icons. On click I want to change the color of this text from blue to white. I don't want to change the background with the <item name="selectableItemBackground"></item> only the text color. Anyone has any ideas? 回答1: <style name="AppTheme" parent="android:Theme.Holo"> <item name="android:actionMenuTextColor">@color/action_item_text_color</item> </style> R.color.action_item_text_color : <?xml version="1.0" encoding="utf-8"?>

How can I theme my action bar to match this image?

孤街浪徒 提交于 2020-01-06 21:06:46
问题 I'm working on an app's UI and I want to get the action bar to look like this: This is what it looks like right now: This is my styles.xml <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimary">@color/sunshine_blue</item> <item name="colorPrimaryDark">@color/sunshine_dark_blue</item> </style> <!-- Main activity theme --> <style name="ForecastTheme" parent="AppTheme"> <item name="actionBarStyle">@style

Use ActionBar compability version with Android 4.0

久未见 提交于 2020-01-06 19:29:33
问题 I followed the code in the ActionBar compability version When I use the code for API level 10 or less than it, it shows a ActionBar, but when I use it for API level 11 or greater, It does not show logo icon and Action items. I checked the classes and I understood: ActionBarHelperBase : API level 10 or less. ActionBarHelperHoneycomb : API level 11 or greater. ActionBarHelperICS : API level 14 or greater. What is the best way to fix the ActionBar for Android Version 3.0 or greater? Specially