{"id":13604262,"url":"https://github.com/bluelinelabs/Conductor","last_synced_at":"2025-04-11T23:32:04.049Z","repository":{"id":38848358,"uuid":"54057611","full_name":"bluelinelabs/Conductor","owner":"bluelinelabs","description":"A small, yet full-featured framework that allows building View-based Android applications","archived":false,"fork":false,"pushed_at":"2024-06-07T18:00:21.000Z","size":3764,"stargazers_count":3903,"open_issues_count":111,"forks_count":343,"subscribers_count":116,"default_branch":"develop","last_synced_at":"2025-04-09T02:14:34.193Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluelinelabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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}},"created_at":"2016-03-16T18:42:41.000Z","updated_at":"2025-04-02T22:14:47.000Z","dependencies_parsed_at":"2024-01-07T06:50:03.826Z","dependency_job_id":"b70963f1-c92a-47bf-8641-7fde7bfd214e","html_url":"https://github.com/bluelinelabs/Conductor","commit_stats":{"total_commits":418,"total_committers":44,"mean_commits":9.5,"dds":0.2296650717703349,"last_synced_commit":"56bff9a5cf93818c53fb38874834fbfcbe3e4eb9"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelinelabs%2FConductor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelinelabs%2FConductor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelinelabs%2FConductor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluelinelabs%2FConductor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluelinelabs","download_url":"https://codeload.github.com/bluelinelabs/Conductor/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248495076,"owners_count":21113565,"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-08-01T19:00:42.491Z","updated_at":"2025-04-11T23:32:04.011Z","avatar_url":"https://github.com/bluelinelabs.png","language":"Java","funding_links":[],"categories":["Java","Libs","Other"],"sub_categories":["\u003cA NAME=\"Framework\"\u003e\u003c/A\u003eFramework"],"readme":"[![GitHub Actions Workflow](https://github.com/bluelinelabs/conductor/actions/workflows/main.yml/badge.svg)](https://github.com/bluelinelabs/conductor/actions/workflows/main.yml) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Conductor-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3361) [![Javadocs](http://javadoc.io/badge/com.bluelinelabs/conductor.svg)](http://javadoc.io/doc/com.bluelinelabs/conductor)\n\n# Conductor\n\nA small, yet full-featured framework that allows building View-based Android applications. Conductor provides a light-weight wrapper around standard Android Views that does just about everything you'd want:\n\n|           |  Conductor  |\n|-----------|-------------|\n:tada: | Easy integration\n:point_up: | Single Activity apps without using Fragments\n:recycle: | Simple but powerful lifecycle management\n:train: | Navigation and backstack handling\n:twisted_rightwards_arrows: | Beautiful transitions between views\n:floppy_disk: | State persistence\n:phone: | Callbacks for onActivityResult, onRequestPermissionsResult, etc\n:european_post_office: | MVP / MVVM / MVI / VIPER / MVC ready\n\nConductor is architecture-agnostic and does not try to force any design decisions on the developer. We here at BlueLine Labs tend to use either MVP or MVVM, but it would work equally well with standard MVC or whatever else you want to throw at it.\n\n## Installation\n\nConductor 4.0 is coming soon. It is already being used in production with many, many millions of users. It is, however, not guaranteed to be API stable. As such, it is being released as a preview rather than a standard release. Preview in this context is _not_ a commentary on stability. It is considered to be up to the same quality standards as the current 3.x stable release.\nChanges in Conductor 4 are available in the [GitHub releases](https://github.com/bluelinelabs/Conductor/releases/). In preparation for the release of the next version, there are currently 3 installation options:\n\n### Latest Stable 3.x\n```gradle\ndef conductorVersion = '3.2.0'\n\nimplementation \"com.bluelinelabs:conductor:$conductorVersion\"\n\n// AndroidX Transition change handlers:\nimplementation \"com.bluelinelabs:conductor-androidx-transition:$conductorVersion\"\n\n// ViewPager PagerAdapter:\nimplementation \"com.bluelinelabs:conductor-viewpager:$conductorVersion\"\n\n// ViewPager2 Adapter:\nimplementation \"com.bluelinelabs:conductor-viewpager2:$conductorVersion\"\n```\n\n### 4.0 Preview\nUse `4.0.0-preview-4` as your version number in any of the dependencies above.\n\n### SNAPSHOT\nUse `4.0.0-SNAPSHOT` as your version number in any of the dependencies above and add the url to the snapshot repository:\n\n```gradle\nallprojects {\n  repositories {\n    maven { url \"https://oss.sonatype.org/content/repositories/snapshots/\" }\n  }\n}\n```\n\n## Components to Know\n\n|             |  Conductor Components |\n------|------------------------------\n__Controller__ | The Controller is the View wrapper that will give you all of your lifecycle management features. Think of it as a lighter-weight and more predictable Fragment alternative with an easier to manage lifecycle.\n__Router__ | A Router implements navigation and backstack handling for Controllers. Router objects are attached to Activity/containing ViewGroup pairs. Routers do not directly render or push Views to the container ViewGroup, but instead defer this responsibility to the ControllerChangeHandler specified in a given transaction.\n__ControllerChangeHandler__ | ControllerChangeHandlers are responsible for swapping the View for one Controller to the View of another. They can be useful for performing animations and transitions between Controllers. Several default ControllerChangeHandlers are included.\n__RouterTransaction__ | Transactions are used to define data about adding Controllers. RouterTransactions are used to push a Controller to a Router with specified ControllerChangeHandlers, while ChildControllerTransactions are used to add child Controllers.\n\n## Getting Started\n\n### Minimal Activity implementation\n\n```kotlin\nclass MainActivity : AppCompatActivity() {\n\n    private lateinit var router: Router\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n      super.onCreate(savedInstanceState)\n\n      setContentView(R.layout.activity_main)\n\n      val container = findViewById\u003cViewGroup\u003e(R.id.controller_container)\n\n      router = Conductor.attachRouter(this, binding.controllerContainer, savedInstanceState)\n        .setPopRootControllerMode(PopRootControllerMode.NEVER)\n        .setOnBackPressedDispatcherEnabled(true)\n\n      if (!router.hasRootController()) {\n        router.setRoot(RouterTransaction.with(HomeController()))\n      }\n    }\n}\n```\n\n### Minimal Controller implementation\n\n```kotlin\nclass HomeController : Controller() {\n\n  override fun onCreateView(\n    inflater: LayoutInflater,\n    container: ViewGroup,\n    savedViewState: Bundle?\n  ): View {\n    val view = inflater.inflate(R.layout.controller_home, container, false)\n    view.findViewById\u003cTextView\u003e(R.id.tv_title).text = \"Hello World\"\n    return view  \n  }\n}\n```\n\n### Sample Project\n\n[Demo app](https://github.com/bluelinelabs/conductor/tree/master/demo) - Shows how to use all basic and most advanced functions of Conductor.\n\n### Controller Lifecycle\n\nThe lifecycle of a Controller is significantly simpler to understand than that of a Fragment. A lifecycle diagram is shown below:\n\n![Controller Lifecycle](docs/Controller%20Lifecycle.jpg)\n\n## Advanced Topics\n\n### Retain View Modes\n`setRetainViewMode` can be called on a `Controller` with one of two values: `RELEASE_DETACH`, which will release the `Controller`'s view as soon as it is detached from the screen (saves memory), or `RETAIN_DETACH`, which will ensure that a `Controller` holds on to its view, even if it's not currently shown on the screen (good for views that are expensive to re-create).\n\n### Custom Change Handlers\n`ControllerChangeHandler` can be subclassed in order to perform different functions when changing between two `Controllers`. Two convenience `ControllerChangeHandler` subclasses are included to cover most basic needs: `AnimatorChangeHandler`, which will use an `Animator` object to transition between two views, and `TransitionChangeHandler`, which will use Lollipop's `Transition` framework for transitioning between views.\n\n### Child Routers \u0026 Controllers\n`getChildRouter` can be called on a `Controller` in order to get a nested `Router` into which child `Controller`s can be pushed. This enables creating advanced layouts, such as Master/Detail.\n\n### RxJava Lifecycle\nIf the AutoDispose dependency has been added, there is a `ControllerScopeProvider` available that can be used along with the standard [AutoDispose library](https://github.com/uber/AutoDispose).\n\n## Community Projects\nThe community has provided several helpful modules to make developing apps with Conductor even easier. Here's a collection of helpful libraries:\n\n* [ConductorGlide](https://github.com/MkhytarMkhoian/ConductorGlide) - Adds Glide lifecycle support to Controllers\n* [ConductorDialog](https://github.com/MkhytarMkhoian/ConductorDialog) - Adds a helpful DialogController (a Conductor version of DialogFragment)\n* [Mosby-Conductor](https://github.com/sockeqwe/mosby-conductor) - A plugin to integrate Mosby, an MVP/MVI library\n\n\n## License\n```\nCopyright 2020 BlueLine Labs, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluelinelabs%2FConductor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluelinelabs%2FConductor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluelinelabs%2FConductor/lists"}