{"id":13472234,"url":"https://github.com/johannilsson/android-actionbar","last_synced_at":"2025-12-17T14:15:46.717Z","repository":{"id":59935224,"uuid":"1147843","full_name":"johannilsson/android-actionbar","owner":"johannilsson","description":"DEPRECATED Android Action Bar Implementation","archived":false,"fork":false,"pushed_at":"2015-05-13T14:47:28.000Z","size":607,"stargazers_count":1303,"open_issues_count":26,"forks_count":563,"subscribers_count":147,"default_branch":"master","last_synced_at":"2025-03-26T15:42:36.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johannilsson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-07T21:27:28.000Z","updated_at":"2025-03-23T00:45:32.000Z","dependencies_parsed_at":"2022-09-25T08:43:45.410Z","dependency_job_id":null,"html_url":"https://github.com/johannilsson/android-actionbar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johannilsson/android-actionbar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johannilsson%2Fandroid-actionbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johannilsson%2Fandroid-actionbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johannilsson%2Fandroid-actionbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johannilsson%2Fandroid-actionbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johannilsson","download_url":"https://codeload.github.com/johannilsson/android-actionbar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johannilsson%2Fandroid-actionbar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27783730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:00:53.181Z","updated_at":"2025-12-17T14:15:46.686Z","avatar_url":"https://github.com/johannilsson.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# Action Bar for Android\n\n**Note** This library is deprecated, use either [v7 appcompat library](http://developer.android.com/tools/support-library/features.html#v7) or [ActionBarSherlock](http://actionbarsherlock.com/).\n\n---\n\n![ActionBar for Android](http://markupartist.com/images/actionbar.png \"ActionBar for Android\")\n\nThis projects aims to provide a reusable action bar component. The action bar pattern is well documented at [Android Patterns](http://www.androidpatterns.com/uap_pattern/action-bar).\n\nThe action bar component is an [Library Project](http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject). This means that there's no need to copy-paste resources into your own project, simply add the action bar component as a reference to any project.\n\nNeed icons to your action bar? Olof Brickarp has ported some of [Androids native icons to vector format](http://www.yay.se/2011/02/native-android-icons-in-vector-format/).\n\n## Usage\n\n### In your layout\n\n    \u003ccom.markupartist.android.widget.ActionBar\n\t    android:id=\"@+id/actionbar\"\n\t    app:title=\"@string/some_title\"\n\t    style=\"@style/ActionBar\"\n        /\u003e\n\nThe use of `app:title` is optional, it's also possible to assign the title using the `setTitle` programmatically on the `ActionBar`. To be able to use the more convenient `app:title` the application namespace must be included in the same manner as the android namespace is. Please refer to the layout other.xml in the example project for a full example. Again, note that it's the application namespace and *not* the actionbar namespace that must be referred like `xmlns:app=\"http://schemas.android.com/apk/res/you.application.package.here\"`.\n\n### In your activity\n\n    ActionBar actionBar = (ActionBar) findViewById(R.id.actionbar);\n    // You can also assign the title programmatically by passing a\n    // CharSequence or resource id.\n    //actionBar.setTitle(R.string.some_title);\n    actionBar.setHomeAction(new IntentAction(this, HomeActivity.createIntent(this), R.drawable.ic_title_home_default));\n    actionBar.addAction(new IntentAction(this, createShareIntent(), R.drawable.ic_title_share_default));\n    actionBar.addAction(new ToastAction());\n\n### Custom actions\n\nActionBar comes with a convenient IntentAction that makes it easy to create action out of Intents. To create custom actions simply implement the Action interface and build your own like the Toast example below.\n\n    private class ToastAction implements Action {\n\n        @Override\n        public int getDrawable() {\n            return R.drawable.ic_title_export_default;\n        }\n\n        @Override\n        public void performAction(View view) {\n            Toast.makeText(OtherActivity.this,\n                    \"Example action\", Toast.LENGTH_SHORT).show();\n        }\n\n    }\n\n### Handle on click on the title\n\nTo handle on clicks on the title pass a `android.view.View.OnClickListener` to the method `setOnTitleClickListener` on the action bar. The `View` that is passed in `onClick` is the `TextView` that the title is assigned to.\n\n    actionBar.setOnTitleClickListener(new OnClickListener() {\n        public void onClick(View v) {\n            // Your code here\n        }\n    });\n\n### Customization\n\nSince the ActionBar is an Libary Project all resources will be merged to the project that referencing the ActionBar. The values in the main project will always be used before the default values of the ActionBar.\n\nIf you don't like the default colors that is defined in the [colors.xml](https://github.com/johannilsson/android-actionbar/blob/master/actionbar/res/values/colors.xml) file simply override the default values in the main projects colors.xml file. To create a blue ActionBar create a colors.xml file that looks something like the one below. Note that we don't override the values for `actionbar_background_item_pressed_start` and `actionbar_background_item_pressed_end` since we decided to stick with the default values.\n\n    \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n    \u003cresources\u003e\n        \u003ccolor name=\"actionbar_separator\"\u003e#3A5FCD\u003c/color\u003e\n        \u003ccolor name=\"actionbar_background_start\"\u003e#3A5FCD\u003c/color\u003e\n        \u003ccolor name=\"actionbar_background_end\"\u003e#27408B\u003c/color\u003e\n    \u003c/resources\u003e \n\nThe same can be done with the drawables, layouts and everything else that is located in the ActionBar project.\n\n## Is it stable?\n\nYes it is, but there's no guarantees. The api however is still not stable so please check all commits since the last pull. It might also be an good idea to depend on your own fork instead of this component directly. Eventually there will be more controlled releases but until then.\n\n## Are you using this widget?\n\nWant to be featured in a gallery of apps using it? Then please send a screenshot and details of your app to Johan Nilsson.\n\n## Contributions\n\nThis widget wouldn't be the same without the excellent contributions by;\n\n* ohhorob, \u003chttps://github.com/ohhorob\u003e\n* denravonska, \u003chttps://github.com/denravonska\u003e\n* rpdillon, \u003chttps://github.com/rpdillon\u003e\n* RickardPettersson, \u003chttps://github.com/RickardPettersson\u003e\n* Jake Wharton, \u003chttps://github.com/JakeWharton\u003e\n* Jesse Vincent, \u003chttp://blog.fsck.com\u003e\n* Gyuri Grell, \u003chttp://gyurigrell.com\u003e\n\n### Want to contribute?\n\nGitHub has some great articles on [how to get started with Git and GitHub](http://help.github.com/) and how to [fork a project](http://help.github.com/forking/).\n\nContributers are recommended to fork the app on GitHub (but don't have too). Create a feature branch, push the branch to git hub, press Pull Request and write a simple explanation.\n\nOne fix per commit. If say a a commit closes the open issue 12. Just add `closes #12` in your commit message to close that issue automagically.\n\nAll code that is contributed must be compliant with [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n\n## Code Style Guidelines\n\nContributers are recommended to follow the Android [Code Style Guidelines](http://source.android.com/source/code-style.html) with exception for line length that I try to hold to 80 columns where possible.\n\nIn short that is;\n\n* Indentation: 4 spaces, no tabs.\n* Line length: 80 columns\n* Field names: Non-public, non-static fields start with m.\n* Braces: Opening braces don't go on their own line.\n* Acronyms are words: Treat acronyms as words in names, yielding XmlHttpRequest, getUrl(), etc.\n* Consistency: Look at what's around you!\n\nHave fun and remember we do this in our spare time so don't be too serious :)\n\n## License\nCopyright (c) 2010 [Johan Nilsson](http://markupartist.com)\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohannilsson%2Fandroid-actionbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohannilsson%2Fandroid-actionbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohannilsson%2Fandroid-actionbar/lists"}