[] Action bar implementation which uses the native action bar on Android 4.0+ and a custom implementation on pre-4.0 through a single API and theme.

Overview

DEPRECATED

ActionBarSherlock is deprecated. No more development will be taking place. For an up-to-date action bar backport use AppCompat.

Thanks for all your support!

ActionBarSherlock

ActionBarSherlock is an standalone library designed to facilitate the use of the action bar design pattern across all versions of Android through a single API.

The library will automatically use the native ActionBar implementation on Android 4.0 or later. For previous versions which do not include ActionBar, a custom action bar implementation based on the sources of Ice Cream Sandwich will automatically be wrapped around the layout. This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.

See http://actionbarsherlock.com for more information.

Example Image

Try out the sample applications on the Android Market: Feature Demos, Fragments, and RoboGuice.

Continuous integration is provided by Travis CI.

Developed By

License

Copyright 2012 Jake Wharton

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Search View Widget Crashes in ICS and above

    Search View Widget Crashes in ICS and above

    When using the Search View Widget as a Action View in the latest sherlock with Ice Cream Sandwich or above it crashes complaining about a layout file.

    I've fixed it by setting the code in my activity that uses a plain button for Eclair (As google recommends), The sherlock implementation from Froyo to Honeycomb and then the native one from Ice Cream Upwards.

    I think the Sherlock Implementation should wrap around the native widget by default or is this not possible ? At least it should throw an error complaining it isn't compatible with anything newer than Honeycomb and the user should use the Native Widget

    opened by jcampbell05 68
  • ABS causes an InflateException on some devices

    ABS causes an InflateException on some devices

    The stacktrace is a few exceptions deep, unfortunately I can't reproduce it locally, this was captured by our app in production. I've pulled out what I think are the most relevant portions.

    ABS: 4.0.2 Android: 2.3.5 Devices: M9 and MEIZU MX

    java.lang.RuntimeException: Unable to start activity ComponentInfo{my component}: android.view.InflateException: Binary XML file line #24: Error inflating class 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1686)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1702)
    at android.app.ActivityThread.access$1600(ActivityThread.java:118)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:952)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3768)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class 
    at android.view.LayoutInflater.createView(LayoutInflater.java:518)
    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
    at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2351)
    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2406)
    at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1531)
    at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:895)
    at com.actionbarsherlock.internal.ActionBarSherlockCompat.initActionBar(ActionBarSherlockCompat.java:137)
    at com.actionbarsherlock.internal.ActionBarSherlockCompat.getActionBar(ActionBarSherlockCompat.java:127)
    at com.actionbarsherlock.app.SherlockFragmentActivity.getSupportActionBar(SherlockFragmentActivity.java:46)
    
    ... 30 more java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x1
    at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:463)
    at android.view.View.(View.java:2096)
    at android.view.ViewGroup.(ViewGroup.java:294)
    at android.widget.FrameLayout.(FrameLayout.java:88)
    at android.widget.FrameLayout.(FrameLayout.java:84)
    at java.lang.reflect.Constructor.constructNative(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
    at android.view.LayoutInflater.createView(LayoutInflater.java:505)
    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
    at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2351)
    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2406)
    at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1531)
    at com.actionbarsherlock.internal.ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:895)
    at com.actionbarsherlock.internal.ActionBarSherlockCompat.initActionBar(ActionBarSherlockCompat.java:137)
    at com.actionbarsherlock.internal.ActionBarSherlockCompat.getActionBar(ActionBarSherlockCompat.java:127)
    at com.actionbarsherlock.app.SherlockFragmentActivity.getSupportActionBar(SherlockFragmentActivity.java:46)
    at MyBaseActivity.onCreate(BaseFragmentActivity.java:23)
    at MyActivity.onCreate(MyPlaces.java:58)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1046)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1650)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1702)
    at android.app.ActivityThread.access$1600(ActivityThread.java:118)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:952)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3768)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)
    

    The line it's crashing on (ActionBarSherlockCompat.installDecor(ActionBarSherlockCompat.java:895)

    mDecor = (ViewGroup)mActivity.getWindow().getDecorView().findViewById(android.R.id.content);
    

    Inside my app I'm calling getSupportActionBar() before setContentView() and I'm wondering if this is the problem. I just find it odd that it only happens on those two devices and none of my personal devices.

    Framework Bug 
    opened by ChrisSmith 54
  • Support SearchView

    Support SearchView

    I'm trying to port a program that uses this menu item:

    <item
        android:id="@+id/menu_search"
        android:title="@string/search_action"
        android:icon="@android:drawable/ic_menu_search"
        android:actionViewClass="android.widget.SearchView"
        android:showAsAction="always" />
    

    but when I run it I get:

    09-30 17:13:26.974: ERROR/AndroidRuntime(4085): Caused by: android.view.InflateException: java.lang.ClassNotFoundException: android.widget.SearchView 09-30 17:13:26.974: ERROR/AndroidRuntime(4085): at android.support.v4.view.MenuInflater$ActionBarMenuState.setItem(MenuInflater.java:410) 09-30 17:13:26.974: ERROR/AndroidRuntime(4085): at android.support.v4.view.MenuInflater$ActionBarMenuState.addItem(MenuInflater.java:419) 09-30 17:13:26.974: ERROR/AndroidRuntime(4085): at android.support.v4.view.MenuInflater.parseMenu(MenuInflater.java:177) 09-30 17:13:26.974: ERROR/AndroidRuntime(4085): at android.support.v4.view.MenuInflater.inflate(MenuInflater.java:103)

    I couldn't find a compatible version of SearchView.

    Feature Request 
    opened by eburnette 33
  • Heap size increases on every screen orientation change

    Heap size increases on every screen orientation change

    I use ActionBarSherlock (4.0.0, from yesterday 4.0.1) in a project that is being developed and debugged on the phone with Android 2.2. Today I opened DDMS tab in Eclipse, turned on the Update Heap option and noticed that at every turn of the screen heap size and the number of objects in memory increases.

    Then I temporarily removed ABS from the project - a memory leak problem disappeared.

    Next, I tried to compile one of the ABS demo projects named "styled" and run it on the same phone with Android 2.2. With each new turn of the screen, I saw again in the DDMS increase in the number of objects and the heap size.

    Maybe I'm wrong, but maybe it's a memory leak in the ABS?

    Bug Report 
    opened by westward 32
  • Actionbar changes are not properly handled if activity has android:configChanges=

    Actionbar changes are not properly handled if activity has android:configChanges="orientation"

    I have one activity that has

    android:configChanges="orientation"
    

    and in the menu has

    android:showAsAction="ifRoom|withText"
    

    The expected behaviour is that when the screen is in portrait i see just the icon and when it is in landscape i see also the text at the right of the action bar icon. It works on 4.0.3 but Android 2.3.7 when i rotate the screen it doesn't update the action bar icon.

    Bug Report 
    opened by rciovati 26
  • New DrawerLayout use MenuItem from v4 to make toggle using App icon

    New DrawerLayout use MenuItem from v4 to make toggle using App icon

    With the new DrawerLayout if you want to toggle the slide menu using the app icon you have to use the onOptionsItemSelect that only accept MenuItem from android :(

    opened by ethervoid 25
  • No ActionBar implementation found when testing using Robolectric

    No ActionBar implementation found when testing using Robolectric

    When ActionBarSherlock looks for an implementation, it bases the decision on the Build.VERSION.SDK_INT constant. When running tests using Robolectric, this constant is set to zero, which means no implementation will be found and an exception is thrown:

    java.lang.IllegalStateException: No implementations match configuration.
    

    It'd be great if ABS could detect that SDK_INT is zero and still return an implementation. It probably wouldn't be functional, but it would at least provide something that Robolectric could mock over.

    What do you think ABS' behavior should be in this situation? I can whip up a pull request if I know it'll get merged.

    Thanks for your work on ABS!

    Feature Request 
    opened by scompt 24
  • FragmentActivity - options menu not respecting Fragment lifecycle

    FragmentActivity - options menu not respecting Fragment lifecycle

    When using the support lib plugin FragmentActivity with a Fragment based ViewPager, I get weird behavior when the fragments provide their options menu to the hosting Activity's action bar:

    • The initial menu actions for the 1st fragment loaded into the ViewPager work fine.
    • As soon as a 2nd fragment is paged into the UI, the menu actions become unresponsive.
    • As soon as a 3rd fragment is paged into the UI, the actions that I tried to press for fragment #2 will fire, and so on.
    • Orientation change yields similar results to fragment paging.
    • There is a subtle visible artifact when a 2nd fragment is loaded, as if the new action items are being drawn over previous ones.

    I am using a standard FragmentPagerAdapter pattern in my code. I have created a simple example project demonstrating this issue from the Google SupportDemos sample. It works flawlessly on my Galaxy Nexus with the native action bar, on anything else I get have the issues described above. I am using the ABS 4 RC1 library & support lib.

    http://dl.dropbox.com/u/3982805/SherlockFragmentActivityMenuDemo.zip

    Bug Report 
    opened by jgilfelt 24
  • ViewPager Action Bar Items not showing

    ViewPager Action Bar Items not showing

    The ViewPager is set up like this: http://developer.android.com/reference/android/support/v4/view/ViewPager.html

    I have 4 Fragments under the ViewPager and each Fragment may have difference menu item which setShowAsAction is set to SHOW_AS_ACTION_ALWAYS

    setHasOptionMenu(true) has put in onCreate method in the Fragment.

    The Action Items are working fine when the activity first created. But if I flip the fragment quickly, at some point all Action Items will be disappeared. The Action Items can only be restored if you change the orientation of the phone.

    Framework Bug 
    opened by ericklee 23
  • Tiny issue - naming convention not applied on some resources

    Tiny issue - naming convention not applied on some resources

    There are 2 files in the "res/layout" folder (and "layout-v14" folder) that do not have the "abs__" prefix (while all other resources do have this prefix), which makes some confusion as it does belong to the library:

    -sherlock_spinner_dropdown_item.xml -sherlock_spinner_item.xml

    Please consider renaming those files. maybe there are other files/resources too that I didn't notice.

    opened by AndroidDeveloperLB 22
  • Update support library to rev 11

    Update support library to rev 11

    An upgrade to the latest support lib would be really great, as it now supports fragmentception (fragments inside fragments) which is a really useful feature...

    opened by hameno 21
  • Tab size issue with Android 7.0

    Tab size issue with Android 7.0

    We are still using the ActionBarSherlock (and currently cannot change to anything else due to customer restrictions) but with the recent release of Android 7.0, we are seeing issues on 'certain' Samsung devices like the Note 5 and the Galaxy 7 Edge. The tab strip is being reduced in size and I have not found any way to increase the size back to normal. Other devices like Nexus 5x (also on Android 7.0) does not see this issue. And we haven't had this issue with previous versions of Android.

    I haven't been able to find search results that might help me do a work around for this (either by resetting the tab strip to the correct height, or being able to determine when this condition might exist so maybe I could reduce the size of the images if needed). I'm looking for any help I can get on this since our client is making this an urgent issue. The first image I'm attaching is the way it's being displayed on these certain devices, and the second image is how it should be looking. bad tab buttons good tab buttons

    opened by JMHaro 2
  • ActionBar Height is double in landscape on GT-S5360 2.3.6

    ActionBar Height is double in landscape on GT-S5360 2.3.6

    Steps:

    • use setRequestedOrientation()
    • rotate the screen from portrait to landscape

    Observed :

    • action bar height is double as when in portraite.

    issue actionbar double height

    expected:

    • action bar height remain the same.

    Workaround tested:

    • I try to follow http://stackoverflow.com/a/10890402/752174 to force the height, but I observed the same behavior.

    Config:

    • ActionBarSherlock manifest: android:versionCode="100" android:versionName="4.2.0"
    • ActionBarSherlock pom : com.actionbarsherlock4.3.1
    • The issuereproduce on device GT-S5360 2.3.6
    • the issue don't reproduce on any otyher device I got, including GT-S583i 2.3.6 or terminal with 4.x
    • My app got one activity and various fragment. (the Navigation change the current fragment)

    Manifest:

    - I do NOT use "android:configChanges=" in the manifest
    
    <application
        android:theme="@style/Theme.Sherlock.Light" >
    
        <activity
            android:name=".MainActivity" 
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    

    Code:

        public class MainActivity extends SherlockFragmentActivity {
    
            /**called by the onResume of the fragment.*/
            public void onCurrentFragmentChange(BaseDelegate currentFrag){
                // depending the fragment/terminal, the activity may rotate or not.
                setRequestedOrientation(currentFrag.getRequestedScreenOrientation());
    
                actionbar_loadNavigationList(currentFrag); // call _mActionBar.setListNavigationCallbacks(null or adapter)
                updateActionBar(currentFrag, currentFrag.isOrientationLandscape()); // call _mActionBar.setNavigationMode(list for portrait, none for landscape); invalidateOptionsMenu() and _mActionBar.setTitle()
            }
    
    opened by Loda 0
  • Black area is showing at left side in Action Bar Sherlock

    Black area is showing at left side in Action Bar Sherlock

    Hello I am using Sherlock library to achieve the ActionBar Tabs. Here I am setting custom title and want to hide the icon at the title bar but some issue that ActionBar tabs now appearing at above of ActionBar.

    I see this issue here https://github.com/JakeWharton/ActionBarSherlock/issues/327#ref-issue-7764467

    so I am trying to solve this issue using that working but that is creating other issue.

    @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tariff_plans_layout);

    ActionBar actionBar = getSupportActionBar();
    
    if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.HONEYCOMB) {
        actionBar.setLogo(new ColorDrawable(Color.TRANSPARENT)); 
    
        View homeIcon = findViewById(
                Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ? 
                android.R.id.home : R.id.abs__home);
        ((View) homeIcon.getParent()).setVisibility(View.GONE);
        ((View) homeIcon).setVisibility(View.GONE);
    }
    
    actionBar.setDisplayShowHomeEnabled(false);
    actionBar.setDisplayShowTitleEnabled(false);
    
    View actionbar = LayoutInflater.from(this).inflate(R.layout.custom_title_bar, null);
    getSupportActionBar().setCustomView(actionbar);
    actionBar.setDisplayShowCustomEnabled(true);
    

    } but here now ActionBar title is looking like below, see there is left black area so I am looking to remove this with my color so my question Is there any way to remove that black area ?

    custom_title_bar.xml

    Below Android 3.0, I am having that issue but that is working perfectly above Android OS 3.0.

    sn3pz

    opened by williams-sgvu 1
