[mono-android] App Hanging

Fencer04 fencer04 at gmail.com
Tue Jan 17 19:17:10 UTC 2012


I am calling a webservice and getting 729 results in an array. I'm then out
putting these results in to a 2 column table dynamically. Each time I run it
chokes somewhere between the 548th and 569th row when setting the text of
either the 1st or second column like this: 

resultView1.Text = outcome.PercentageRatio;

It will also show a window asking if I want to wait while the debugger is
hung on the expression "Method: Java.Lang.Object.ToString

Nothing is null and the services is returning the data that I expect. Can
someone help me out. My code is below.

                        int rowCount = 0;
			TextView resultView1 = null;
			TextView resultView2 = null;
			foreach(GeneticOutcomes outcome in results){
				TableRow row = new TableRow(this);
				row.SetPadding(0, 10, 0, 0);
				resultView1 = new TextView(this);
				resultView1.SetTextColor(Color.White.ToArgb());
				resultView1.SetTextSize(Android.Util.ComplexUnitType.Sp, 16);
				//resultView1.LayoutParameters = new
TableRow.LayoutParams(TableRow.LayoutParams.WrapContent, 20);
				resultView1.SetPadding(0, 0, 5, 0);
				resultView1.Text = outcome.PercentageRatio;
				row.AddView(resultView1);
				resultView2 = new TextView(this);
				resultView2.SetTextColor(Color.White.ToArgb());
				resultView2.SetTextSize(Android.Util.ComplexUnitType.Sp, 16);
				float scale = Resources.DisplayMetrics.Density;
				int pixels = (int)((325 - resultView1.Width) * scale + 0.5f);
				//resultView2.LayoutParameters = new TableRow.LayoutParams(pixels, 20);
				resultView2.SetPadding(3,0,40,0);
				resultView2.Text = outcome.GeneticString;
				row.AddView(resultView2);
				resultTable.AddView(row);
				rowCount = rowCount + 1;
			}
			ll.AddView(resultTable);

--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/App-Hanging-tp5152606p5152606.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list