whenever i set rowTextView.setText(" row value #" + str); then arraylist last value showing there . My listdata are 60,65,70,75,80 . only last value showing there .I want all data .How can i achive this ????
int size = al_getAllProductSize.size(); System.out.println("The size of array is: " + size); for (int i = 0; i < size; i++) { } final int N = 5; // total number of textviews to add final TextView[] myTextViews = new TextView[N]; // create an empty array; for (int i = 0; i < N; i++) { final TextView rowTextView = new TextView(MainActivity.this); for (String str : al_getAllProductSize) { rowTextView.setText(" row value #" + str); // i want all value through loop } ll_textViewObj.addView(rowTextView); // save a reference to the textview for later myTextViews[i] = rowTextView; }