Releases(4.4.0)
  • 4.4.0(Aug 14, 2013)

    • Add Gradle support.
    • Fix: Use 'sw' and 'w' qualifiers on ICS+ only to prevent OEM resource bugs.
    • Fix: Improve handling of popup windows to prevent leaks.
    • Fix: Support turning off textAllCaps style attribute on action items.
    • Fix: Potential logging NullPointerException when a MenuItem title was omitted.
    Source code(tar.gz)
    Source code(zip)
  • 4.3.1(Aug 14, 2013)

    • Fix: Importing library into Eclipse as a Maven module now works correctly.
    • Prevent dispatching touch events to both action bar and content view on API 11 and up.
    • Add Hebrew and Brazillian translations to i18n module.
    Source code(tar.gz)
    Source code(zip)
  • 4.3.0(Aug 14, 2013)

    • New: FEST module for testing ActionBarSherlock classes.
    • New: i18n module for including internationalized strings used by actionbar.
    • Removed dialog themes.
    • Fix: SearchView suggestions now work properly.
    • Fix: Prevent rare NPE when restoring state on pre-Honeycomb devices.
    • Fix: Correct behavior of IcsColorDrawable's setAlpha method.
    • Fix: Handle cases where Locale.ROOT is not present on pre-Honeycomb.
    • Fix: Correct tab measurement edge-case on pre-Honeycomb.
    • Use custom Toast layout to ensure consistent look and feel.
    • Fix: Prevent monkey runners from uselessly crashing.
    • Fix: Do not hold on to old menu items after a call to invalidateOptionsMenu.
    • Fix: Ensure ShareActionProvider works when only one intent is available.
    • Fix: Scroll list navigation to the selected item when opened.
    Source code(tar.gz)
    Source code(zip)
  • 4.2.0(Aug 14, 2013)

    Maven artifactId is now 'actionbarsherlock'.

    Note: The .Dialog themes are now deprecated. These will be removed in a future version of the library.

    • Add SearchView widget for standard search interaction (API 8+ only)
    • Fix: ShareActionProvider in the split action bar no longer fills the entire screen.
    • Fix: ShareActionProvider now does file I/O on a background thread.
    • Fix: Automatically correct ColorDrawable not respecting bounds when used as a stacked background.
    • Fix: Ensure fragments collection is present before dispatching events.
    • Fix: XML-defined onClick searches the correct context for the declared method.
    • Fix: Ensure action mode start/finish callbacks are invoked on the activity for the native action bar.
    • Fix: Allow tab callbacks to have a fragment transaction instance for any FragmentActivity.
    • Fix: Ensure CollapsibleActionView callbacks are dispatched in both native and compatbility action bars.
    • Fix: Remove .ForceOverflow themes. These never should have been included.
    Source code(tar.gz)
    Source code(zip)
  • 4.1.0(Aug 14, 2013)

    • Fix: Altered technique used for menu event dispatching through the fragment manager for greater control.
    • Fix: Do not dispatch menu creation event if the activity has been destroyed.
    • Fix: Correct potential NullPointerException when expanding an action item.
    • Fix: Correct potential NullPointerException when the hardware menu key was pressed in an activity that is forcing the overflow menu.
    • Fix: Do not set a listener on the native action bar tab wrapper unless a compatibility listener has been set.
    • Fix: Ensure the compatibility animation framework is always available on views even if they were previously detached from the view hierarchy.
    Source code(tar.gz)
    Source code(zip)
  • 4.0.2(Aug 14, 2013)

    • Upgrade to r7 support library.
    • Fix: Do not trigger menu creation after onCreate if activity is finishing.
    • Fix: Prevent overflow from displaying if there are no overflow action items.
    • Fix: Long-pressing menu key no longer triggers overflow.
    • Fix: Use proper tab state-list drawable to mimic ICS.
    • Fix: Ensure dispatching menu creation and preparation to fragments can properly return false when appropriate to avoid rendering artifacts.
    • Fix: Properly save and fetch action mode tag on ICS.
    • Fix: Add missing density-specific resources for certain asssets and remove unused assets.
    Source code(tar.gz)
    Source code(zip)
  • 4.0.1(Aug 14, 2013)

    • Add ShareActionProvider widget for use as action items.
    • Re-add 'Styled' sample to provide a more comprehensive theming example.
    • Fix: Do not dispatch options item selection to fragments if the activity handles the callback.
    • Fix: Prevent menu key from opening the overflow menu when an action mode is currently displayed.
    • Fix: Ensure fragment transaction instance is not null on initial tab selection callback.
    • Fix: Displaying an action mode while using stacked tab navigation no longer throws an exception.
    • Fix: Using expandable action item callbacks no longer results in a possible exception on older devices.
    Source code(tar.gz)
    Source code(zip)
  • 4.0.0(Aug 14, 2013)

    Complete rewrite of the library to backport the Android 4.0 action bar.

    • The minimum supported version of Android is now 2.1 (API 7).
    • New base activities are provided (e.g., SherlockActivity and SherlockFragmentActivity) which extend from the native activities.
    • The support library sources are no longer included in the library. You must include android-support-v4.jar in your project separately.
    • Theming now mirrors that of the native action bar through the use of multiple styles rather than through ab- and am-prefixed attributes in the theme.
    • The action bar can be statically attached to an activity view without the requirement of using one of the provided base activities.
    Source code(tar.gz)
    Source code(zip)
  • 3.5.1(Aug 14, 2013)

    • Fix: NullPointerException in FragmentManager can no longer occur when an attempt is being made to save to a Bundle that has not yet been created.
    • Fix: Pre-3.0 action item submenu dialogs now properly dismiss themselves when an item of theirs is selected.
    Source code(tar.gz)
    Source code(zip)
  • 3.5.0(Aug 14, 2013)

    • Library now uses the r6 version of the compatibility library for its base. Ice Cream Sandwich-specific implementations are currently disabled, however, but will be added in a future version of the library.

    MenuCompat, MenuItemCompat, and ActivityCompat have be added back in to ease transition to this library but all their methods and the classes themselves have been deprecated.

    • Rewritten menu and action item support from Ice Cream Sandwich.
    • Removed the need for the custom Window.FEATURE_ACTION_ITEM_TEXT flag. You should now use the showAsAction attribute and/or the setShowAsAction(int) method on each MenuItem to control whether or not text is shown
    • Action item dividers are now added automatically only when necessary to distinguish possible confusion between action items.
    • Fix: Action views now properly size themselves within the bounded space of the menu.
    • Fix: List navigation no longer becomes unusable on certain device configurations.
    • Fix: SubMenu's findItem(int) method now properly returns the support version of MenuItem.
    • Fix: Invisible sub-menu items are no longer shown on the pre-3.0 popup list.
    Source code(tar.gz)
    Source code(zip)
  • 3.4.2(Aug 14, 2013)

  • 3.4.1(Aug 14, 2013)

    • The makeFragmentName method in FragmentPagerAdapter has been changed to public scope to allow for easier access to your fragments that it is managing.
    • Action bar will now animate when calling show() or hide().
    • SherlockPreferenceActivity now provides full fragment and loader support.
    • Examples for the plugins are now in their own sample application.
    • Fix: Home icon no longer erroneously clipped when it exceeds the size of the action bar.
    • Fix: Tabs will now scroll horizontally to mimic the native action bar behavior.
    • Fix: Plugins now properly DO NOT inline their R.java integer constants.
    • Fix: Tabs below the action bar are now styled with a default background so that they do not incorrectly inherit an applied background unless explicity declared.
    Source code(tar.gz)
    Source code(zip)
  • 3.4.0(Aug 14, 2013)

    • Library now uses the r4 version of the compatibility library for its base. Ice Cream Sandwich-specific implementations are currently disabled, however, but will be added in a future version of the library.
    • Context menu callbacks now use the support version of MenuItem to maintain consistency.
    • Added preference plugin which provides an action bar enhanced preference screen.
    • Fix: abHomeLayout theme attribute is now honored.
    • Fix: onPrepareOptionsMenu is now properly dispatched upon menu invalidation.
    Source code(tar.gz)
    Source code(zip)
  • 3.3.1(Aug 14, 2013)

    ADT 14 is now required. Maven 3 is required if building from the command line.

    • XML-defined onClick attributes will now check for an onClick method that takes an android.support.v4.view.MenuItem instance.
    • Tabs on medium screens in landscape now display inline rather than below the action bar to mirror how Android 4.0 behaves with the same configuration.
    • Fix: Menu inflater properly checks activity context for onClick method declared in the XML.
    • Fix: Dialog fragment properly saves its showDialog state when not being used as a popup.
    • Fix: Return -1 when in tab navigation but no tab is selected. This brings the library in line with the post-3.0 behavior.
    • Fix: Removing a menu group no longer throws an IndexOutOfBoundsException.
    • Fix: getSelectedTab and getTabAt no longer throw NullPointerExceptions on post-3.0 when no tab was selected or no tab existed at the specified position, respectively.
    • Fix: findFragmentById now properly returns fragments attached to android.R.id.content when run on pre-3.0 devices.
    Source code(tar.gz)
    Source code(zip)
  • 3.3.0(Aug 14, 2013)

    • Tabs are now displayed below the action bar on all medium-screen devices and portrait large-screen devices.
    • Fix: Dialog fragments no longer throw an IllegalStateException when being used as a regular fragment (i.e., not as a popup). See StackOverflow for more information.
    • Fix: Popping a fragment off of the back stack now properly assigns its parent activity.
    • Fix: An activity result no longer causes a NullPointerException when the target fragment no longer exists.
    • Fix: Action item dividers are now properly initially hidden when their associated action items are as well.
    Source code(tar.gz)
    Source code(zip)
  • 3.2.3(Aug 14, 2013)

    • Fix: Fragments in a ViewPager that contributed items to the options menu were caught in a race condition causing inconsistent results when a new page was selected. This regression was introduced in version 3.2.2.
    Source code(tar.gz)
    Source code(zip)
  • 3.2.2(Aug 14, 2013)

    • Fix: Side-effects related to using FragmentMapActivity due to how it was referencing resources from the main library.
    • Fix: Fragments adjacent to the currently selected fragment in a ViewPager no longer receive context menu events.
    • Fix: Eliminate exception when inflating context menus on 3.0+ when using getMenuInflater().
    • Fix: ViewPager now determines whether or not an activity menu invalidation is required independently of whether or not fragments were created or destroyed. This should fix an edge case where an activity with a ViewPager containing only two fragments would not get its menu properly invalidated.
    Source code(tar.gz)
    Source code(zip)
  • 3.2.1(Aug 14, 2013)

    • Fix: Action mode API incorrectly using the native Menu and MenuItem classes causing an easy pitfall for ClassCastExceptions.
    • Fix: Large action bar backgrounds increasing the size beyond that alloted in the theme.
    Source code(tar.gz)
    Source code(zip)
  • 3.2.0(Aug 14, 2013)

    • Added support for MapView and the Google APIs through the use of FragmentMapActivity. If you are using a map within a fragment you must ensure it is always attached to an activity which extends from this new base class.

    Since supporting maps requires compiling against the Google APIs, this functionality is implemented in the form of a plugin which is to be used alongside the normal library. You can choose to add it as an additional library project or by including it as a .jar. Maven users may simply include the additional dependency (artifactId: plugin-maps).

    • Fix: Fragments adjacent to the currently selected fragment in a ViewPager no longer contribute to the activity menu.
    • ActionBar.Tab has been changed from an interface to an abstract class to mirror its native counterpart.
    Source code(tar.gz)
    Source code(zip)
  • 3.1.3(Aug 14, 2013)

    • Renamed all resources to be prefixed with abs__ to avoid conflicts when including in your project.
    • Fix: Action bar background being set on two views causing artifacts to remain on screen when the action bar was hidden.
    • Fix: Incorrect sub-menu item being selected by default when the sub-menu was triggered from the native options menu on pre-3.0.
    • Fix: MenuItem.setVisible now properly updates the associated action item and native menu item visible state.
    • Fix: Adding items to a menu now honors its ordering and category.
    • Fix: Fragment options item selected callback now uses the proper version of MenuItem.
    Source code(tar.gz)
    Source code(zip)
  • 3.1.2(Aug 14, 2013)

    • Fix: MenuItem.getMenuInfo() was throwing runtime exception. Will now just return null.
    • Fix: Dragging over a WebView contained in a ViewPager would not register.
    • Fix: Inflation of context menu incorrectly being handled by the custom menu inflater for the library.
    Source code(tar.gz)
    Source code(zip)
  • 3.1.1(Aug 14, 2013)

    • Fix: MenuItem.getSubMenu now returns a support instance rather than a native instance.
    • Fix: Fragment methods onAttach and onInflate incorrectly regressed to use Activity instead of a FragmentActivity in their method signatures.
    • Fix: Retained fragments not being re-attached on pre-3.0 when attached to android.R.id.content upon activity recreation.
    • Fix: onPrepareOptionsMenu not dispatched to fragments. This still will only occur if the activity method returns true (which is the default).
    • Fix: Menu.findItem not returning null when the item was not found on Android 3.0+.
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Aug 14, 2013)

    Due to shortcomings in the Android theming system, a small change must be made in how this library handles themes. If you were using a custom style for actionBarStyle you must now specify its attributes in the root of the theme and prefix them with 'ab'.

    You can see an example of this in the SherlockCustom theme in samples/demos/res/values/styles.xml.

    • Library now uses the r3 version of the compatibility library for its base.
    • actionBarStyle is no longer a valid theme attribute (see note above).
    • Added the demo project included with the new compatibility library under samples/demos/ and merged in the old 'featuredemo'.
    • Dividers are now shown on pre-3.0 devices between all action items.
    • Window.FEATURE_ACTION_BAR_OVERLAY is now honored on pre-3.0 devices.
    • Inflation of XML menu resources will now honor android:actionLayout and android:actionViewClass attributes.
    • Buttons for displaying the determinate and indeterminate progress bars have been added to the feature toggle demo.
    • Added support for indeterminate progress bar. Due to the final modifier on the native type, you must use setIndeterminateProgressBarVisibility(Boolean) and pass Boolean.TRUE or Boolean.FALSE.
    • Fix: MenuBuilder#removeItem(int) and MenuBuilder#findItem(int) throwing IndexOutOfBoundsExceptions when the item was not found.
    • Fix: Theme attributes for home item data (e.g., icon, logo) will not be overwritten by the special MenuItem instance for home.
    • Fix: Native strings can now be specified for an XML menu <item> in android:title and android:titleCondensed.
    • Window.FEATURE_ENABLE_ACTION_BAR_WATSON_TEXT is now Window.FEATURE_ACTION_BAR_ITEM_TEXT.
    • Widget.Sherlock.Spinner.DropDown.ActionBar and Widget.Sherlock.Light.Spinner.DropDown.ActionBar styles are now Widget.Sherlock.Spinner and Widget.Sherlock.Light.Spinner, respectively.
    • Widget.Sherlock.ActionBarView_TabXXX styles are now Widget.Sherlock.ActionBar.TabXXX.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.3(Aug 14, 2013)

    This version is a hotfix for incompatibilities introduced with the SDKs for 3.1 r2 and 3.2 r1. Due to unavoidable changes in the underlying SDK, the library must now be compiled against API level 13.

    • actionModeStyle and actionModePopupWindowStyle are no longer valid theme attributes.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.2(Aug 14, 2013)

    • Sub-menus for action items are now shown in a list dialog.
    • Moved certain classes to the com.actionbarsherlock.internal package which were not meant for public consumption. Despite being given public scope in this new package, these classes should NOT be used under any circumstances as their API can be considered highly volatile and is subject to change often and without warning.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Aug 14, 2013)

    • Fix: onOptionsItemSelected() not being called in fragments if the activity version returns false.
    • Fix: onCreateOptionsMenu() not being called in fragments on Android 3.0+.
    • New: Enable action item text display on pre-Android 3.0 by calling requestWindowFeature with Window.FEATURE_ENABLE_ACTION_BAR_WATSON_TEXT.
    • Fix: setCustomView() no longer automatically enables the custom view on pre-3.0. You must call setDisplayShowCustomEnabled() in order to display the view.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Aug 14, 2013)

    The API has been rewritten to mimic that of the native action bar. As a result, usage now only requires changing a few imports to use the support versions of classes and calling getSupportActionBar(). See the README for more info.

    The rewrite necessitated tight interaction with the compatibility library to the point where its sources are now included. You are no longer required to have the standalone .jar file.

    Also included is a default custom action bar for use by default on pre-3.0 devices. This custom implementation is based off of Johan Nilsson's Android-ActionBar and the work that I have done on it.

    More details are available at http://actionbarsherlock.com

    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Aug 14, 2013)

    No changes to library code.

    • Moved library to the root of the repository.
    • Added samples/dependencies.py script to automatically download the needed dependencies for the sample projects.
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Aug 14, 2013)

    WARNING: The Android Compatibility Library (v4) is now required.

    • Added ActionBarSherlock.Activity, ActionBarSherlock.FragmentActivity, and ActionBarSherlock.ListActivity for extension by implementing activities, the latter of which is deprecated. This affords a much tighter integration and allows for the use of other new features listed below.
    • New API method: layout(Fragment) will use the fragment argument as the content to the activity.
    • New API method: menu(int) allows for the inflation of menu XMLs from a resource. For the non-native implementation, the XML can be inflated to a custom Menu which can then be applied appropriately to the third-party action bar. Sub-menus are also supported. Third-party action bar handlers should implement ActionBarSherlock.HasMenu for this functionality. This feature requires that activities extend from one of the provided activity base classes.
    • New API method: homeAsUp(boolean). This mimics the native method setDisplayHomeAsUpEnalbed on the native action bar. Third-party action bar handlers should implement ActionBarSherlock.HasHomeAsUp for this functionality.
    • New API method: useLogo(boolean) will trigger the action bar to hide the application icon/home button and title and show a larger logo representing the application. Third-party action bar handlers should implement ActionBarSherlock.HasLogo for this functionality.
    • New API method: listNavigation(SpinnerAdapter, OnNavigationListener). Tells the action bar to use drop-down style navigation with the specified list of items and callback listener. Third-party action bar handlers should implement ActionBarSherlock.HasListNavigation for this functionality.
    • Javadocs are now available at jakewharton.github.com/ActionBarSherlock.
    • A standalone JAR is now available via the GitHub downloads page or in my personal maven repository as com.jakewharton:android-actionbarsherlock:2.1.0.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Aug 14, 2013)

