コード例 #1
0
ファイル: MainActivity.cs プロジェクト: hasnain2663/spikes
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);

            _layout = FindViewById<ViewGroup>(Resource.Id.myview);

            _viewTop = FindViewById(Resource.Id.header);
            _viewBottom = FindViewById(Resource.Id.footer);

            var tx = new LayoutTransition();
            _layout.LayoutTransition = tx; // This is the magic.  So easy.

            _tag = new Tag("tag");
            _tv = new TextView(this)
            {
                Text = "Now I'm here",
                Tag = _tag,
            };
        }
コード例 #2
0
		protected override void OnLayout (bool changed, int l, int t, int r, int b)
		{
			base.OnLayout (changed, l, t, r, b);
			Log.Debug (TAG, "OnLayout: " + changed);

			if (changed && !mLayouted) {
				mLayouted = true;

				ObjectAnimator animator;
				LayoutTransition layoutTransition = new LayoutTransition ();

				animator = mAnimators.GetDisappearingAnimator (Context);
				layoutTransition.SetAnimator (LayoutTransitionType.Disappearing, animator);

				animator = mAnimators.GetAppearingAnimator (Context);
				layoutTransition.SetAnimator (LayoutTransitionType.Appearing, animator);

				layoutTransition.AddTransitionListener (mTransitionListener);

				if (animator != null)
					layoutTransition.SetDuration (animator.Duration);

				LayoutTransition = layoutTransition;

				if (mShowInitialAnimation)
					RunInitialAnimations ();

				if (mFirstVisibleCardTag != null) {
					ScrollToCard (mFirstVisibleCardTag);
					mFirstVisibleCardTag = null;
				}
			}
		}
コード例 #3
0
		public void StartTransition (LayoutTransition transition, ViewGroup container, View view, LayoutTransitionType transitionType)
		{
			if (StartTransitionAction != null) {
				StartTransitionAction (transition, container, view, transitionType);
			}
		}
コード例 #4
0
 static LayoutTransition CreateLayoutTransaction()
 {
     var layoutTransition = new LayoutTransition();
     //layoutTransition.SetAnimator(LayoutTransitionType.Appearing, new Animator(
     return layoutTransition;
 }