android-transitions

ActivityOptionsCompat.makeSceneTransitionAnimation with custom duration

我与影子孤独终老i 提交于 2020-01-02 06:49:18
问题 I'm making a scene transition for devices with API level 20+. It is working fine, but I want to set custom duration to make the transition. Is it possible ?? My code: ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, viewStart, transitionName ); ActivityCompat.startActivity(this, detailsIntent, options.toBundle()); 回答1: You can set the desired duration in the new started activity, by adding: ChangeBounds bounds = new ChangeBounds(); bounds.setDuration

Android View resize and WindowManager: unwanted transition during child view placement

夙愿已清 提交于 2019-12-25 18:14:39
问题 I'm having some problems in avoiding an unwanted transition during child view placement in a custom ViewGroup after parent view resizing. This problem seems to be only present when using the WindowManager instead of the call to setContentView() . Here is a short example: MainActivity : public class MainActivity extends AppCompatActivity { private static final int MY_PERMISSIONS_DRAW_OVER_OTHER_APPS = 1; CustomViewGroup mCustomViewGroup; WindowManager mWindowManager; @Override protected void

Shared element transition from Activity to Fragment using ViewPager

旧城冷巷雨未停 提交于 2019-12-25 17:07:35
问题 am using this code in my Activity if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { view.setTransitionName("pic"); ActivityOptionsCompat a=ActivityOptionsCompat.makeSceneTransitionAnimation((Activity) context,view,view.getTransitionName()); Intent i3=new Intent(context,MovieInfo.class); i3.putExtra("id",view.getId()); startActivity(i3,a.toBundle()); } and in my Fragment Class am using this public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if

Custom fragment transition parent-to-child navigation setExitTransition not showing

烈酒焚心 提交于 2019-12-25 03:14:43
问题 Background I've been trying to get parent-to-child navigational transition implemented (specifically for recyclerview items -> detail fragment). I'm currently using sharedElementTransitions with the item container and detail container as the sharedElement along with ChangeTransform and ChangeBounds transitions. The detail fragment's enter transition is mostly working. However, I am having problems with the recyclerview item's exit transition. What I want to do is have the recyclerview dim

ImageSwitcher is not showing outAnimation

爷,独闯天下 提交于 2019-12-24 19:45:11
问题 I'm using ImageSwitcher widget of android to transition between 2 images like a slide show but it is showing only in animation and out animation is not showing. What is the issue? Code: imageSwitcher.setFactory(new ViewSwitcher.ViewFactory() { @Override public View makeView() { RoundedImageView imageView = new RoundedImageView(context); imageView.setScaleType(ImageView.ScaleType.CENTER_CROP); imageView.setLayoutParams(new ImageSwitcher.LayoutParams(ConstraintLayout.LayoutParams.MATCH_PARENT,

Fragment Shared Element showing abnormal behaviour in transition

最后都变了- 提交于 2019-12-24 13:24:01
问题 Here is my code: DetailsFragment fragment = new DetailsFragment(); Transition changeTransform = TransitionInflater.from(getActivity()).inflateTransition(R.transition.change_image_transform); Transition explodeTransform = TransitionInflater.from(getActivity()). inflateTransition(android.R.transition.explode); setSharedElementReturnTransition(changeTransform); setExitTransition(explodeTransform); // Setup enter transition on second fragment fragment.setSharedElementEnterTransition

Shared Element Transition Android Doesn't Work

只谈情不闲聊 提交于 2019-12-24 10:26:33
问题 I'm trying to to this for a day but i don't know what is the problem! I have an activity with two fragments which in the first one i have a RecyclerView contains an imageview and on the other fragment i have another imageview. custom view layer imageview: <ImageView android:id="@+id/clst_img_cover" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:scaleType="centerCrop" app:srcCompat="@drawable/no_image" android:transitionName="@string

Share Image element transition display incorrect size

↘锁芯ラ 提交于 2019-12-23 07:04:32
问题 I have a recycle view to show all photo thumbnail items. When click on item, I use transition for imageview in this item to Detail activity. The problem is that image source is gotten from internet by UIL. And sometime (not always) the images not reload correct size like this: // on view holder item click final Pair<View, String>[] pairs = TransitionHelper.createSafeTransitionParticipants(this, false, new Pair<>(((ItemViewHolder) viewHolder).thumbnail, getString(R.string.TransitionName

When using overridePendingTransition, modifying UI views in the called activity is very slow

自闭症网瘾萝莉.ら 提交于 2019-12-22 18:38:33
问题 a few days ago, I had a problem with updating an Action Bar menu icon based on the result of an AsyncTask : Updating Action Bar Menu Item due to AsyncTask result without delay Now I realized that this problem is not at all related to an AsyncTask or an Action Bar . The problem occurs as well if I want to change a TextView or any other View . After some time of trial and error I realized that the problem is caused by overridePendingTransition which I use in the Activity which calls the second

When using overridePendingTransition, modifying UI views in the called activity is very slow

你。 提交于 2019-12-22 18:38:14
问题 a few days ago, I had a problem with updating an Action Bar menu icon based on the result of an AsyncTask : Updating Action Bar Menu Item due to AsyncTask result without delay Now I realized that this problem is not at all related to an AsyncTask or an Action Bar . The problem occurs as well if I want to change a TextView or any other View . After some time of trial and error I realized that the problem is caused by overridePendingTransition which I use in the Activity which calls the second