Android library implementing a fading effect for the action bar, similar to the one found in the Play Music app

FadingActionBar FadingActionBar is a library which implements the cool fading action bar effect that can be seen in the new Play Music app. This libra

Manuel Peinado Gallego 2.9k Nov 21, 2022
Android - a library that adds a glass-like effect to the action bar.

GlassActionBar GlassActionBar is an Android library which implements a glass-like effect for the action bar. The three most commonly used action bar i

Manuel Peinado Gallego 1.2k Nov 20, 2022
Socially is a textView which is able to create separate clickable views according to your requirements.

Socially is a textView which is able to create separate clickable views according to your requirements.

Enes Zor 30 Oct 25, 2022
Android Application with Kotlin to easily see who's present and absent

Android Application with Kotlin to easily see who's present and absent The appli

Lucas Aries 1 Jan 3, 2022
An Android Library to help you create actionbar tabs like "Capitaine train" app by Cyril Mottier

TabBarView An Android Library to help you create actionbar tabs like "Capitaine train" app by Cyril Mottier Implementation: Declare TabBarView and set

Mirko Dimartino 510 Nov 15, 2022
PasswordStrengthView - an android library to represent password strength.

PasswordStrengthView - an android library to represent password strength.

null 33 Jan 3, 2022
A flexible theme provider for Jetpack Compose. Supports dynamic theme changes and saving theme preference.

