{"id":21880494,"url":"https://github.com/brucewind/rxcomponent","last_synced_at":"2026-05-16T12:32:16.187Z","repository":{"id":92556215,"uuid":"70368502","full_name":"BruceWind/RxComponent","owner":"BruceWind","description":"使用RxJava实现的一组组建。","archived":false,"fork":false,"pushed_at":"2016-10-10T07:55:14.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T00:44:23.258Z","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/BruceWind.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-09T01:50:04.000Z","updated_at":"2019-12-14T06:56:26.000Z","dependencies_parsed_at":"2023-03-03T13:00:39.080Z","dependency_job_id":null,"html_url":"https://github.com/BruceWind/RxComponent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BruceWind/RxComponent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FRxComponent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FRxComponent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FRxComponent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FRxComponent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BruceWind","download_url":"https://codeload.github.com/BruceWind/RxComponent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceWind%2FRxComponent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33102774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-28T09:14:09.568Z","updated_at":"2026-05-16T12:32:16.171Z","avatar_url":"https://github.com/BruceWind.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RxComponent\n\n借用RxJava实现，RxBroadCast，RxBus，RxPermission。\n\n三个组件的git地址：\n\n[https://github.com/weizongwei5/RxComponent](https://github.com/weizongwei5/RxComponent)\n\n[https://github.com/weizongwei5/RxBusLib](https://github.com/weizongwei5/RxBusLib)\n\n[https://github.com/weizongwei5/rxpermissions](https://github.com/weizongwei5/rxpermissions)\n\n\n# 栗子\n\n\n## 使用RxBroadcast\n```\nMainActivity extends AppCompatActivity  {\n\n    RxBroadcastReceiver broadcastReceiverAsync = new RxBroadcastReceiver(){\n\n        @SuppressLint(\"LongLogTag\")\n        @Override\n        public void onReceive(Context context, Intent intent) {\n\n            Log.d(\"RxLocalBroadcastManager send:\", intent.getAction()+ \" ,onReceive is MainThraed=\" + isMainTread());\n        }\n    };\n    \n        @Override\n        protected void onCreate(Bundle savedInstanceState) {\n    \n            super.onCreate(savedInstanceState);\n\n            IntentFilter filters=new IntentFilter();\n            filters.addAction(\"testthread\");\n            RxLocalBroadcastManager.getInstance(this).registerReceiver(broadcastReceiverAsync,filters);\n            \n        }\n\n\n...\n...\n\n}\n    \n//log如下 ：\n\nRxBroadCastManager send:: testthread ,onReceive is MainThraed=true\nRxBroadCastManager send:: testthread ,onReceive is MainThraed=false\n\n\n```\n\n\n## 使用RxPermissions\n\n\n```\n\n        \u003c!--mainfast 设置透明 notitlebar --\u003e\n        \u003cactivity android:name=\"com.androidyuan.rxpermissions.PermissionReqActivity\"\n                  android:theme=\"@android:style/Theme.Translucent.NoTitleBar\" /\u003e\n\n                //开始\n                RxPermissions.getInstance(MainActivity.this)\n                        .request(Manifest.permission.CAMERA)\n                        .callback(new OnPermissionsCallback() {\n                            @Override\n                            public void call(Boolean aBoolean) {\n                                toast(\"\" + aBoolean);\n                            }\n                        });\n                //结束\n\n                \n                //lambda结构\n                RxPermissions.getInstance(MainActivity.this)\n                .request(Manifest.permission.CAMERA)\n                .callback((Boolean aBoolean)-\u003e toast(\"\"+aBoolean) });//显示成功与否\n\n\n```\n\n\n## 使用RxBus\n\n```\n\npublic class MainActivity extends AppCompatActivity {\n\n    private final String filer=\"testfilter\";\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        RxBus.getInstance().register(this);\n\n        startActivity(new Intent(this,SecondActivity.class));\n\n\n\n    }\n\n\n    @Subscribe(threadMode = ThreadMode.POSTING, sticky = true)\n    public void handleEvent(DriverEvent event) {\n        Log.d(\"RXJAVA\", \"event info = \"+event.info+\", is MainThread : \"+(Looper.getMainLooper()==Looper.myLooper()));\n    }\n\n    @Override\n    protected void onDestroy() {\n        super.onDestroy();\n        RxBus.getInstance().unRegister(this);\n    }\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucewind%2Frxcomponent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrucewind%2Frxcomponent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucewind%2Frxcomponent/lists"}