{"action":"opened","issue":{"url":"https://api.github.com/repos/ozodrukh/CircularReveal/issues/105","repository_url":"https://api.github.com/repos/ozodrukh/CircularReveal","labels_url":"https://api.github.com/repos/ozodrukh/CircularReveal/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/ozodrukh/CircularReveal/issues/105/comments","events_url":"https://api.github.com/repos/ozodrukh/CircularReveal/issues/105/events","html_url":"https://github.com/ozodrukh/CircularReveal/issues/105","id":191081941,"number":105,"title":"Circular reveal animation not showing on pre-lollipop devices","user":{"login":"MasterzYuri","id":9827473,"avatar_url":"https://avatars.githubusercontent.com/u/9827473?v=3","gravatar_id":"","url":"https://api.github.com/users/MasterzYuri","html_url":"https://github.com/MasterzYuri","followers_url":"https://api.github.com/users/MasterzYuri/followers","following_url":"https://api.github.com/users/MasterzYuri/following{/other_user}","gists_url":"https://api.github.com/users/MasterzYuri/gists{/gist_id}","starred_url":"https://api.github.com/users/MasterzYuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MasterzYuri/subscriptions","organizations_url":"https://api.github.com/users/MasterzYuri/orgs","repos_url":"https://api.github.com/users/MasterzYuri/repos","events_url":"https://api.github.com/users/MasterzYuri/events{/privacy}","received_events_url":"https://api.github.com/users/MasterzYuri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-22T18:04:57Z","updated_at":"2016-11-22T18:04:57Z","closed_at":null,"body":"It works just fine on 5.0+ devices, but on pre-lollipop I don't see the reveal animation.\r\n\r\n**activity_details.xml**\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<android.support.design.widget.CoordinatorLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:fitsSystemWindows=\"true\">\r\n\r\n    <android.support.design.widget.AppBarLayout\r\n        android:id=\"@+id/app_bar\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"250dp\"\r\n        android:fitsSystemWindows=\"true\"\r\n        android:theme=\"@style/ThemeOverlay.AppCompat.Dark.ActionBar\"\r\n        app:layout_scrollFlags=\"scroll|enterAlways|snap\">\r\n\r\n        <android.support.design.widget.CollapsingToolbarLayout\r\n            android:id=\"@+id/toolbar_layout\"\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"match_parent\"\r\n            android:fitsSystemWindows=\"true\"\r\n            app:titleEnabled=\"false\">\r\n\r\n            <io.codetail.widget.RevealFrameLayout\r\n                android:layout_width=\"match_parent\"\r\n                android:layout_height=\"match_parent\">\r\n\r\n                <ImageView\r\n                    android:id=\"@+id/backdrop\"\r\n                    android:layout_width=\"match_parent\"\r\n                    android:layout_height=\"match_parent\"\r\n                    android:scaleType=\"center\"/>\r\n\r\n            </io.codetail.widget.RevealFrameLayout>\r\n\r\n            <android.support.v7.widget.Toolbar\r\n                android:id=\"@+id/toolbar\"\r\n                android:layout_width=\"match_parent\"\r\n                android:layout_height=\"?attr/actionBarSize\"\r\n                app:layout_collapseMode=\"pin\"\r\n                app:popupTheme=\"@style/ThemeOverlay.AppCompat.Light\" />\r\n\r\n        </android.support.design.widget.CollapsingToolbarLayout>\r\n    </android.support.design.widget.AppBarLayout>\r\n\r\n    <include layout=\"@layout/content_detail\" />\r\n\r\n</android.support.design.widget.CoordinatorLayout>\r\n```\r\n\r\n\r\n**DetailsActivity.java**\r\n```\r\npublic class DetailsActivity extends AppCompatActivity {\r\n\r\n    private TextView t1;\r\n    private ImageView imageView1;\r\n\r\n    @Override\r\n    protected void onCreate(final Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.activity_details);\r\n\r\n        t1 = (TextView) findViewById(R.id.acasa_t1);\r\n        t1.setText(R.string.acasa_1);\r\n      \r\n        imageView1 = (ImageView) findViewById(R.id.backdrop);\r\n     \r\n        Glide.with(this)\r\n                .load(\"some url\")\r\n                .error(R.drawable.error_glide)\r\n                .priority(Priority.HIGH)\r\n                .centerCrop()\r\n                .crossFade()\r\n                .into(imageView1);\r\n\r\n        beginEnterTransition();\r\n\r\n    }\r\n\r\n    private void beginEnterTransition() {\r\n        imageView1.post(new Runnable() {\r\n            @Override\r\n            public void run() {\r\n                // get the center for the clipping circle\r\n                int cx = (imageView1.getLeft() + imageView1.getRight()) / 2;\r\n                int cy = (imageView1.getTop() + imageView1.getBottom()) / 2;\r\n\r\n                // get the final radius for the clipping circle\r\n                int dx = Math.max(cx, imageView1.getWidth() - cx);\r\n                int dy = Math.max(cy, imageView1.getHeight() - cy);\r\n                float finalRadius = (float) Math.hypot(dx, dy);\r\n\r\n                // Android native animator\r\n                animator = io.codetail.animation.ViewAnimationUtils.createCircularReveal(myView, cx, cy, 0, finalRadius);\r\n                animator.setInterpolator(new AccelerateDecelerateInterpolator());\r\n                animator.setDuration(800);\r\n                animator.start();\r\n\r\n                t1.startAnimation(AnimationUtils.loadAnimation(DetailsActivity.this, R.anim.fadein));\r\n\r\n            }\r\n        });\r\n    }\r\n}\r\n\r\n```"}}
{"actor":{"display_login":"MasterzYuri"}}