JetTheme JetTheme is a flexible theme provider for Jetpack Compose. Change the theme and recompose the UI dynamically. Save theme preference to local

Mao Yufeng 48 Oct 19, 2022
Showcase of the new AppCompat 21, which includes new Material Theme, working in pre-21 devices.

MaterialEverywhere (deprecated) This example is deprecated, I recommend taking a look at MaterializeYourApp repository. Showcase of the new AppCompat

Antonio Leiva 1.3k Dec 17, 2022
Android Application that plays music through a Spotify API based on a user's current location found through Google Maps API and also checking Google Weather API.

GeoStereo Android Application that plays music through a Spotify API based on a user's current location found through Google Maps API and also checkin

Jonah Douglas 1 Jun 16, 2022
Android Utilities Library build in kotlin Provide user 100 of pre defined method to create advanced native android app.

Android Utilities Library build in kotlin Provide user 100 of pre defined method to create advanced native android app.

Shahid Iqbal 4 Nov 29, 2022
Custom view to expand long text with view more,less action , you can customize min lines , action color

ExpandableTextView Custom expadable text view Examples : <mostafa.projects.expandabletextview.ExpandableTextView android:layout_wi

Mostafa Gad 8 Jan 25, 2022
Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices.

PreLollipopTransition Simple tool which help you to implement activity and fragment transition for pre-Lollipop devices. Download In your app build.gr

