{"id":20703550,"url":"https://github.com/hasnathjami/animatedflipview","last_synced_at":"2026-05-18T10:04:22.810Z","repository":{"id":247890487,"uuid":"827142675","full_name":"HasnathJami/AnimatedFlipView","owner":"HasnathJami","description":"Animated Flip View is a dynamic and easy-to-use Android library that lets you flip views with smooth animations","archived":false,"fork":false,"pushed_at":"2024-07-24T16:29:03.000Z","size":4139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-24T08:13:23.346Z","etag":null,"topics":["android","animated-flip-view","animation","custom-view","flip-animation","flip-view","xml"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/HasnathJami.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}},"created_at":"2024-07-11T05:08:02.000Z","updated_at":"2024-07-25T15:21:15.000Z","dependencies_parsed_at":"2024-07-24T15:49:17.298Z","dependency_job_id":"e23be564-6554-4e61-882a-abf9403306cd","html_url":"https://github.com/HasnathJami/AnimatedFlipView","commit_stats":null,"previous_names":["hasnathjami/animatedflipview"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/HasnathJami/AnimatedFlipView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasnathJami%2FAnimatedFlipView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasnathJami%2FAnimatedFlipView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasnathJami%2FAnimatedFlipView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasnathJami%2FAnimatedFlipView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HasnathJami","download_url":"https://codeload.github.com/HasnathJami/AnimatedFlipView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasnathJami%2FAnimatedFlipView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33174091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"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":["android","animated-flip-view","animation","custom-view","flip-animation","flip-view","xml"],"created_at":"2024-11-17T01:08:27.398Z","updated_at":"2026-05-18T10:04:22.759Z","avatar_url":"https://github.com/HasnathJami.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Animated Flip View\n\nAnimated Flip View is a dynamic and easy-to-use Android library that lets you flip views with smooth animations. You can flip views to the front or back in any direction and set custom durations for the animations. This library provides an intuitive way to add engaging visual transitions to your app, enhancing user experience without complex coding.\n\n```\n\nMin SDK           : 21 - (Android – 5.0 Lollipop)\nMax(Target) SDK   : 34 - (Android - 14.0 UPSIDE_DOWN_CAKE)\nLanguage          : Kotlin\nLatest Version    : 2.0.2\nLicense           : Apache 2.0\nRepository        : JitPack\nCompatible        : Java, Kotlin\n\n```\n\n![Example GIF](images/animatedFlipViewDemo.gif)\n\n## Key Features\n\n- **Lightweight and Easy to Use:** Enables smooth view flipping with minimal coding effort.\n- **Flexible Flip Directions:** Supports flipping views in any direction—left, right, up, or down.\n- **Customizable Animations:** You can set custom durations and easing functions for animations.\n\n\n\n## Get Started\n\n\n\u003e Step 1. Add the JitPack repository to your build file\n\n```\ndependencyResolutionManagement {\n\t\trepositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n\t\trepositories {\n\t\t\tmavenCentral()\n\t\t\tmaven { url 'https://www.jitpack.io' }\n\t\t}\n\t}\n```\n\u003e Step 2. Add the dependency\n\n```\ndependencies {\n\t        implementation 'com.github.HasnathJami:AnimatedFlipView:version'\n\t}\n```\n\n## Implementation\n\u003e Add this custom view to your layout or single-row design\n```xml\n    \u003ccom.hasnath.jami.animated_flip_view.afv_custom_view.AnimatedFlipView\n        android:id=\"@+id/animatedFlipView\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:frontFlipDuration=\"800\"\n        app:backFlipDuration=\"800\"\n        app:flipDirection=\"RIGHT_TO_LEFT\"/\u003e\n```\n## Attributes (XML)\nflipDirection = {RIGHT_TO_LEFT, LEFT_TO_RIGHT, TOP_TO_BOTTOM, BOTTOM_TO_TOP}\n\n\n### Implementation in Activity\n\u003e Java\n```java\npublic class YourActivity extends AppCompatActivity {\n\n    private AnimatedFlipView flipView;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_your);\n\n        flipView = findViewById(R.id.animatedFlipView);\n\n        // Set your front layout\n        View frontView = getLayoutInflater().inflate(R.layout.your_front_side_layout, null);\n\n        // Set your back layout\n        View backView = getLayoutInflater().inflate(R.layout.your_back_side_layout, null);\n\n        // Add front layout to parent view\n        flipView.setFrontView(frontView);\n\n        // Add back layout to parent view\n        flipView.setBackView(backView);\n\n        // Control the front view flipping with view clicking\n        frontView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                flipView.flipToBack();\n            }\n        });\n\n        // Control the back view flipping with view clicking\n        backView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                flipView.flipToFront();\n            }\n        });\n\n        // OR\n        // Handle the auto back view flipping\n        // frontView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n        //    @Override\n        //    public void onClick(View v) {\n        //        flipView.startAutoBackFlippingWithIntervals(1500);\n        //    }\n        // });\n    }\n\n    @Override\n    protected void onDestroy() {\n        super.onDestroy();\n        flipView.removeHandler();\n    }\n}\n\n```\n\n\u003e Kotlin\n```kotlin\nclass YourActivity : AppCompatActivity() {\n\n    private lateinit var flipView: AnimatedFlipView\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_your)\n\n        flipView = findViewById(R.id.animatedFlipView)\n\n        // Set your front layout\n        val frontView = layoutInflater.inflate(R.layout.your_front_side_layout, null)\n\n        // Set your back layout\n        val backView = layoutInflater.inflate(R.layout.your_back_side_layout, null)\n\n        // Add front layout to parent view\n        flipView.setFrontView(frontView)\n\n        // Add back layout to parent view\n        flipView.setBackView(backView)\n\n        /* Control the front view flipping with view clicking */\n        frontView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n            flipView.flipToBack()\n        }\n\n        /* Control the back view flipping with view clicking */\n        backView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n            flipView.flipToFront()\n        }\n\n         //OR\n        /* Handle the auto back view flipping */\n//        frontView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n//        flipView.startAutoBackFlippingWithIntervals(delay = 1500)\n        }\n    }\n\n   // Release the handler when the screen destroys\n    override fun onDestroy() {\n        super.onDestroy()\n        flipView.removeHandler()\n\n    }\n}\n```\n\n### Implementation in Fragment\n\n\u003e Java\n```java\npublic class YourFragment extends Fragment {\n\n    private AnimatedFlipView flipView;\n\n    @Nullable\n    @Override\n    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n                             @Nullable Bundle savedInstanceState) {\n        // Inflate the layout for this fragment\n        View view = inflater.inflate(R.layout.fragment_your, container, false);\n        flipView = view.findViewById(R.id.animatedFlipView);\n\n        // Set your front layout\n        View frontView = inflater.inflate(R.layout.your_front_side_layout, null);\n\n        // Set your back layout\n        View backView = inflater.inflate(R.layout.your_back_side_layout, null);\n\n        // Add the front layout to parent view\n        flipView.setFrontView(frontView);\n\n        // Add the back layout to parent view\n        flipView.setBackView(backView);\n\n        // Control the front view flipping with view clicking\n        frontView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                flipView.flipToBack();\n            }\n        });\n\n        // Control the back view flipping with view clicking\n        backView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                flipView.flipToFront();\n            }\n        });\n\n        // OR\n        // Handle the auto back view flipping\n        // frontView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n        //    @Override\n        //    public void onClick(View v) {\n        //        flipView.startAutoBackFlippingWithIntervals(1500);\n        //    }\n        // });\n\n        return view;\n    }\n\n    @Override\n    public void onDestroyView() {\n        super.onDestroyView();\n        if (flipView != null) {\n            flipView.removeHandler();\n        }\n    }\n}\n\n```\n\u003e Kotlin\n```kotlin\nclass YourFragment : Fragment() {\n\n    private lateinit var flipView: AnimatedFlipView\n\n    override fun onCreateView(\n        inflater: LayoutInflater, container: ViewGroup?,\n        savedInstanceState: Bundle?\n    ): View? {\n        // Inflate the layout for this fragment\n        val view = inflater.inflate(R.layout.fragment_your, container, false)\n        flipView = view.findViewById(R.id.animatedFlipView)\n\n        // Set your front layout\n        val frontView = inflater.inflate(R.layout.your_front_side_layout, null)\n\n        // Set your back layout\n        val backView = inflater.inflate(R.layout.your_back_side_layout, null)\n\n        // Add the front layout to parent view\n        flipView.setFrontView(frontView)\n\n        // Add the back layout to parent view\n        flipView.setBackView(backView)\n\n        /* Control the front view flipping with view clicking */\n        frontView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n            flipView.flipToBack()\n        }\n         /* Control the back view flipping with view clicking */\n        backView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n            flipView.flipToFront()\n        }\n\n        //OR\n        /* Handle the auto back view flipping */\n //       frontView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n //           flipView.startAutoBackFlippingWithIntervals(delay = 1500)\n //       }\n\n        return view\n    }\n\n    // Release the handler when the fragment view destroys\n    override fun onDestroyView() {\n        super.onDestroyView()\n        flipView?.removeHandler()\n    }\n\n}\n```\n\n### Implementation in RecyclerView\n\u003e Java\n```java\npublic class ViewHolder extends RecyclerView.ViewHolder {\n\n    private AnimatedFlipView flipView;\n    private View frontView;\n    private View backView;\n\n    public ViewHolder(@NonNull View itemView) {\n        super(itemView);\n\n        flipView = itemView.findViewById(R.id.animatedFlipView);\n\n        // Set your front layout\n        frontView = LayoutInflater.from(itemView.getContext()).inflate(R.layout.your_front_side_layout, null);\n\n        // Set your back layout\n        backView = LayoutInflater.from(itemView.getContext()).inflate(R.layout.your_back_side_layout, null);\n\n        // Set your front layout\n        flipView.setFrontView(frontView);\n\n        // Set your back layout\n        flipView.setBackView(backView);\n\n        // Control the front view flipping with view clicking\n        frontView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                flipView.flipToBack();\n            }\n        });\n\n        // Control the back view flipping with view clicking\n        backView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n            @Override\n            public void onClick(View v) {\n                flipView.flipToFront();\n            }\n        });\n\n        // OR\n        // Handle the auto back view flipping\n        // frontView.findViewById(R.id.view_id).setOnClickListener(new View.OnClickListener() {\n        //    @Override\n        //    public void onClick(View v) {\n        //        flipView.startAutoBackFlippingWithIntervals(1500);\n        //    }\n        // });\n    }\n\n    public void bind(Item item) {\n        // Bind data to your views here\n        // Add other bindings as needed\n    }\n}\n\n\n```\n\n\u003e Kotlin\n```kotlin\n    class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n\n        private val flipView: AnimatedFlipView = itemView.findViewById(R.id.animatedFlipView)\n\n        // Set your front layout\n        private val frontView: View = LayoutInflater.from(itemView.context).inflate(R.layout.your_front_side_layout, null)\n\n        // Set your back layout\n        private val backView: View = LayoutInflater.from(itemView.context).inflate(R.layout.your_back_side_layout, null)\n\n        init {\n            // Set your front layout\n            flipView.setFrontView(frontView)\n\n            // Set your back layout\n            flipView.setBackView(backView)\n\n            /* Control the front view flipping with view clicking */\n            frontView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n                flipView.flipToBack()\n            }\n\n            /* Control the back view flipping with view clicking */\n            backView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n                flipView.flipToFront()\n            }\n\n             //OR\n             /* Handle the auto back view flipping */          \n//            frontView.findViewById\u003cYour_View\u003e(R.id.view_id).setOnClickListener {\n//                flipView.startAutoBackFlippingWithIntervals(delay = 1500)\n//            }\n        }\n\n        fun bind(item: Item) {\n            // Bind data to your views here\n            // Add other bindings as needed\n        }\n    }\n\n```\n\n## Contribution\n\nContributions to the Animated Flip View library are welcome! Enhance the library with bug fixes, new features, or improvements. Your input makes it better for everyone. Visit the GitHub repository to collaborate with fellow developers.\n\n## Licence\n\nAnimated Flip View is under Apache 2.0 License, permitting personal and commercial use. You can use, modify, and distribute the library per the license terms.\n\n```\nCopyright 2024 Hasnath Jami Chowdhury\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nYou won't be using 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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasnathjami%2Fanimatedflipview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasnathjami%2Fanimatedflipview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasnathjami%2Fanimatedflipview/lists"}