private ImageView trackImage = null;
private ImageView progressImage = null;
private ImageView bufferImage = null;
- private ImageVisual indeterminateImage = null;
+ private ImageView indeterminateImage = null;
private float maxValue = 100;
private float minValue = 0;
private float currentValue = 0;
}
else
{
- return indeterminateImage?.URL;
+ return indeterminateImage?.ResourceUrl;
}
}
set
}
else
{
- indeterminateImage.URL = value;
+ indeterminateImage.ResourceUrl = value;
}
}
}
Debug.Assert(trackImage != null);
Debug.Assert(progressImage != null);
Debug.Assert(bufferImage != null);
+ Debug.Assert(indeterminateImage != null);
trackImage.ApplyStyle(progressStyle.Track);
progressImage.ApplyStyle(progressStyle.Progress);
if (null != indeterminateImage && null != progressStyle.IndeterminateImageUrl)
{
- indeterminateImage.URL = progressStyle.IndeterminateImageUrl;
+ indeterminateImage.ResourceUrl = progressStyle.IndeterminateImageUrl;
}
}
}
Utility.Dispose(trackImage);
Utility.Dispose(progressImage);
Utility.Dispose(bufferImage);
- indeterminateImage = null;
+ Utility.Dispose(indeterminateImage);
}
//You must call base.Dispose(type) just before exit.
if (null != indeterminateImage)
{
- indeterminateAnimation = AnimateVisual(indeterminateImage, "pixelArea", destinationValue, 0, 1000, AlphaFunction.BuiltinFunctions.Default, initialValue);
+ if (indeterminateAnimation == null)
+ {
+ indeterminateAnimation = new Animation(2000);
+ }
+
+ float destination = (this.SizeWidth - indeterminateImage.SizeWidth);
+
+ KeyFrames keyFrames = new KeyFrames();
+ keyFrames.Add(0.0f /* 0%*/, new Position(0, 0));
+ AlphaFunction ease = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseInOut);
+ keyFrames.Add(0.5f /* 50%*/, new Position(destination, 0), ease);
+ keyFrames.Add(1.0f /*100%*/, new Position(0, 0), ease);
+ ease.Dispose();
+
+ indeterminateAnimation.AnimateBetween(indeterminateImage, "Position", keyFrames);
indeterminateAnimation.Looping = true;
indeterminateAnimation.Play();
}
if (null != indeterminateImage)
{
- indeterminateImage.Opacity = 0.0f;
+ indeterminateImage.Hide();
}
progressImage.Hide();
bufferImage.Hide();
if (null != indeterminateImage)
{
- indeterminateImage.Opacity = 0.0f;
+ indeterminateImage.Hide();
}
progressImage.Hide();
bufferImage.Show();
if (null != indeterminateImage)
{
- indeterminateImage.Opacity = 0.0f;
+ indeterminateImage.Hide();
}
bufferImage.Hide();
progressImage.Show();
progressImage.Hide();
if (null != indeterminateImage)
{
- indeterminateImage.Opacity = 1.0f;
+ indeterminateImage.Show();
}
UpdateIndeterminateAnimation();
private void InitializeIndeterminate()
{
- indeterminateImage = new ImageVisual
+ indeterminateImage = new ImageView
{
- PixelArea = new Vector4(0.0f, 0.0f, 10.0f, 1.0f),
- WrapModeU = WrapModeType.Repeat,
- SizePolicy = VisualTransformPolicyType.Relative,
- Origin = Visual.AlignType.Center,
- AnchorPoint = Visual.AlignType.Center,
- Opacity = 0.0f,
- Size = new Size2D(1, 1),
- URL = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "nui_component_default_progress_indeterminate.png"
+ Size = new Size(16, 16),
+ PositionUsesPivotPoint = true,
+ ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
+ PivotPoint = Tizen.NUI.PivotPoint.CenterLeft
};
- AddVisual("Indeterminate", indeterminateImage);
+ trackImage.Add(indeterminateImage);
+ indeterminateImage.Hide();
if (state == ProgressStatusType.Indeterminate)
{
- indeterminateImage.Opacity = 1.0f;
+ indeterminateImage.Show();
}
}
}
// Progress base style
theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
{
- Size = new Size(200, 25),
+ Size = new Size(508, 16),
Track = new ImageViewStyle()
{
- BorderlineWidth = 0.5f,
- BorderlineColor = new Color(0.92f, 0.93f, 0.94f, 1.0f),
+ CornerRadius = 8.0f,
BackgroundColor = new Selector<Color>()
{
- Normal = new Color(1.0f, 1.0f, 1.0f, 0.5f),
- Disabled = new Color(0.73f, 0.76f, 0.79f, 1),
+ Normal = new Color(0.82f, 0.31f, 0.0f, 0.1f),
+ Disabled = new Color(0.82f, 0.31f, 0.0f, 0.1f),
},
},
Buffer = new ImageViewStyle()
{
- BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 0.3f),
+ CornerRadius = 8.0f,
+ BackgroundColor = new Color(0.82f, 0.31f, 0.0f, 0.1f),
},
Progress = new ImageViewStyle()
{
- BackgroundColor = new Color(0.03f, 0.05f, 0.29f, 1),
+ CornerRadius = 8.0f,
+ BackgroundColor = new Color("#D25000"),
},
- IndeterminateImageUrl = FrameworkInformation.ResourcePath + "nui_component_default_progress_indeterminate.png",
+ IndeterminateImageUrl = FrameworkInformation.ResourcePath + "IoT_progress_indeterminate.png",
});
// RadioButton base style
// Loading base style
theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
{
- LoadingSize = new Size(100, 100),
+ LoadingSize = new Size(200, 200),
});
// Pagination base style
},
};
- // CheckBox examples.
+ // Progress examples.
bufferingProgress = new Progress()
{
MinValue = 0,
MaxValue = 100,
BufferValue = 10,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
ProgressState = Progress.ProgressStatusType.Buffering,
};
rootContent.Add(bufferingProgress);
MinValue = 0,
MaxValue = 100,
CurrentValue = 80,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
ProgressState = Progress.ProgressStatusType.Determinate,
};
rootContent.Add(determinatedProgress);
{
MinValue = 0,
MaxValue = 100,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
ProgressState = Progress.ProgressStatusType.Indeterminate,
};
rootContent.Add(indeterminatedProgress);
MinValue = 0,
MaxValue = 100,
IsEnabled = false,
- ProgressState = Progress.ProgressStatusType.Indeterminate,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ ProgressState = Progress.ProgressStatusType.Determinate,
};
rootContent.Add(disabledProgress);
Content = rootContent;