[mono-android] factory.Inflate issue

2013-05-15 Thread Paul Johnson

Hi,

I have some code that generates the UI on the fly. The first time it 
runs, it runs a treat. However when I run it again or add something to 
the top view, things get messed up (the objects that need to be inflated 
become *tiny* at the top but the last object is the correct size)


My code to do this is this

if (clearFirst)
{
RunOnUiThread(delegate {
topListLayout.RemoveAllViewsInLayout();
bottomListLayout.RemoveAllViewsInLayout();
});
}

if (myCircles.Count == 0)
{

myView = 
factory.Inflate(Resource.Layout.circleaddFragment, null);

LinearLayout shell = new LinearLayout(context);

shell.Orientation = Orientation.Horizontal;
shell.SetGravity(GravityFlags.CenterVertical);
shell.LayoutParameters = new 
LinearLayout.LayoutParams(LinearLayout.LayoutParams.WrapContent, 
LinearLayout.LayoutParams.WrapContent);
shell.SetPadding(0, 0, 0, 
(int)GeneralUtils.convertDpToPixel(5f, context));


ImageView circleAdd = 
myView.FindViewById(Resource.Id.imageCircleAdd);
circleAdd.Click += (object sender, EventArgs e) => 
createCircle(sender, e);

RunOnUiThread(() => shell.AddView(myView));
RunOnUiThread(()=>topListLayout.AddView(shell));
}
else
{
RunOnUiThread(delegate {

LinearLayout topLay = new LinearLayout(context);
topLay.LayoutParameters = new 
LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, 
ViewGroup.LayoutParams.WrapContent);


topLay.SetPadding((int)GeneralUtils.convertDpToPixel(5f, context), 0, 
(int)GeneralUtils.convertDpToPixel(5f, context), 0);

foreach (Circles circle in myCircles)
{
myView = 
factory.Inflate(Resource.Layout.circleFragment, null);


TextView txtCirc = 
myView.FindViewById(Resource.Id.textCircleName);


txtCirc.Text = myCircles[count].ShortName;
ImageView imgCirc = 
myView.FindViewById(Resource.Id.imageCircle);

int m = new int();
m = count;
imgCirc.Tag = m;
imgCirc.Click += displayMyCircle;

topLay.AddView(myView);
if (count == myCircles.Count || topLay.ChildCount == 3)
{
topListLayout.AddView(topLay);
topLay = new LinearLayout(context);
topLay.Orientation = 
Android.Widget.Orientation.Horizontal;

topLay.SetGravity(GravityFlags.CenterHorizontal);
}
count++;
}
myView = 
factory.Inflate(Resource.Layout.circleaddFragment, null);
TextView txtCircAdd = 
myView.FindViewById(Resource.Id.textCircleName);
txtCircAdd.Text = 
GeneralUtils.StringFromInt(Resource.String.circleAdd);
ImageView imgCircAdd = 
myView.FindViewById(Resource.Id.imageCircleAdd);

imgCircAdd.Click += createCircle;
topLay.AddView(myView);
topListLayout.AddView(topLay);
});
}

RunOnUiThread(delegate {
count = 0;

LinearLayout botLay = new LinearLayout(context);
botLay.LayoutParameters = new 
LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, 
ViewGroup.LayoutParams.WrapContent);


botLay.SetPadding((int)GeneralUtils.convertDpToPixel(5f, context), 0, 
(int)GeneralUtils.convertDpToPixel(5f, context), 0);

foreach (Circles circle in OClientData.CirclesList)
{
myView = 
factory.Inflate(Resource.Layout.circleFragment, null);
TextView txtCirc = 
myView.FindViewById(Resource.Id.textCircleName);


txtCirc.Text = 
OClientData.CirclesList[count].ShortName;
ImageView imgCirc = 
myView.FindViewById(Resource.Id.imageCircle);

int m = new int();
m = count;
imgCirc.Tag = m;
imgCirc.Click += displayPublicCircle;

botLay.AddView(myView);
if (count == OClientData.CirclesList.Count || 
botLay.ChildCount == 3)

{
bottomListLayout.AddView(botLay);
botLay = new LinearLayout(context);
botLay.Orientation = 
Android.Widget.Orientation.Horizontal;

botLay.SetGravity(GravityFlags.CenterHorizontal);
}
if (count + 1 == OClientData.CirclesList.Count)
break;
  

Re: [mono-android] Slow Build- und Packaging-Process & few other things after update

2013-05-15 Thread JLee
I've spend a lot of time providing xamarin informationen to help them fix the
problem.
I even provided them a modified version of my project, which with the
problem can be reproduced (I could).
But since the weekend befor last I have heard nothing from them.
I contacted them several times to get at least a short feedback about the
actual state of investigationnothing.

I have to manage a huge project-size with mfa and am not able to update to
newer mono-versions.
2-4 minutes build-time for every single debug-build is unworthy of
discussion.

...










--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Slow-Build-und-Packaging-Process-few-other-things-after-update-tp5713139p5713312.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Slow Build- und Packaging-Process & few other things after update

2013-05-15 Thread Jonathan Pryor
On May 15, 2013, at 4:47 PM, JLee  wrote:
> But since the weekend befor last I have heard nothing from them. I contacted 
> them several times to get at least a short feedback about the actual state of 
> investigationnothing.

Do you have a spam filter or something? I've sent you 3 messages since May 5th, 
and all your replies since then strongly indicate that you haven't seen any of 
my responses.

I know I've replied. Are they being received?

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid