{"id":21130053,"url":"https://github.com/ArabAgile/android-typeahead","last_synced_at":"2025-07-09T01:32:10.081Z","repository":{"id":32904237,"uuid":"36499032","full_name":"ArabAgile/android-typeahead","owner":"ArabAgile","description":"Awesome Android Typeahead library - User mention plugin, UI widget for auto complete user mention using the at sign (@) like Twitter or Facebook.","archived":false,"fork":false,"pushed_at":"2015-05-29T11:33:32.000Z","size":160,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-15T23:11:46.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ArabAgile.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":"2015-05-29T10:59:51.000Z","updated_at":"2023-10-28T02:57:58.000Z","dependencies_parsed_at":"2022-07-22T04:32:07.096Z","dependency_job_id":null,"html_url":"https://github.com/ArabAgile/android-typeahead","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArabAgile%2Fandroid-typeahead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArabAgile%2Fandroid-typeahead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArabAgile%2Fandroid-typeahead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArabAgile%2Fandroid-typeahead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArabAgile","download_url":"https://codeload.github.com/ArabAgile/android-typeahead/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476376,"owners_count":17480215,"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-20T05:32:13.794Z","updated_at":"2024-11-20T05:32:18.159Z","avatar_url":"https://github.com/ArabAgile.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# android-typeahead\nAwesome Android Typeahead library - User mention plugin, UI widget for auto complete user mention using the at sign (@) like Twitter or Facebook.\n\n### Version\n1.0.1\n\n### Installation\nAwesome Android Typeahead library requires android 4.0.3 (API 15) or above.\n\n#### Using Gradle\n- Create 'libraries' directory (if not already exists) in the root of your project at the same level of 'app' directory.\n- Extract the 'typeahead.zip' file and move the extracted directory to 'libraries' directory.\nFinal structure should be as:\n  - /app\n    - build.gradle\n  - /libraries\n    - typeahead/\n    - build.gradle\n  - /settings.gradle\n\n- Edit /settings.gradle ; add the following:\n```groovy\ninclude ':typeahead'\nproject(':typeahead').projectDir = new File('libraries/typeahead')\n```\n- Edit /app/build.gradle file ; add the following to dependencies section:\n```groovy\ncompile project(':typeahead')\n```\n- Sync project\n- Rebuild project, or run:\n```sh\n./gradlew assembleDebug\n```\n\nFor loading remote photos, I'm using [Picasso] library.\n\n## Usage\nIn your layout, add Add TypeaheadTextView:\n```xml\n\u003ccom.arabagile.typeahead.widget.TypeaheadTextView\n    android:id=\"@+id/typeaheadAutoComplete\"\n    android:hint=\"@string/hint_autocomplete\"\n    android:singleLine=\"false\"\n    android:layout_height=\"wrap_content\"\n    android:layout_width=\"match_parent\"\n    app:ag_threshold=\"2\"\n    /\u003e\n```\n\nCreate menu layout for typeahead dropdown menu with name *menu_user_mention.xml* with content:\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cLinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"horizontal\" android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\u003e\n    \u003cImageView\n        android:id=\"@+id/photo\"\n        android:layout_width=\"64dp\"\n        android:layout_height=\"64dp\"\n        android:layout_gravity=\"center_vertical\"\n        android:layout_marginRight=\"10dp\"/\u003e\n \n    \u003cLinearLayout\n        android:layout_width=\"match_parent\"\n        android:orientation=\"vertical\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\u003e\n \n        \u003cTextView\n            android:id=\"@+id/fullname\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textSize=\"15sp\"\n            android:layout_weight=\"1\"\n            /\u003e\n \n        \u003cTextView\n            android:id=\"@+id/username\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:textSize=\"12sp\"\n            android:layout_weight=\"1\"\n            /\u003e\n    \u003c/LinearLayout\u003e\n\u003c/LinearLayout\u003e\n```\n\nIn your activity, add this sample code:\n```java\nTypeaheadTextView tvAutoComplete = (TypeaheadTextView) findViewById(R.id.typeaheadAutoComplete);\n\n// Dummy dataset - From Gravatar\nList\u003cUser\u003e users = new ArrayList\u003c\u003e();\nusers.add(new User(\"Arab Agile\", \"arabagile\", \"http://www.gravatar.com/avatar/fc58e5bfbdf68ae2d7cc0b145cd27794?s=64\"));\nusers.add(new User(\"Ammar Basha\", \"elbasha\", \"http://gravatar.com/avatar/73883b3fe159213faa5c80e7b5f33ef8?s=65\"));\nusers.add(new User(\"Mary Angel\", \"mariana\", \"http://gravatar.com/avatar/38bc81642c20ff6181f3b39d91829ef8?s=64\"));\nusers.add(new User(\"Cristina\", \"cristina\", \"http://gravatar.com/avatar/55abbae35d82f050bc482aa5b457ce28?s=64\"));\nusers.add(new User(\"Bob Alexander\", \"bob\", \"http://gravatar.com/avatar/d6924c79ed9ba7fdc49c1b591a051c2f?s=64\"));\n\nMentionAdapter adapter = new MentionAdapter(this, R.layout.menu_user_mention, users);\n \ntvAutoComplete.setAdapter(adapter);\n```\nEnjoy!\n\n## Configuration\nYou can set the threshold - the number of charcaters after at sign (@) before the dropdown menu will appear. To do so you can set *ag_threshold* in xml layout to integer value.\n\n## TODO\n- Use custom image loader like UIL\n \n\n## License\n\nMIT\n\n[Picasso]:http://square.github.io/picasso/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArabAgile%2Fandroid-typeahead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FArabAgile%2Fandroid-typeahead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArabAgile%2Fandroid-typeahead/lists"}