Takahiro Menju 1.3k Nov 28, 2022
[] Easily create a simple, attractive and seamless custom action bar style for your Android application

Android Action Bar Style Generator ####DEPRECATED: Consider using Toolbar or its support library equivalent.#### The Android Action Bar Style Generato

Jeff Gilfelt 1k Nov 10, 2022
An example of how to extend the ActionBar under the status bar from the theme

Extended ActionBar The problem: Android 4.4 Kitkat introduced a wonderful new opportunity: translucent bars. It's as simple as adding the following to

Eugenio Marletti 160 Nov 11, 2022
Android MVVM with Single Activity sample app that uses kotlin coroutines flow

Android MVVM with Single Activity sample app that uses kotlin coroutines flow. This is a sample app that uses kotlin coroutines flow , stateflow. This

null 4 Jul 15, 2022
Android - An action bar item which acts both as a refresh button and as a progress indicator

RefreshActionItem An action bar item that implements this common pattern: Initially it shows a refresh button. If the button is clicked, a background

Manuel Peinado Gallego 655 Nov 10, 2022
[Deprecated] This project can make it easy to theme and custom Android's dialog. Also provides Holo and Material themes for old devices.

Deprecated Please use android.support.v7.app.AlertDialog of support-v7. AlertDialogPro Why AlertDialogPro? Theming Android's AlertDialog is not an eas

Feng Dai 468 Nov 10, 2022
API-Annotate - Single annotation to mark API elements

API-Annotate A single annotation for annotating externally-consumed elements in

null 0 Feb 5, 2022
Automated-build-android-app-with-github-action - CI/CD Automated Build Android App Bundle / APK / Signed With Github Action

Automated Build Android With Using Github Action Project Github Action Script Us

Faisal Amir 34 Dec 19, 2022