{"id":21130005,"url":"https://github.com/kaleai/ActivityOptionsICS","last_synced_at":"2025-07-09T01:31:56.276Z","repository":{"id":23892658,"uuid":"27272178","full_name":"kaleai/ActivityOptionsICS","owner":"kaleai","description":"The lib can make the ActivityOptions animations use in Android api3.1+","archived":false,"fork":false,"pushed_at":"2016-03-16T07:49:24.000Z","size":5876,"stargazers_count":590,"open_issues_count":10,"forks_count":128,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-13T22:33:45.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.cnblogs.com/tianzhijiexian/p/4128045.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaleai.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}},"created_at":"2014-11-28T15:23:27.000Z","updated_at":"2024-11-09T00:37:28.000Z","dependencies_parsed_at":"2022-08-30T14:10:49.911Z","dependency_job_id":null,"html_url":"https://github.com/kaleai/ActivityOptionsICS","commit_stats":null,"previous_names":["tianzhijiexian/activityoptionsics"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaleai%2FActivityOptionsICS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaleai%2FActivityOptionsICS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaleai%2FActivityOptionsICS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaleai%2FActivityOptionsICS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaleai","download_url":"https://codeload.github.com/kaleai/ActivityOptionsICS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476379,"owners_count":17480215,"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-11-20T05:32:10.360Z","updated_at":"2024-11-20T05:32:12.432Z","avatar_url":"https://github.com/kaleai.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Animations\"\u003e\u003c/A\u003eAnimations"],"readme":" ActivityOptionsICS\n \n ---\n# 本项目停止维护\n \n===========\nf you are thinking on customizing the animation of Activity transition then probably you would look for ActivityOptions.However ActivityOptions class introduced in Android 4.1 (Jelly bean). ActivityOptionsICS can make it use in 3.1+. The library provided some methods which can help you to customize the Activity Animation.\n\n\nScreenshot\n--\nPlease waiting for loading...\n\n![](https://raw.githubusercontent.com/tianzhijiexian/ActivityOptionsICS/master/pictures/001.gif)\n\n![](https://raw.githubusercontent.com/tianzhijiexian/ActivityOptionsICS/master/pictures/002.gif)\n\n\n![](https://raw.githubusercontent.com/tianzhijiexian/ActivityOptionsICS/master/pictures/003.gif)\n\n![](https://raw.githubusercontent.com/tianzhijiexian/ActivityOptionsICS/master/pictures/004.gif)\n\n\nActivityOptionsCompatICS\n--\n\n1. public static ActivityOptionsCompatICS makeCustomAnimation(Context context,int enterResId, int exitResId)\n\u003eThis method allows to pass custom animation and when the Atyctivi is launched, it gets rendered accordingly. Here you can pass animation for transitioning out Activity as well as for transitioning in Activity   \n\n2. public static ActivityOptionsCompatICS makeScaleUpAnimation(View source, int startX, int startY, int width, int height)  \n\u003eThis method scales up the Activity from the initial size to its final representational size. It can be used to scale up the activity from the view which has launched this activity.  \n\n3. public static ActivityOptionsCompatICSmakeThumbnailScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY)   \n\u003eIn this animation, a thumbnail of the activity scales up to the final size of the activity.  \n\n4. public static ActivityOptionsCompatICS makeSceneTransitionAnimation(Activity activity, View view, sharedElement,int sharedElementId)\n\u003eThis method carries the position of one shared element to the started Activity.The position of \u003ccode\u003esharedElement\u003c/code\u003e will be used as the epicenter for the exit Transition. \n\n5. public static ActivityOptionsCompatICS makeSceneTransitionAnimation(Activity activity, Pair\u003cView, Integer\u003e... sharedElements)\n\u003eThis method carries the position of multiple shared elements to the started Activity. The position of the first element in sharedElements will be used as the epicenter for the exit Transition. The position of the associated shared element in the launched Activity will be the epicenter of its entering Transition.  \n\n\nActivityCompatICS\n----\n1. public static void startActivity(Activity activity, Intent intent, Bundle bundle) \n\nTransitionCompat\n----\n1. TransitionCompat.startTransition(this, R.layout.activity_target);\n2. TransitionCompat.finishAfterTransition(this);\n\n \t\t\n\n\n# How to use\n\t\nIf you want use this library, you only have to download this project, import it into your workspace and add the project as a library in your android project settings.\n\n### In MainActivity  \n\n\n **makeCustomAnimation** \n \n       public void customAnim() {\n        \t\tActivityOptionsCompatICS options = ActivityOptionsCompatICS.makeCustomAnimation(this,\n        \t\t\t\tR.anim.slide_bottom_in, R.anim.slide_bottom_out);\n        \t\tActivityCompatICS.startActivity(MainActivity.this, intent, options.toBundle());\n        \t}\n**makeScaleUpAnimation**  \n\n    public void scaleUpAnim(View view) {\n    \t\tActivityOptionsCompatICS options = ActivityOptionsCompatICS.makeScaleUpAnimation(view,\n    \t\t\t\t 0, 0, //拉伸开始的坐标\n    \t             view.getMeasuredWidth(), view.getMeasuredHeight());//初始的宽高\n    \t\tActivityCompatICS.startActivity(MainActivity.this, intent, options.toBundle());\n    \t}\n\t\n**makeThumbnailScaleUpAnimation**  \n\n    public void thumbNailScaleAnim(ImageView view) {\n    \t\tview.setDrawingCacheEnabled(true);\n    \t\t Bitmap bitmap = view.getDrawingCache();\n    \t\t  ActivityOptionsCompatICS options = ActivityOptionsCompatICS.makeThumbnailScaleUpAnimation(\n    \t\t    view, bitmap, 0, 0);\n    \t\t  // Request the activity be started, using the custom animation options.\n    \t\t  ActivityCompatICS.startActivity(MainActivity.this, intent, options.toBundle());\n    \t\t  //view.setDrawingCacheEnabled(false);\n    \t}\n\t\n**makeSceneTransitionAnimation**\n\n    screenTransitAnimByPair(\n\t\t\t\t\tPair.create((View)orginalImageView, R.id.target_imageView),\n\t\t\t\t\tPair.create((View)orginalTextView, R.id.target_textView),\n\t\t\t\t\tPair.create((View)chromeIView, R.id.target_chrome_imageView));   \n# \n    public void screenTransitAnimByPair(Pair\u003cView, Integer\u003e... views) {\n    \t\tisSceneAnim = true;\n    \t\tActivityOptionsCompatICS options = ActivityOptionsCompatICS.makeSceneTransitionAnimation(\n    \t\t\t\tMainActivity.this, views);\n    \t\tActivityCompatICS.startActivity(MainActivity.this, intent, options.toBundle());\n    \t}\n  \n  \n##In TargetActivity\n1.make translucentTheme in style.xml    \n \n\t\u003cstyle name=\"TranslucentTheme\" parent=\"AppBaseTheme\"\u003e\n        \u003citem name=\"android:windowIsTranslucent\"\u003etrue\u003c/item\u003e\n    \u003c/style\n2.set targetActivity's theme in manifest.xml        \n\n\t\u003cactivity   \n\t\tandroid:name=\"com.example.activityoptionsjbtest.TargetActivity\"   \n\t\tandroid:theme=\"@style/TranslucentTheme\" /\u003e     \n  \n3.start transition in targetActivity    \n\n    public class TargetActivity extends Activity{\n\n\t    @Override\n\t    protected void onCreate(Bundle savedInstanceState) {\n\t\t    super.onCreate(savedInstanceState);\n\t\t    setContentView(R.layout.activity_target);\n\n\t\t    TransitionCompat.startTransition(this, R.layout.activity_target);\n\t    }\n\t    \n\t    @Override\n\t    public void onBackPressed() {\n\t\t    //super.onBackPressed();\n\t\t    TransitionCompat.finishAfterTransition(this); \n\t    }\n    }  \n\n\nDeveloped By\n--------------------\n\nKale \u003cdeveloper_kale@qq.com\u003e  \n\n![](https://avatars3.githubusercontent.com/u/9552155?v=3\u0026s=460)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleai%2FActivityOptionsICS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaleai%2FActivityOptionsICS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaleai%2FActivityOptionsICS/lists"}