Get data from items in inflate loop
===

I have some problems getting the data from all my items in my inflated view. 
First I inflated TableLayout which I add new TableRows in with 7 different items in landscape mode. I assign these 7 with a .setTag(i) from the for-loop which runs 10 times. But now im trying to get the information from my spinner, textview's, editText's and to bind a button. Here an example from my code:

    for (int i = 1; i < 11; i++) {
			row = new TableRow(this);
			row.setMinimumWidth(10);

			// Number (TextView)
			number = new TextView(Monday.this);
			number.setLayoutParams(new TableRow.LayoutParams(5, 50, 1f));
			number.setTag(i);
			number.setText(Integer.toString(i));
			number.setGravity(Gravity.CENTER | Gravity.BOTTOM);
			row.addView(number);

			// Area (Spinner)
			area = new Spinner(Monday.this);
			area.setTag(i);
			ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(
					this, android.R.layout.simple_spinner_dropdown_item,
					spinnerArray);
			area.setLayoutParams(new TableRow.LayoutParams(100, 60, 1f));
			area.setAdapter(spinnerArrayAdapter);
			area.setPrompt("Select");
			area.setOnItemSelectedListener(areaSpinnerListener);
			row.addView(area);

			// Exercise (TextView) Clickable
			exercise = new TextView(Monday.this);
			exercise.setTag(i);
			exercise.setLayoutParams(new TableRow.LayoutParams(200,
					TableRow.LayoutParams.WRAP_CONTENT, 1f));
			exercise.setMaxWidth(200);
			exercise.setSingleLine(true);
			exercise.setText("Exercise aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
			exercise.setOnClickListener(exerciseListener);
			row.addView(exercise);

			// Set/km (EditText "Numbers")
			set = new EditText(Monday.this);
			set.setTag(i);
			set.setLayoutParams(new TableRow.LayoutParams(5,
					TableRow.LayoutParams.WRAP_CONTENT, 1f));
			set.setWidth(5);
			set.setGravity(Gravity.CENTER);
			set.setInputType(InputType.TYPE_CLASS_NUMBER);
			set.setText("");
			set.setLines(1);
			// set.setOnc
			row.addView(set);

			// X separator
			x = new TextView(Monday.this);
			// x.setId(i);
			x.setLayoutParams(new TableRow.LayoutParams(5, 60, 1f));
			x.setGravity(Gravity.CENTER);
			x.setText("x");
			row.addView(x);

			// Reps/min (EditText "Numbers")
			reps = new EditText(Monday.this);
			reps.setTag(i);
			reps.setLayoutParams(new TableRow.LayoutParams(5,
					TableRow.LayoutParams.WRAP_CONTENT, 1f));
			reps.setWidth(5);
			reps.setGravity(Gravity.CENTER);
			reps.setInputType(InputType.TYPE_CLASS_NUMBER);
			reps.setText("");
			reps.setLines(1);
			row.addView(reps);

			// Info button (Button)
			info = new Button(Monday.this);
			info.setTag(i);
			info.setLayoutParams(new TableRow.LayoutParams(100, 70, 1f));
			info.setText("Info");
			info.setOnClickListener(infoButtonListener);
			row.addView(info);

			// Add row to table
			layout.addView(row);
			row.setBackgroundColor(getResources().getColor(R.color.white));
		}

I have started to make some OnClickListeners for my Spinner, TextView and Button.


		    OnItemSelectedListener areaSpinnerListener = new OnItemSelectedListener() {
			public void onNothingSelected(AdapterView<?> arg0) {
				// Nothing selected
			}

			public void onItemSelected(AdapterView<?> parent, View view,
					int pos, long id) {
				for (int i = 1; i < 11; i++) {
					if (((Spinner) parent).getTag().equals(i)) {
						selectedArea = parent.getItemAtPosition(pos).toString();
						Log.v(LOG_TAG, "Spinner: " + i + " and selected: "
								+ selectedArea);
					}
				}
			}
		};

		// Exercise Listener
		OnClickListener exerciseListener = new OnClickListener() {
			public void onClick(View v) {
				for (int i = 1; i < 11; i++) {
					if (((TextView) v).getTag().equals(i)) {
						selectedExercise = ((TextView) v).getText().toString();
						Log.v(LOG_TAG, "Exercise: " + i
								+ " clicked and choosen: " + selectedExercise);
					}
				}
			}
		};

    // Info button Listener
		OnClickListener infoButtonListener = new OnClickListener() {
			public void onClick(View v) {
				for (int i = 1; i < 11; i++) {
					if (((Button) v).getTag().equals(i)) {
						Log.v(LOG_TAG, "Info button: " + i + " clicked!");
					}
				}
			}
		};

Here is the button that gets push and all of the needed things should be gathered and later saved to a file.

    save = (Button) mainlayout.findViewById(R.id.saveButton);
		save.setOnClickListener(this);
	}

	
	
	public void onClick(View v) {
		String dataArea, dataExercise, dataSet, dataReps;
		//Get info from all the items need and save them some where handy!	
		// Save if pushed = get data from all the needed items and save them to a textfile
		//1 TableRow = 1 Row in textfile
		if(v == save) {
			for(int i = 1; i<11; i++) {
			Log.v(LOG_TAG, "Save Clicked");
			
			//Area spinner
			
			//Exercise Text
			
			//Set box
			dataSet = set.getTag(i).toString(); //Need to do .getText() some how??
			Log.v(LOG_TAG, "set: "+i);
			
			//Reps box
			
			
			//Info box
			}
		}
	}