private TextLabelSelectorData selectorData;
private string fontFamily = defaultFontFamily;
private float fontSizeScale = 1.0f;
+
+ private bool textIsEmpty = true;
+
private bool hasSystemLanguageChanged = false;
private bool hasSystemFontSizeChanged = false;
private bool hasSystemFontTypeChanged = false;
public TextLabel(string text) : this(Interop.TextLabel.New(text, ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ textIsEmpty = string.IsNullOrEmpty(text);
}
/// <summary>
public TextLabel(string text, bool shown) : this(Interop.TextLabel.New(text, ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ textIsEmpty = string.IsNullOrEmpty(text);
SetVisible(shown);
}
{
var textLabel = (TextLabel)bindable;
- return Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.TEXT);
+ // Do not try to get string if we know that previous text was empty.
+ return textLabel.textIsEmpty ? "" : Object.InternalGetPropertyString(textLabel.SwigCPtr, TextLabel.Property.TEXT);
}));
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
{
if (value != null)
{
+ textIsEmpty = string.IsNullOrEmpty(value);
Object.InternalSetPropertyString(SwigCPtr, TextLabel.Property.TEXT, value);
RequestLayout();