# I want to create circle with words android [closed]

I have created circle with words but it work to slow. Here code of drawing this circle:

private final float STEP = 180f / 31f;
public final int TEXTVIEW_COUNT = 62;
private final float PI = (float) Math.PI;

private Context context;
private int textHeight;

public AngleCoordsLists(Context context, int textHeight) {
this.context = context;
this.textHeight = textHeight;
}

public void drawTranslation(float radius, int textViewWidth,
List<TextView> textviews, RelativeLayout wordsLayout,
int wordsCount, List<String> wordList) {
int diff = wordsCount - TEXTVIEW_COUNT;

for (int i = 0; i < TEXTVIEW_COUNT; i++) {
float angle = i * STEP;
* Math.cos((angle * PI) / 180);
* Math.sin((angle * PI) / 180);

TextView word = new TextView(context);
word.setWidth(textViewWidth);
word.setSingleLine();
word.setTextSize(13);
word.setTextColor(Color.BLACK);
if (i < 31) {
word.setText(wordList.get(i));
} else {
word.setText(wordList.get(i + diff));
}
RotateAnimation rotateAnimation = new RotateAnimation(0, angle, 0,
(float) (textHeight * 0.9));
rotateAnimation.setFillAfter(true);
rotateAnimation.setDuration(100);
rotateAnimation.setStartOffset(100);

word.setAnimation(rotateAnimation);
word.setGravity(Gravity.CENTER);

RelativeLayout.LayoutParams layoutparams = new RelativeLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
layoutparams.leftMargin = (int) Math.round(x);

layoutparams.topMargin = (int) (Math.round(y - textHeight * 0.9));

}
}


And I have one more question: If I want to change all words on this circle(set another wordlist) how I can I do it with the least cost?

-

## closed as off-topic by Jamal♦Dec 16 '13 at 3:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Questions asking for code to be written to solve a specific problem are off-topic here as there is no code to review." – Jamal
If this question can be reworded to fit the rules in the help center, please edit the question.

Which class does AngleCoordsLists extend? When (and how often) is drawTranslation method called? And what exactly is too slow, is it the initialization or the updating? And how slow is "too slow"? –  Simon André Forsberg Nov 22 '13 at 21:29