public static OnBoardingFragment NewInstance(OnBoardingCard card) { var args = new Bundle(); args.PutString(PageTitle, card.GetTitle()); args.PutString(PageDescription, card.GetDescription()); args.PutInt(PageTitleResId, card.GetTitleResourceId()); args.PutInt(PageDescriptionResId, card.GetDescriptionResourceId()); args.PutInt(PageTitleColor, card.GetTitleColor()); args.PutInt(PageDescriptionColor, card.GetDescriptionColor()); args.PutInt(PageImageResId, card.GetImageResourceId()); args.PutFloat(PageTitleTextSize, card.GetTitleTextSize()); args.PutFloat(PageDescriptionTextSize, card.GetDescriptionTextSize()); args.PutInt(PageBackgroundColor, card.GetBackgroundColor()); args.PutInt(PageIconHeight, card.GetIconHeight()); args.PutInt(PageIconWidth, card.GetIconWidth()); args.PutInt(PageMarginLeft, card.GetMarginLeft()); args.PutInt(PageMarginRight, card.GetMarginRight()); args.PutInt(PageMarginTop, card.GetMarginTop()); args.PutInt(PageMarginBottom, card.GetMarginBottom()); var fragment = new OnBoardingFragment { Arguments = args }; return(fragment); }
protected override void OnSaveInstanceState(Bundle outState) { outState.PutInt("iterator", iterator); outState.PutInt("time", time); outState.PutFloat("HeroPositionX", heroImage.TranslationX); outState.PutFloat("HeroPositionY", heroImage.TranslationY); base.OnSaveInstanceState(outState); }
protected override IParcelable OnSaveInstanceState() { Bundle bundle = new Bundle(); bundle.PutParcelable("superState", base.OnSaveInstanceState()); bundle.PutFloat("value", value); bundle.PutFloat("needleValue", needleValue); return(bundle); }
/// <summary> /// Overridden to save instance state when device orientation changes. This method is called automatically if you /// assign an id to the RangeSliderControl widget using the Id. Other members of this class than the normalized min and /// max values don't need to be saved. /// </summary> protected override IParcelable OnSaveInstanceState() { var bundle = new Bundle(); bundle.PutParcelable("SUPER", base.OnSaveInstanceState()); bundle.PutFloat("MIN", NormalizedMinValue); bundle.PutFloat("MAX", NormalizedMaxValue); return(bundle); }
protected override IParcelable OnSaveInstanceState() { var bundle = new Bundle(); bundle.PutParcelable(INSTANCE_STATE_SAVEDSTATE, base.OnSaveInstanceState()); bundle.PutFloat(INSTANCE_STATE_PROGRESS, Progress); bundle.PutFloat(INSTANCE_STATE_MARKER_PROGRESS, MarkerProgress); return(bundle); }
protected override IParcelable OnSaveInstanceState() { var bundle = new Bundle(); bundle.PutParcelable("View", base.OnSaveInstanceState()); bundle.PutFloat("StrokeRadius", _strokeRadius); bundle.PutFloat("StrokeWidth", _strokeWidth); bundle.PutFloat("TextSize", _textSize); bundle.PutInt("SelectedColor", _selectedColor); bundle.PutInt("SelectedTab", _selectedTab); return(bundle); }
protected override IParcelable OnSaveInstanceState() { Bundle bundle = new Bundle(); bundle.PutParcelable("saved_state", base.OnSaveInstanceState()); bundle.PutFloat("progress", _progress); bundle.PutFloat("marker_progress", _markerProgress); bundle.PutInt("progress_color", _progressColor); bundle.PutInt("progress_background_color", _progressBackgroundColor); bundle.PutBoolean("thumb_visible", _isThumbEnabled); bundle.PutBoolean("marker_visible", _isMarkerEnabled); return(bundle); }
protected override IParcelable OnSaveInstanceState() { var state = new Bundle(); state.PutParcelable("instanceState", base.OnSaveInstanceState()); state.PutInt("alpha", _alpha); state.PutFloat("hue", _hue); state.PutFloat("sat", _sat); state.PutFloat("val", _val); state.PutBoolean("show_alpha", _showAlphaPanel); state.PutString("alpha_text", _alphaSliderText); return(state); }
protected override IParcelable OnSaveInstanceState() { IParcelable superState = base.OnSaveInstanceState(); Bundle state = new Bundle(); state.PutParcelable("superState", superState); state.PutBoolean("needleInitialized", mNeedleInitialized); state.PutFloat("needleVelocity", mNeedleVelocity); state.PutFloat("needleAcceleration", mNeedleAcceleration); state.PutLong("needleLastMoved", mNeedleLastMoved); state.PutFloat("currentValue", mCurrentValue); state.PutFloat("targetValue", mTargetValue); return(state); }
protected override IParcelable OnSaveInstanceState() { var bundle = new Bundle(); bundle.PutParcelable("instanceState", base.OnSaveInstanceState()); bundle.PutFloat("saveScale", _normalizedScale); bundle.PutFloat("matchViewHeight", _matchViewHeight); bundle.PutFloat("matchViewWidth", _matchViewWidth); bundle.PutInt("viewWidth", ViewWidth); bundle.PutInt("viewHeight", ViewHeight); _matrix.GetValues(_m); bundle.PutFloatArray("matrix", _m); bundle.PutBoolean("imageRendered", _imageRenderedAtLeastOnce); return(bundle); }
private void OnPickAddNewPlaceButton(object sender, EventArgs e) { foreach (var item in _imagesStorage) { Images image = new Images() { ImageBytes = item, PlaceName = _nameOfPlace.Text }; _db.InsterIntoTableImage(image); } var images = _db.selectTableImages(); String name = Intent.GetStringExtra("name"); //Intent data = new Intent(); Intent data = new Intent(); Bundle extras = new Bundle(); Bundle extras2 = new Bundle(); extras.PutString("name", name); //extras.PutInt("PlaceId", _nameOfPlace.Id); extras.PutString("PlaceName", _nameOfPlace.Text); extras.PutFloat("ratingText", _ratingBar.Rating); extras.PutString("locationPlaceName", _placeName.Text); extras.PutString("secondLocationPlaceName", _placeSecondName.Text); extras.PutString("description", _description.Text); extras.PutDouble("latitude", picked.Latitude); extras.PutDouble("longitude", picked.Longitude); data.PutExtras(extras); SetResult(Result.Ok, data); Finish(); }
/// <summary> /// 设置进度 /// </summary> /// <param name="value">进度</param> /// <returns></returns> internal bool SetProgress(float value) { var bundle = new Bundle(); bundle.PutFloat(ActionArgumentProgressValue, value); return(PerformAction(AccessibilityActionCompat.ActionSetProgress.Id, bundle)); }
protected override IParcelable OnSaveInstanceState() { var bundle = new Bundle(); bundle.PutParcelable("superState", base.OnSaveInstanceState()); bundle.PutFloat("previousWidth", _screenWidth); bundle.PutString("vectorStringData", _vectorStringData); return(bundle); }
public static Android.Support.V4.App.Fragment newInstance(MainActivity context, int pos, float scale,bool IsBlured) { Bundle b = new Bundle(); b.PutInt("pos", pos); b.PutFloat("scale", scale); b.PutBoolean("IsBlured", IsBlured); MyFragment myf = new MyFragment (); return Android.Support.V4.App.Fragment.Instantiate (context,myf.Class.Name, b); }
private CarouselFragment NewFragmentInstance(float scale, bool isBlured, string coffeeName) { CarouselFragment carouselFragment = new CarouselFragment(); Bundle bundle = new Bundle(); bundle.PutFloat("SCALE", scale); bundle.PutBoolean("IS_BLURED", isBlured); bundle.PutString("COFFEE_NAME", coffeeName); carouselFragment.Arguments = bundle; return(carouselFragment); }
public static Android.Support.V4.App.Fragment newInstance(MainActivity context, int pos, float scale, bool IsBlured) { Bundle b = new Bundle(); b.PutInt("pos", pos); b.PutFloat("scale", scale); b.PutBoolean("IsBlured", IsBlured); MyFragment myf = new MyFragment(); return(Android.Support.V4.App.Fragment.Instantiate(context, myf.Class.Name, b)); }
public static ImageFragment NewInstance(string imagePath, float rotation) { Bundle args = new Bundle(); args.PutString(EXTRA_IMAGE_PATH, imagePath); args.PutFloat(EXTRA_IMAGE_ROTATION, rotation); ImageFragment fragment = new ImageFragment(); fragment.Arguments = args; fragment.SetStyle((int)DialogFragmentStyle.NoTitle, 0); return fragment; }
protected override void OnSaveInstanceState(Bundle outState) { base.OnSaveInstanceState(outState); Console.WriteLine("instance state saved"); if (map != null) { outState.PutDouble("centerLat", map.CameraPosition.Target.Latitude); outState.PutDouble("centerLon", map.CameraPosition.Target.Longitude); outState.PutFloat("centerZoom", map.CameraPosition.Zoom); outState.PutLong("lastUpdate", Utility.ToUnixTime(lastUpdate)); } }
protected override IParcelable OnSaveInstanceState() { IParcelable superState = base.OnSaveInstanceState(); Bundle state = new Bundle(); state.PutParcelable(STATE_PARENT, superState); state.PutFloatArray(STATE_COLOR, mHSVColor); float[] hsvColor = new float[3]; Color.ColorToHSV(new Color(mColor), hsvColor); if (hsvColor [1] < hsvColor [2]) { state.PutFloat(STATE_SATURATION, hsvColor [1]); } else { state.PutFloat(STATE_VALUE, hsvColor [2]); } return(state); }
public static Bundle ToBundle(this WifiLocation model) { var bundle = new Bundle(); bundle.PutBoolean(nameof(model.Enabled), model.Enabled); bundle.PutFloat(nameof(model.Accuracy), model.Accuracy); bundle.PutDouble(nameof(model.Lat), model.Lat); bundle.PutDouble(nameof(model.Lon), model.Lon); bundle.PutString(nameof(model.DisplayName), model.DisplayName); bundle.PutString(nameof(model.SSID), model.SSID); return(bundle); }
protected override IParcelable OnSaveInstanceState() { Bundle bundle = new Bundle(); bundle.PutParcelable(INSTANCE_STATE, base.OnSaveInstanceState()); bundle.PutInt(INSTANCE_TEXT_COLOR, getTextColor()); bundle.PutFloat(INSTANCE_TEXT_SIZE, getTextSize()); bundle.PutFloat(INSTANCE_INNER_BOTTOM_TEXT_SIZE, getInnerBottomTextSize()); bundle.PutFloat(INSTANCE_INNER_BOTTOM_TEXT_COLOR, getInnerBottomTextColor()); bundle.PutString(INSTANCE_INNER_BOTTOM_TEXT, getInnerBottomText()); bundle.PutInt(INSTANCE_INNER_BOTTOM_TEXT_COLOR, getInnerBottomTextColor()); bundle.PutInt(INSTANCE_FINISHED_STROKE_COLOR, getFinishedStrokeColor()); bundle.PutInt(INSTANCE_UNFINISHED_STROKE_COLOR, getUnfinishedStrokeColor()); bundle.PutInt(INSTANCE_MAX, getMax()); bundle.PutInt(INSTANCE_STARTING_DEGREE, getStartingDegree()); bundle.PutFloat(INSTANCE_PROGRESS, getProgress()); bundle.PutString(INSTANCE_SUFFIX, getSuffixText()); bundle.PutString(INSTANCE_PREFIX, getPrefixText()); bundle.PutString(INSTANCE_TEXT, getText()); bundle.PutFloat(INSTANCE_FINISHED_STROKE_WIDTH, getFinishedStrokeWidth()); bundle.PutFloat(INSTANCE_UNFINISHED_STROKE_WIDTH, getUnfinishedStrokeWidth()); bundle.PutInt(INSTANCE_BACKGROUND_COLOR, getInnerBackgroundColor()); bundle.PutInt(INSTANCE_INNER_DRAWABLE, getAttributeResourceId()); return(bundle); }
protected override IParcelable OnSaveInstanceState() { IParcelable superState = base.OnSaveInstanceState(); Bundle state = new Bundle(); state.PutParcelable(STATE_PARENT, superState); state.PutFloat(STATE_ANGLE, mAngle); state.PutInt(STATE_OLD_COLOR, mCenterOldColor); state.PutBoolean(STATE_SHOW_OLD_COLOR, mShowCenterOldColor); return(state); }
public static FloatViewFragment NewInstance(string titleLabel, float value) { var args = new Bundle(); args.PutString("titleLabel", titleLabel); args.PutFloat("value", value); var f = new FloatViewFragment { Arguments = args, ShowsDialog = true }; return f; }
public static ImageFragment NewInstance(string imagePath, float rotation) { Bundle args = new Bundle(); args.PutString(EXTRA_IMAGE_PATH, imagePath); args.PutFloat(EXTRA_IMAGE_ROTATION, rotation); ImageFragment fragment = new ImageFragment(); fragment.Arguments = args; fragment.SetStyle((int)DialogFragmentStyle.NoTitle, 0); return(fragment); }
/// <inheritdoc /> public bool SetFloat(float value, [CallerMemberName] string?key = null) { if (key == null) { throw new ArgumentNullException(nameof(key)); } var existingValue = GetFloat(key: key); if (Math.Abs(existingValue - value) > ComparisonTolerance || !ContainsKey(key)) { _bundle.PutFloat(key, value); OnPropertyChanged(key); return(true); } return(false); }
public bool SetFloat(float value, string?key = null) { if (string.IsNullOrWhiteSpace(key)) { throw new ArgumentException("Value cannot be null or whitespace.", nameof(key)); } var existingValue = GetFloat(key: key); if (Math.Abs(existingValue - value) > ComparisonTolerance || !ContainsKey(key)) { _bundle.PutFloat(key, value); OnPropertyChanged(key); return(true); } return(false); }
/// <summary> /// Compare similarity of skeletons /// </summary> /// <param name="skeletons"></param> public void CompareSimilarity(List <MLSkeleton> skeletons) { if (templateList == null) { return; } float similarity = 0f; float result = analyzer.CaluteSimilarity(skeletons, templateList); if (result > similarity) { similarity = result; } Message msg = Message.Obtain(); Bundle bundle = new Bundle(); bundle.PutFloat("similarity", similarity); msg.Data = bundle; msg.What = LiveSkeletonAnalyseActivity.UpdateView; mHandler.SendMessage(msg); }
private void PutToBundle(Bundle bundle, string name, object?value) { switch (value) { case bool @bool: bundle.PutBoolean(name, @bool); break; case byte @byte: bundle.PutShort(name, @byte); break; case sbyte @sbyte: bundle.PutByte(name, @sbyte); break; case short @short: bundle.PutShort(name, @short); break; case ushort @ushort: bundle.PutInt(name, @ushort); break; case int @int: bundle.PutInt(name, @int); break; case uint @uint: bundle.PutLong(name, @uint); break; case long @long: bundle.PutLong(name, @long); break; case ulong @ulong: if (@ulong > long.MaxValue) { throw new OverflowException(); } bundle.PutLong(name, (long)@ulong); break; case float @float: bundle.PutFloat(name, @float); break; case double @double: bundle.PutDouble(name, @double); break; case decimal @decimal: bundle.PutDouble(name, decimal.ToDouble(@decimal)); break; case string @string: bundle.PutString(name, @string); break; case IEnumerable <IDictionary <string, object> > dictionaries: { var bundles = new List <Bundle>(); foreach (var dictionary in dictionaries) { var newBundle = new Bundle(); foreach (var(key, val) in dictionary) { PutToBundle(newBundle, key, val); } bundles.Add(newBundle); } bundle.PutParcelableArray(name, bundles.ToArray()); break; } default: throw new ArgumentOutOfRangeException(nameof(value), $"{value?.GetType().FullName ?? "null"} is not supported"); } }
protected override IParcelable OnSaveInstanceState () { Bundle bundle = new Bundle(); bundle.PutParcelable("saved_state", base.OnSaveInstanceState()); bundle.PutFloat("progress", _progress); bundle.PutFloat("marker_progress", _markerProgress); bundle.PutInt("progress_color", _progressColor); bundle.PutInt("progress_background_color", _progressBackgroundColor); bundle.PutBoolean("thumb_visible", _isThumbEnabled); bundle.PutBoolean("marker_visible", _isMarkerEnabled); return bundle; }
protected override IParcelable OnSaveInstanceState() { var bundle = new Bundle(); bundle.PutParcelable(INSTANCE_STATE_SAVEDSTATE, base.OnSaveInstanceState()); bundle.PutFloat(INSTANCE_STATE_PROGRESS, Progress); bundle.PutFloat(INSTANCE_STATE_MARKER_PROGRESS, MarkerProgress); return bundle; }
protected override void OnSaveInstanceState(Bundle outState) { outState.PutInt("steps", steps); outState.PutFloat("calories", calories); outState.PutFloat("speed", speed); outState.PutFloat("distance", distance); outState.PutLong("time", chrono.Base); outState.PutBoolean("run", run); base.OnSaveInstanceState(outState); }
protected override void OnSaveInstanceState(Bundle outState) { outState.PutFloat("step_count", count); outState.PutBoolean("visible", visible); base.OnSaveInstanceState(outState); }
protected override void OnSaveInstanceState (Bundle outState) { outState.PutFloat ("step_count", count); outState.PutBoolean ("visible", visible); base.OnSaveInstanceState (outState); }
protected override void OnSaveInstanceState(Bundle outState) { base.OnSaveInstanceState(outState); outState.PutInt("color", _badge.BackgroundColor.ToArgb()); outState.PutFloat("cornerRadius", _badge.CornerRadius); }