protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.fullscreen_imageviewer); imageView = (ImageView)FindViewById(Resource.Id.image); fullToolbar = (Toolbar)FindViewById(Resource.Id.fullscreen_toolbar); SetSupportActionBar(fullToolbar); SupportActionBar.SetDisplayHomeAsUpEnabled(true); var loupe = new Loupe(imageView); loupe.UseDismissAnimation = false; loupe.OnViewTranslateListener = new OnViewTranslateListener((v1) => { SupportFinishAfterTransition(); }, null, null, null); try { Bundle extras = Intent.Extras; int type = extras.GetInt(Constants.PARCEL_TYPE); switch (type) { case 0: PostParcelable postParcel = (PostParcelable)extras.GetParcelable(Constants.POST_DATA_EXTRA); Glide.With(this).Load(postParcel.PostItem.DownloadUrl).Into(imageView); break; default: ProfileParcelable profileParcel = (ProfileParcelable)extras.GetParcelable(Constants.PROFILE_DATA_EXTRA); Glide.With(this).Load(profileParcel.UserProfile.ProfileImgUrl).Into(imageView); break; } string imageTransitionName = extras.GetString(Constants.TRANSITION_NAME); imageView.TransitionName = imageTransitionName; } catch (Exception e) { Toast.MakeText(this, e.Message, ToastLength.Short).Show(); } }
void Start() { //座標を記憶、初期スケールに設定 startNormalScale = transform.localScale; startFullScale = new Vector3(119f, 76f, 0f); startScale = startNormalScale; startPos = transform.localPosition; //ボタン座標を記録 FullscrrenObjectStartPosLocal = FullscrrenObject.transform.localPosition; FullscrrenObjectStartPos = new Vector3(-0.1732039f, 36.17097f, 90f); //インスタンス取得 desktop = GetComponent <uDesktopDuplication.Texture>(); loupe = GetComponent <Loupe>(); //uDD公式ルーペ FreeLoupe = GetComponent <FreeLoupeWorkerScript>(); //自作フリールーペ //初期状態設定 loupe.enabled = false; desktop.useClip = false; fullscreen = false; zoom = false; }