StringElement not visible in DialogSampleApp
Closed this issue · 1 comments
I have downloaded the Zip created last month and tried to test it on the Google Nexus 7. What I find is the elements all appear to work (including the radiogroup which I believe did not do so on a previous version) except for StringElement. I have checked the XML file and tried to modify this without success except I could get the background color to change by inserting the appropriate command into dialog_labelfieldright.xml but the text and the value remained invisible no matter to what color I change it to.
I am not sure whether this is a symptom of the Nexus 7 but it is very surprising to see that no one has reported this as an issue so far.
I am new to githib and don't know how to show people the captured screen image or I would do so if directed.
Having explored the code more and looked carefully at the interaction with the resources I notice that the GetView override procedure for the StringElement class is returning a FontSize of 0! I therefore forced the textsize to be of a certain value as in the following snippet:-
public override View GetView(Context context, View convertView, ViewGroup parent)
{
View view = DroidResources.LoadStringElementLayout(context, convertView, parent, LayoutId, out _caption, out _text);
if (view != null)
{
_caption.Text = Caption;
_caption.TextSize = 18;// FontSize;
_text.Text = Value;
_text.TextSize = 18;// FontSize;
if (Click != null)
view.Click += delegate { this.Click(); };
}
return view;
}
This has the desired effect of now showing all the StringElement instances including the HtmlElement too. I do not know why this should be. If anyone can shed light on this I would be most grateful.