{"id":18667883,"url":"https://github.com/danikula/aibolit","last_synced_at":"2025-04-11T23:34:13.766Z","repository":{"id":79559197,"uuid":"2668273","full_name":"danikula/aibolit","owner":"danikula","description":"Simple lightweight dependency injection implementation for android","archived":false,"fork":false,"pushed_at":"2015-05-26T08:44:23.000Z","size":4344,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T20:01:35.559Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danikula.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-10-28T22:23:53.000Z","updated_at":"2024-07-09T09:43:36.000Z","dependencies_parsed_at":"2023-02-25T00:31:34.676Z","dependency_job_id":null,"html_url":"https://github.com/danikula/aibolit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danikula%2Faibolit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danikula%2Faibolit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danikula%2Faibolit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danikula%2Faibolit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danikula","download_url":"https://codeload.github.com/danikula/aibolit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248496389,"owners_count":21113826,"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","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-11-07T08:40:26.815Z","updated_at":"2025-04-11T23:34:08.755Z","avatar_url":"https://github.com/danikula.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aibolit\nSimple lightweight dependency injection implementation for Android\n\n![Aibolit logo](https://raw.githubusercontent.com/danikula/aibolit/master/logo.png)\n\n## Scope\n1. Injecting view by id\n2. Injecting application resource: array adapter, drawable, string, animation, boolean, integer, dimension, array, color\n3. Inflating layout\n4. Injecting system services\n5. Injecting custom application services\n\n## Usage\nJust add link to repository and dependency:\n```\nrepositories {\n    maven { url 'https://dl.bintray.com/alexeydanilov/maven' }\n}\ndependencies {\n    compile 'com.danikula:aibolit:1.0'\n}\n```\n\n## Example\n``` java\npublic class AibolitChatActivity extends Activity {\n\n    // annotate fields to be injected...\n\n    @InjectView(R.id.messageEditText)\n    private EditText messageEditText;\n\n    @InjectView(R.id.historyListView)\n    private ListView historyListView;\n\n    @InjectResource(R.string.symbols_count)\n    private String symbolsCountPattern;\n\n    @InjectSystemService(Context.NOTIFICATION_SERVICE)\n    private NotificationManager notificationManager;\n\n    @InjectService\n    private HttpManager httpManager;\n\n    @InjectResource(R.layout.content)\n    private View content;\n\n    ...\n\n    @Override\n    public void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n\n        setContentView(R.layout.chat_activity);\n        // initialize annotated fields and methods\n        Aibolit.doInjections(this);\n\n        // or just Aibolit.setInjectedContentView(this);\n\n        ...\n    }\n\n    // annotate event handlers...\n\n    @InjectOnClickListener(R.id.sendButton)\n    private void onSendButtonClick(View v) {\n        // handle onClick event\n    }\n\n    @InjectOnClickListener(R.id.clearHistoryButton)\n    private void onClearHistoryButtonClick(View v) {\n        // handle onClick event\n    }\n\n    @InjectOnTextChangedListener(R.id.messageEditText)\n    public void onMessageTextChanged(CharSequence s, int start, int before, int count) {\n        // handle text changed event\n    }\n\n    ...\n\n}\n```\n\nFor more details see javadoc in code.\n\n## Developed By\nAlexey Danilov - danikula@gmail.com\n\nThanks [Aliaksei Latsinnik](http://be.net/toprojectman) for logo :)\n\nIf you decide to use Aibolit in your project, please, notify me about it :) I'd love to see how widely it is being used.\n\n\n## License\n    Copyright (C) 2011-2015 Alexey Danilov\n    \n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n         http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanikula%2Faibolit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanikula%2Faibolit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanikula%2Faibolit/lists"}