I have 100 images, each is an image of a percentage, for example, 1%, 2%, 3%, etc.
What's the best way to go through each image? Should I add each image resource to a List or Dictionary(if that exists in Android). Or am I forced to hard code it?
public void ShowCircle(final int percentage){
final ImageView ring = (ImageView)findViewById(R.id.ring);
ring.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
for(int i = 0; i != percentage; i++)
//I was thinking here I can access list/dictionary records.
ring.setImageResource(R.drawable.percent_1);
}
});
}