I want to dynamically change the position of the textview
list dynamically. Here's what I have tried so far:
final TextView[] myTextViews = new TextView[N]; // create an empty array;
TextView rowTextView = new TextView(Oyun.this);
rowTextView = (TextView)findViewById(R.id.parent);
myTextViews[atesSayac].setText("This is row #" + atesSayac);
myTextViews[atesSayac] = rowTextView;
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams)myTextViews[atesSayac].getLayoutParams();
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);
RelativeLayout.LayoutParams layoutParams2 = (RelativeLayout.LayoutParams)myTextViews[atesSayac].getLayoutParams();
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
myTextViews[atesSayac].setLayoutParams(layoutParams);
myTextViews[atesSayac].setLayoutParams(layoutParams2);
myTextViews[atesSayac].setTranslationX(locationX);
myTextViews[atesSayac].setTranslationY(locationY);
atesEt.addView(myTextViews[atesSayac]);