android-actionbar-compat

Custom (gradient) background of ActionBar Compat

吃可爱长大的小学妹 提交于 2019-12-03 12:39:06
问题 I am using Action Bar Compat so that my action bar with navigation drawer was backward compatible down to API level 9 and I want to change the background of the action bar. I copied the code from Android Developers: <?xml version="1.0" encoding="utf-8"?> <resources> <!-- the theme applied to the application or activity --> <style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="android:actionBarStyle">@style/MyActionBar</item> <!-- Support library

Type The container 'Android Dependencies' references non existing library android-support-v7-appcompat/bin/android-support-v7-appcompat.jar

那年仲夏 提交于 2019-12-03 09:40:35
问题 I just got some kind of error when trying to using Action Bar Compat support library to my project, I don't know what's wrong, because I have followed the instructions from this link > http://developer.android.com/tools/support-library/setup.html So, this is the screen shot of the error .. 回答1: I also encountered such problem. My error was: The container 'Android Dependencies' references non existing library 'C:\development\adt-bundle-windows-x86-20140702\workspace\appcompat_v7\bin\appcompat

How to customize the Action Bar subtitle Font?

China☆狼群 提交于 2019-12-03 09:06:53
问题 I have created an ActionBar ( android.support.v7.widget.Toolbar ) as below. <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myToolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize"> </android.support.v7.widget.Toolbar> In my ActionBar, other than the title, I also have Subtitle. However I would like to customize the Subtitle. In customize, I mean the font size,

Android ActionBar (ActionBarCompat) Spinner Dropdown list ?

白昼怎懂夜的黑 提交于 2019-12-03 07:33:47
I am currently working ActionBar (ActionBarCompat) oriented project, I Need some Clarification about actionbar. I am using spinner layout like this, <Spinner android:id="@+id/SpinnerList" android:layout_width="fill_parent" android:layout_height="wrap_content" /> My code, public class MainActivity extends ActionBarActivity implements OnItemSelectedListener{ private boolean mAlternateTitle = false; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ActionBar bar = getActionBar(); bar.setNavigationMode(ActionBar.NAVIGATION_MODE

Android 4.4 Kitkat custom view actionbar not filling the whole width

♀尐吖头ヾ 提交于 2019-12-03 07:07:59
问题 I am trying to have a Simple actionbar with a custom view, but I get the following result: For demonstration I created a simple xml with a yellow background color which is supposed to take the whole width. Here is the xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/yellow" android:orientation="vertical" > <TextView android

Android toolbar menu is not showing

橙三吉。 提交于 2019-12-03 06:40:09
问题 I'm trying to add a menu to the ToolBar. onCreateOptionsMenu method of my Activity is called, but no menu appears. This is dashboard.xml (from menu folder) <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.app.android.ui.dashboard.DashboardActivity"> <item android:id="@+id/action_scan_qr" android:icon="@drawable/ic_drawer"

How to change ActionBar title font when using AppCompat

百般思念 提交于 2019-12-03 05:59:09
问题 I would like to apply custom font to the title of my app which is displayed on the ActionBar. Previously I didn't use any support library and this solution: int titleId = getResources().getIdentifier("action_bar_title", "id", "android"); TextView yourTextView = (TextView) findViewById(titleId); yourTextView.setTypeface(face); worked fine for me. But now I am using material design SupportActionBar and this throws NullPointerException. So how to change the ActionBar font when using AppCompat?

“You need to use a Theme.Appcompat theme…” when testing ActionBarActivity, but I am

匆匆过客 提交于 2019-12-03 05:30:25
问题 I have a problem when testing an app which uses ActionBarActivity from android-support-v7-appcompat via Android JUnit test in Eclipse. When running in an emulator or device everything seems to work fine. I tried using a mock application as in ActivityUnitTestCase and startActivity with ActionBarActivity and changed the parent theme in values-v11 etc. as suggested in ActionBarCompat: java.lang.IllegalStateException: You need to use a Theme.AppCompat but it still does not work. You need to use

android.support.v7.widget.Toolbar icon alignment issue

守給你的承諾、 提交于 2019-12-03 05:22:19
Using the new Android 5.0 Toolbar approach, and following the Google IO example, I'm setting a navigation icon and a spinner in the toolbar. The issue is, the navigation icon is BOTTOM-aligned. I can't find any reason why this is happening... [Note that I deliberately set it to a solid square to see the alignment issue more clearly] My code is as follows: toolbar.xml <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" app:theme="@style/ActionBarThemeOverlay" app:popupTheme="@style

Android: NavigationDrawer and ActionBarCompat

余生颓废 提交于 2019-12-03 05:17:38
问题 I started working with NavigationDrawer using ActionBarSherlock and got good results, but my company approving this Open Source is not likely to come anytime soon, so I'm working to switch to ActionBarCompat. ActionBarCompat was just officially released yesterday (July 24th, 2013). Has anyone gotten both to work well with each other? I'm hoping I can answer my own question, but seeing if anyone has gotten this to work. The race is on! :-) YouTube on ActionBarCompat's release: https://www