{"id":13645499,"url":"https://github.com/florent37/Depth","last_synced_at":"2025-04-21T14:31:28.225Z","repository":{"id":91120141,"uuid":"83693048","full_name":"florent37/Depth","owner":"florent37","description":"Add some Depth to your fragments","archived":true,"fork":false,"pushed_at":"2018-10-01T09:07:09.000Z","size":11362,"stargazers_count":779,"open_issues_count":1,"forks_count":93,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-11-09T18:42:53.353Z","etag":null,"topics":["3d","android","animation","depth","design","fragment","material","scale","transition","translation"],"latest_commit_sha":null,"homepage":"","language":"Java","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/florent37.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}},"created_at":"2017-03-02T15:27:00.000Z","updated_at":"2024-08-25T21:25:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"50b63115-0a0f-4389-ba82-c247ae1520f8","html_url":"https://github.com/florent37/Depth","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/florent37%2FDepth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florent37%2FDepth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florent37%2FDepth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florent37%2FDepth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/florent37","download_url":"https://codeload.github.com/florent37/Depth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070173,"owners_count":21369839,"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":["3d","android","animation","depth","design","fragment","material","scale","transition","translation"],"created_at":"2024-08-02T01:02:35.981Z","updated_at":"2025-04-21T14:31:28.204Z","avatar_url":"https://github.com/florent37.png","language":"Java","readme":"# Depth\n\nAdd some Depth to your fragments\n\n\n\u003ca href=\"https://goo.gl/WXW8Dc\"\u003e\n  \u003cimg alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" /\u003e\n\u003c/a\u003e\n\n\n[![gif](https://raw.githubusercontent.com/florent37/Depth/master/media/default.gif)](https://github.com/florent37/Depth)\n[![gif](https://raw.githubusercontent.com/florent37/Depth/master/media/revert.gif)](https://github.com/florent37/Depth)\n\n**The blue comes from the activity background color**\n\nIn your **activity**\n```java\nfinal Depth depth = DepthProvider.getDepth(container);\ndepth\n      .animate()\n      .reduce(oldFragment)\n\n      .exit(oldFragment)\n\n      .enter(newFragment)\n      .start();\n```\n\nIn your **fragment**\n```java\nprivate Depth depth;\n\n@Override\npublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n    this.depth = DepthProvider.getDepth(container);\n    return depth.setupFragment(10f, 10f, inflater.inflate(R.layout.fragment_1, container, false));\n}\n\n@Override\npublic void onViewCreated(final View view, Bundle savedInstanceState) {\n    super.onViewCreated(view, savedInstanceState);\n\n    depth.onFragmentReady(this);\n}\n```\n\n# Customize the animations\n\n```java\ndepth\n     .animate()\n     .reduce(oldFragment, new ReduceConfiguration()\n             .setRotationZ(0f)\n             .setRotationX(30f)\n             .setDuration(1000)\n     )\n\n     .exit(oldFragment, new ExitConfiguration()\n             .setFinalXPercent(0f)\n             .setFinalYPercent(-1f)\n     )\n     .enter(newFragment, new EnterConfiguration()\n             .setInitialXPercent(0f)\n             .setInitialYPercent(1f)\n             .setInitialRotationZ(0f)\n             .setInitialRotationX(30f)\n     )\n     .start();\n```\n\n[![gif](https://raw.githubusercontent.com/florent37/Depth/master/media/top.gif)](https://github.com/florent37/Depth)\n[![gif](https://raw.githubusercontent.com/florent37/Depth/master/media/left.gif)](https://github.com/florent37/Depth)\n\n# Add multiples DepthLayouts\n\nDon't use `depth.setupFragment(`\n\nBut manually create your own layout with `DepthRelativeLayoutContainer`and `DepthRelativeLayout`\n\n```xml\n\u003ccom.github.florent37.depth.DepthRelativeLayoutContainer xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\u003e\n\n    \u003ccom.github.florent37.depth.DepthRelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_below=\"@+id/status_bar\"\n        android:background=\"@android:color/white\"\n        app:depth_value=\"2dp\"\n        app:depth_zIndex=\"0\"\u003e\n\n        \u003cLinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerHorizontal=\"true\"\n            android:layout_centerVertical=\"true\"\n            android:orientation=\"vertical\"\u003e\n\n            \u003cView\n                android:id=\"@+id/next\"\n                android:layout_width=\"40dp\"\n                android:layout_height=\"40dp\"\n                android:layout_centerInParent=\"true\"\n                android:layout_marginBottom=\"10dp\"\n                android:background=\"@drawable/circle_blue\" /\u003e\n\n            \u003cView\n                android:id=\"@+id/open_reset\"\n                android:layout_width=\"40dp\"\n                android:layout_height=\"40dp\"\n                android:layout_centerInParent=\"true\"\n                android:background=\"@drawable/circle_blue\" /\u003e\n\n        \u003c/LinearLayout\u003e\n\n    \u003c/com.github.florent37.depth.DepthRelativeLayout\u003e\n\n    \u003ccom.github.florent37.depth.DepthRelativeLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_below=\"@+id/status_bar\"\n        android:background=\"@android:color/white\"\n        app:depth_value=\"2dp\"\n        app:depth_zIndex=\"1\"\u003e\n\n        \u003cView\n            android:id=\"@+id/status_bar\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"25dp\"\n            android:background=\"@color/colorPrimaryDark\" /\u003e\n\n        \u003ccom.github.florent37.awesomebar.AwesomeBar\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:background=\"@android:color/white\"\n            android:layout_below=\"@+id/status_bar\"\n            app:bar_animatedIcons=\"false\"\n            app:bar_primaryColor=\"@color/colorPrimary\"\n            app:bar_primaryDarkColor=\"@color/colorPrimaryDark\" /\u003e\n\n    \u003c/com.github.florent37.depth.DepthRelativeLayout\u003e\n\n\u003c/com.github.florent37.depth.DepthRelativeLayoutContainer\u003e\n```\n\n[![gif](https://raw.githubusercontent.com/florent37/Depth/master/media/revert.gif)](https://github.com/florent37/Depth)\n\n#Download\n\n\u003ca href='https://ko-fi.com/A160LCC' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\nIn your module [![Download](https://api.bintray.com/packages/florent37/maven/depth/images/download.svg)](https://bintray.com/florent37/maven/depth/_latestVersion)\n```groovy\ncompile 'com.github.florent37:depth:1.0.0'\n```\n\n# Changelog\n\n## 1.0.0\n\nInitial import\n\n# Community\n\nForked from [danielzeller/Depth-LIB-Android-](https://github.com/danielzeller/Depth-LIB-Android-)\nThanks for their amazing work !\n\n# Credits\n\nAuthor: Florent Champigny\n\nFiches Plateau Moto : [https://www.fiches-plateau-moto.fr/](https://www.fiches-plateau-moto.fr/)\n\n\u003ca href=\"https://goo.gl/WXW8Dc\"\u003e\n  \u003cimg alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://plus.google.com/+florentchampigny\"\u003e\n  \u003cimg alt=\"Follow me on Google+\"\n       src=\"https://raw.githubusercontent.com/florent37/DaVinci/master/mobile/src/main/res/drawable-hdpi/gplus.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://twitter.com/florent_champ\"\u003e\n  \u003cimg alt=\"Follow me on Twitter\"\n       src=\"https://raw.githubusercontent.com/florent37/DaVinci/master/mobile/src/main/res/drawable-hdpi/twitter.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://fr.linkedin.com/in/florentchampigny\"\u003e\n  \u003cimg alt=\"Follow me on LinkedIn\"\n       src=\"https://raw.githubusercontent.com/florent37/DaVinci/master/mobile/src/main/res/drawable-hdpi/linkedin.png\" /\u003e\n\u003c/a\u003e\n\n# License\n\n    Copyright 2017 florent37, Inc.\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","funding_links":["https://ko-fi.com/A160LCC'"],"categories":["其他"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorent37%2FDepth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorent37%2FDepth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorent37%2FDepth/lists"}