{"id":29035974,"url":"https://github.com/tubitv/fragmentoperator","last_synced_at":"2025-10-06T08:08:24.980Z","repository":{"id":72519011,"uuid":"146929689","full_name":"Tubitv/FragmentOperator","owner":"Tubitv","description":"A library to make managing Android fragment backstack easier!","archived":false,"fork":false,"pushed_at":"2020-04-20T22:01:42.000Z","size":203,"stargazers_count":16,"open_issues_count":1,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-28T08:14:27.035Z","etag":null,"topics":["android","fragment","fragment-backstack"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tubitv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-31T18:35:27.000Z","updated_at":"2024-11-06T07:33:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc7d6015-7836-43ee-b7e7-8c4517348738","html_url":"https://github.com/Tubitv/FragmentOperator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tubitv/FragmentOperator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tubitv%2FFragmentOperator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tubitv%2FFragmentOperator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tubitv%2FFragmentOperator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tubitv%2FFragmentOperator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tubitv","download_url":"https://codeload.github.com/Tubitv/FragmentOperator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tubitv%2FFragmentOperator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278577929,"owners_count":26009703,"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-10-06T02:00:05.630Z","response_time":65,"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":["android","fragment","fragment-backstack"],"created_at":"2025-06-26T12:36:30.845Z","updated_at":"2025-10-06T08:08:24.660Z","avatar_url":"https://github.com/Tubitv.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FragmentOperator\n\nA library to make managing Android fragment backstack easier!\n\n## Usage\n\nAdd to your project `build.gradle` file:\n```groovy\ndependencies {\n  implementation 'com.tubitv:fragmentoperator:1.1'\n}\n```\n\n### Single Activity Backstack Usage\nYour `Activity` for `Fragment` operation has to extend from `FoActivity`.\nAll your fragments have to extend from `FoFragment`.\n\nWhen your `Activity` is ready, you need register current active `Activity`.\n```java\n  FragmentOperator.INSTANCE.setCurrentActivity(CURRENT_ACTIVITY)\n```\n\nWhen you need to show a `Fragment`, use APIs in FragmentOperator:\n```java\n  FragmentOperator.INSTANCE.showFragment\n```\n\n* `clearStack`: Flag for clearing all previous backstack\n* `skipOnPop`: Mark new fragment to be skipped when pop backstack\n* `containerId`: Res ID for where the fragment should be loaded to\n\nWhen you need to set a `Fragment` class to be single instance in backstack, just add annotation\n`SingleInstanceFragment` to your `Fragment` class.\n```java\n  @SingleInstanceFragment\n  public class CategoryFragment {}\n```\n\n### Tabs Navigation Usage (Fragment child backstack)\n\nFragmentOperator also supports another level of backstack navigation along with Activity backstack. It fully\nsupports iOS tabs style navigation, which means it keeps and maintains multiple child Fragment backstacks.\n\nSame here, to use FragmentOperator, you need make sure your `Activity` extend from `FoActivity` and `Fragment`\nextend from `FoFragment`.\n\nYou need build a Fragment to host all tabs and implement `TabsNavigator`.\n\nThen for any fragments you want to display on a specific tab, you just add annotation `TabChildFragment` and put\ntab index. When you show fragment instance with\n```java\n  FragmentOperator.INSTANCE.showFragment\n```\nFragmentOperator will automatically switch to correct tab and display Fragment instance on that tab.\n\nFragmentOperator also supports popping all the way back to root child fragment, just like iOS.\n\nPlease refer demo project for how to use tabs navigation.\n\n\n### MIT License\n\nCopyright (c) 2018 Tubi, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftubitv%2Ffragmentoperator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftubitv%2Ffragmentoperator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftubitv%2Ffragmentoperator/lists"}